Contact

DSTDEV Function in Google Sheets: Formula, Examples & Troubleshooting

Database Intermediate Google Sheets

Calculate a criteria-selected sample standard deviation with DSTDEV in Google Sheets. Audit the matching records, sample denominator, and multi-condition filters.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: DSTDEV calculates the sample standard deviation of one numeric field after a database criteria table selects the records. For the East delivery sample below, the expected deviation is 2 minutes around a mean of 12 minutes.

Verification: NOT_TESTED_IN_GOOGLE_SHEETS. Documentation was reviewed October 17, 2026. The selected samples and arithmetic were checked independently, without running the formulas in Sheets.

Syntax and arguments

=DSTDEV(database, field, criteria)

database includes headers and records. field names the measurement column or gives its one-based index. criteria contains header labels and filtering tests. All three are required. Google identifies DSTDEV as the sample statistic; the related DSTDEVP uses a population interpretation. Google DSTDEV reference.

The choice between sample and population describes the data’s role. It is not determined by whether you selected some rows from a larger spreadsheet. If the selected observations are a sample of a continuing delivery process, the sample statistic is appropriate for describing that sample’s spread.

Prepare a small delivery sample

Enter this synthetic dataset in A1:D7:

Row A · Run B · Region C · Shift D · Minutes
1 Run Region Shift Minutes
2 R-01 East Day 10
3 R-02 East Day 12
4 R-03 East Night 14
5 R-04 West Day 20
6 R-05 West Day 24
7 R-06 West Night 28
  1. In F1 enter Region; in F2 enter East.
  2. Put the formula =DSTDEV(A1:D7,"Minutes",F1:F2) in H2.
  3. Expected result: 2. Its unit is minutes, the same as the measurement field.
  4. As a field-index check, =DSTDEV(A1:D7,4,F1:F2) has the same expected result.

Only 10, 12, and 14 are selected. Their mean is 12. The squared deviations are 4, 0, and 4, summing to 8. Sample variance divides by n−1 = 2, giving 4; its square root is 2. This is the independent calculation behind the formula, not a native test record.

Change the criteria without changing the formula

Change F2 to West. The selected values become 20, 24, and 28, with mean 24. Their squared deviations total 32; 32/(3−1) = 16, so the expected DSTDEV result is 4.

The West standard deviation is twice the East standard deviation in this synthetic example. That does not alone establish poorer performance: it says the numeric spread is larger. For these values, both samples have the same ratio of standard deviation to mean, 1/6. Whether that comparison is useful depends on whether relative variation is meaningful for the process.

Advanced application: multiple conditions

Google’s database criteria guide defines tests on the same criteria row as simultaneous requirements. Put Region and Shift in F5:G5, then East and Day in F6:G6.

=DSTDEV(A1:D7,"Minutes",F5:G6)

Expected result: 1.414213562373095, or approximately 1.4142 minutes. Only 10 and 12 match. Their mean is 11, their squared deviations total 2, and the sample denominator is 1.

The population calculation for those same two numbers would be 1. That difference is arithmetic, not a rounding disagreement. Do not choose whichever function produces the smaller spread.

For a numeric band on one field, put Minutes in both F9 and G9, >=12 in F10, and <=24 in G10. Then enter:

=DSTDEV(A1:D7,"Minutes",F9:G10)

The selected measurements are 12, 14, 20, 24. Their mean is 17.5 and the squared deviations sum to 91. Expected result: sqrt(91/3), approximately 5.507570547286102. Repeating a field heading permits both limits on one row; putting the limits on separate rows would express alternatives instead.

Errors, missing data, and troubleshooting

  • Verify the selection before interpreting the statistic. A wrong criteria range can return a plausible number for the wrong group.
  • Keep the database header in A1:D7 and criteria headers in the selected criteria range. Field 4 means the fourth database column.
  • Avoid blank extra criteria rows; an empty test is unrestricted and may widen the selection.
  • At least two numeric observations are needed for the sample calculation because its denominator is n−1. A one-record group has no defined sample standard deviation. No exact DSTDEV error token is claimed here; its specific help page does not give a complete error matrix.
  • Investigate blanks, numeric-looking text, and source errors rather than silently replacing them with zeros. A zero is an actual measurement and can substantially alter both mean and spread. This guide does not assume that STDEV’s documented text handling proves every DSTDEV coercion case.
  • A high standard deviation can reflect an outlier, mixed processes, or genuine variation. Inspect the selected values with FILTER before treating the number as a performance verdict.

DSTDEV is in current Google Sheets help. Its introduction date, last functioning release, and retirement are not established by the reviewed sources. The formulas are for ordinary Sheets cell ranges. Google’s separate BigQuery syntax for STDEV is not the syntax of DSTDEV and should not be substituted into this guide.

For an unfiltered numeric sample, see the published STDEV.S guide. For sample variance rather than its square root, see VAR.S. Cross-application error and mixed-type behavior requires separate checks; no native compatibility result is asserted here.

First-party references

Reviewed October 17, 2026: DSTDEV, database criteria, and STDEV. The last source describes the unfiltered sample statistic and is not used to invent DSTDEV-specific errors.