Formualizer Docs

DSTDEV

Returns the sample standard deviation of a database field for matching records.

DSTDEV computes standard deviation with the sample denominator (n - 1) after criteria filtering.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=DSTDEV(database, field, criteria)

Arguments

ArgumentTypeRequiredDefault
databaseanyRequired—
fieldanyRequired—
criteriaanyRequired—

Remarks

  • An equality criterion for a date or number ("10/26/1999", "36459", 36459) also matches text cells holding that date; <> and ordering criteria do not read date text.
  • Criteria rows represent OR branches; criteria columns in each row are combined with AND.
  • At least two numeric values must match criteria, otherwise the result is #DIV/0!.

Error cases

  • field is resolved by case-insensitive header text or 1-based column index; invalid field resolution returns #VALUE!.

Examples

Estimate the sample standard deviation of the Score column for the two East records.

Formula =DSTDEV(A1:B4,"Score",D1:D2)

Input cells
ABD
1"Team""Score""Team"
2"East"8"East"
3"West"3
4"East"10

Expected result 1.4142135623731

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Use field number 2 to get the same sample standard deviation for East.

Formula =DSTDEV(A1:B4,2,D1:D2)

Input cells
ABD
1"Team""Score""Team"
2"East"8"East"
3"West"3
4"East"10

Expected result 1.4142135623731

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The one West record cannot supply a sample standard deviation, so IFERROR returns the fallback.

Formula =IFERROR(DSTDEV(A1:B4,"Score",E1:E2),"Insufficient data")

Input cells
ABE
1"Team""Score""Team"
2"East"8"West"
3"West"3
4"East"10

Expected result Insufficient data

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The missing field header prevents calculating the sample standard deviation for East.

Formula =DSTDEV(A1:B4,"Missing",D1:D2)

Input cells
ABD
1"Team""Score""Team"
2"East"8"East"
3"West"3
4"East"10

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Sample stdev of units for East or West

Formula =DSTDEV(A1:E7, "Units", G1:G3)

Input cells
ABCDEG
1"Region""Salesperson""Product""Units""Revenue""Region"
2"West""Diaz""Widget"24126000"East"
3"East""Patel""Gadget"31142500"West"
4"North""Kim""Widget"1887000
5"West""Ramos""Service"1246000
6"South""Lee""Gadget"27119000
7"East""Noor""Widget"22101000

Expected result 7.84750491132904

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Sample stdev of widget revenue

Formula =DSTDEV(A1:E7, 5, G1:G2)

Input cells
ABCDEG
1"Region""Salesperson""Product""Units""Revenue""Product"
2"West""Diaz""Widget"24126000"Widget"
3"East""Patel""Gadget"31142500
4"North""Kim""Widget"1887000
5"West""Ramos""Service"1246000
6"South""Lee""Gadget"27119000
7"East""Noor""Widget"22101000

Expected result 19756.8553503166

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Why does DSTDEV return #DIV/0! with one matching row?

DSTDEV uses sample statistics and needs at least two numeric matches for an n-1 denominator.

Implementation

Engine source

On this page