Database function

DSTDEV function

Estimates the standard deviation of a column, treating the records that match the criteria as a sample of a larger group.

Available in All versions of Excel, including Microsoft 365 and Excel for the web

In every Excel versionWorks in Google Sheets

Syntax

DSTDEV(database, field, criteria)
ArgumentWhat it means
databaseRequiredThe list including its header row.
fieldRequiredThe numeric column to analyse, as a header in quotes or a column number.
criteriaRequiredThe criteria range.

Returns: The sample standard deviation (divides by n − 1) of the matching values.

How DSTDEV works

Standard deviation measures how spread out numbers are around their average: a small value means the salaries (or delivery times, or order sizes) are similar, a large value means they vary a lot. DSTDEV calculates it for only those records that match the conditions in a criteria range, so you can compare the spread of pay in one department with another without filtering the list by hand.

DSTDEV assumes the matching records are a sample — a part of a bigger population you want to draw conclusions about — and therefore divides by n − 1, like STDEV.S. If the matching records are the complete group you care about (for example every employee in the department), use DSTDEVP, which divides by n and gives a slightly smaller result. You need at least two matching numbers, or the result is #DIV/0!.

Examples

1Spread of salaries in Sales (sample)

F2fx=DSTDEV(A1:D7, "Salary", A9:A10)
ABCDEF
1DeptNameYearsSalary
2SalesAna3420004010.40
3ITBen758000
4SalesCarla546500
5ITDev249000
6HREli951000
7SalesFay138500
8
9Dept
10Sales

Result: 4010.40

The three Sales salaries (42,000, 46,500 and 38,500) average 42,333.33. Their sample standard deviation is 4010.40, shown with two decimals: a typical salary is about 4,000 away from the average.

2Staff with at least 3 years

F2fx=DSTDEV(A1:D7, "Salary", A9:A10)
ABCDEF
1DeptNameYearsSalary
2SalesAna3420006823.67
3ITBen758000
4SalesCarla546500
5ITDev249000
6HREli951000
7SalesFay138500
8
9Years
10>=3

Result: 6823.67

Four employees qualify (Ana, Ben, Carla, Eli) with salaries 42,000, 58,000, 46,500 and 51,000. Their sample standard deviation is 6823.67 (two decimals).

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 14 KB

Common errors and how to fix them

ErrorWhy it happensFix
#DIV/0!Fewer than two matching numeric values.Widen the criteria, or use DSTDEVP if a single record is a valid population.
#VALUE!The field name is not in the list.Use the exact header or a column number.

Tips

  • Not sure whether to use the sample or population version? If you would describe the matching records as "all of them", use DSTDEVP; if they stand for a larger group, use DSTDEV.
  • The standard deviation is the square root of the variance: =SQRT(DVAR(...)) gives the same result as DSTDEV.

Google Sheets

DSTDEV also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

DSTDEV in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
CzechDSMODCH.VÝBĚR
DanishDSTDAFV
DutchDBSTDEV
FinnishTKESKIHAJONTA
FrenchBDECARTYPE
GermanDBSTDABW
HungarianAB.SZÓRÁS
ItalianDB.DEV.ST
Norwegian (Bokmål)DSTDAV
PolishBD.ODCH.STANDARD
Portuguese (Brazil)BDEST
Portuguese (Portugal)BDDESVPAD
RussianДСТАНДОТКЛ
SpanishBDDESVEST
SwedishDSTDAV
TurkishVSEÇSTDSAPMA