Database function

DSTDEVP function

Calculates the standard deviation of a column for the records matching the criteria, treating them as the entire population.

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

In every Excel versionWorks in Google Sheets

Syntax

DSTDEVP(database, field, criteria)
ArgumentWhat it means
databaseRequiredThe list including its header row.
fieldRequiredThe numeric column to analyse.
criteriaRequiredThe criteria range.

Returns: The population standard deviation (divides by n) of the matching values.

How DSTDEVP works

DSTDEVP measures the spread of values for the records that match your criteria, on the assumption that those records are the whole group you are interested in — not a sample. Every employee in a department, every invoice of a month, every machine on a line: when nothing is missing, the population formula is the right one. It divides by n, like STDEV.P.

Because it divides by n instead of n − 1, DSTDEVP always returns a slightly smaller number than DSTDEV on the same data, and the difference shrinks as the number of matching records grows. With only one matching record the result is 0 (no spread), whereas the sample version returns #DIV/0!.

Examples

1Salary spread across the whole Sales team

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

Result: 3274.48

Treating the three Sales salaries as the entire team, the population standard deviation is 3274.48 (two decimals) — smaller than the 4010.40 that DSTDEV returns for the same records.

2Everyone with at least 3 years

F2fx=DSTDEVP(A1:D7, 4, A9:A10)
ABCDEF
1DeptNameYearsSalary
2SalesAna3420005909.47
3ITBen758000
4SalesCarla546500
5ITDev249000
6HREli951000
7SalesFay138500
8
9Years
10>=3

Result: 5909.47

Field 4 is Salary. The four qualifying salaries give a population standard deviation of 5909.47.

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

Common errors and how to fix them

ErrorWhy it happensFix
#DIV/0!No matching numeric values.Check the criteria.
#VALUE!The field name is not in the list.Use the exact header or a column number.

Tips

  • DSTDEVP is the square root of DVARP on the same data.
  • For the same calculation with conditions inside the formula (Microsoft 365), use =STDEV.P(FILTER(D2:D7, A2:A7="Sales")).

Google Sheets

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

DSTDEVP 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
DanishDSTDAFVP
DutchDBSTDEVP
FinnishTKESKIHAJONTAP
FrenchBDECARTYPEP
GermanDBSTDABWN
HungarianAB.SZÓRÁS2
ItalianDB.DEV.ST.POP
Norwegian (Bokmål)DSTDAVP
PolishBD.ODCH.STANDARD.POPUL
Portuguese (Brazil)BDDESVPA
Portuguese (Portugal)BDDESVPADP
RussianДСТАНДОТКЛП
SpanishBDDESVESTP
SwedishDSTDAVP
TurkishVSEÇSTDSAPMAS