Database function

DVARP function

Calculates the variance of a column for the records that match 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

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

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

How DVARP works

DVARP returns the variance of the matching records when those records are the whole population of interest. It divides the sum of squared deviations by n, like VAR.P, so the result is a little smaller than DVAR on the same data. Use it for complete groups — all products in a category, all staff in a department — rather than samples.

As with the other D-functions, the records are selected by a criteria range on the sheet, which means the same formula can answer the question for any department or threshold simply by changing a cell. Taking the square root of the result gives DSTDEVP.

Examples

1Variance of the whole Sales team's salaries

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

Result: 10722222.22

The same squared deviations as in the DVAR example, divided by 3 instead of 2: 10722222.22 (two decimals).

2All staff with at least 3 years

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

Result: 34921875

Four qualifying salaries, divided by 4: the population variance is 34921875.

⬇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

  • DVARP = DVAR × (n − 1) / n, where n is the number of matching values; with many records the two are almost equal.
  • Variance is in squared units; take SQRT of it (or use DSTDEVP) for a figure in the original units.

Google Sheets

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

DVARP 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
CzechDVAR
DanishDVARIANSP
DutchDBVARP
FinnishTVARIANSSIP
FrenchBDVARP
GermanDBVARIANZEN
HungarianAB.VAR2
ItalianDB.VAR.POP
Norwegian (Bokmål)DVARIANSP
PolishBD.WARIANCJA.POPUL
Portuguese (Brazil)BDVARP
Portuguese (Portugal)BDVARP
RussianБДДИСПП
SpanishBDVARP
SwedishDVARIANSP
TurkishVSEÇVARS