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)| Argument | What it means | |
|---|---|---|
database | Required | The list including its header row. |
field | Required | The numeric column to analyse, as a header in quotes or a column number. |
criteria | Required | The 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)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Dept | Name | Years | Salary | ||
| 2 | Sales | Ana | 3 | 42000 | 4010.40 | |
| 3 | IT | Ben | 7 | 58000 | ||
| 4 | Sales | Carla | 5 | 46500 | ||
| 5 | IT | Dev | 2 | 49000 | ||
| 6 | HR | Eli | 9 | 51000 | ||
| 7 | Sales | Fay | 1 | 38500 | ||
| 8 | ||||||
| 9 | Dept | |||||
| 10 | Sales |
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
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Dept | Name | Years | Salary | ||
| 2 | Sales | Ana | 3 | 42000 | 6823.67 | |
| 3 | IT | Ben | 7 | 58000 | ||
| 4 | Sales | Carla | 5 | 46500 | ||
| 5 | IT | Dev | 2 | 49000 | ||
| 6 | HR | Eli | 9 | 51000 | ||
| 7 | Sales | Fay | 1 | 38500 | ||
| 8 | ||||||
| 9 | Years | |||||
| 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).
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#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.
| Language | Function name |
|---|---|
| Czech | DSMODCH.VÝBĚR |
| Danish | DSTDAFV |
| Dutch | DBSTDEV |
| Finnish | TKESKIHAJONTA |
| French | BDECARTYPE |
| German | DBSTDABW |
| Hungarian | AB.SZÓRÁS |
| Italian | DB.DEV.ST |
| Norwegian (Bokmål) | DSTDAV |
| Polish | BD.ODCH.STANDARD |
| Portuguese (Brazil) | BDEST |
| Portuguese (Portugal) | BDDESVPAD |
| Russian | ДСТАНДОТКЛ |
| Spanish | BDDESVEST |
| Swedish | DSTDAV |
| Turkish | VSEÇSTDSAPMA |