Category: FUNCTION | Updated: 2026-11-22
How to Use the STDEV Function in Google Sheets | Calculate Sample Standard Deviation
Syntax
=STDEV(value1, [value2, ...])
- value1: The first value or range of the sample.
- value2, … (optional): Additional values or ranges to include in the sample (up to 30 arguments can be specified, though a single cell range is usually used).
Example with a Table
Here is an example of calculating the sample standard deviation from the weight data of 5 product samples (A2:A6).
| Cell | A (Sample Weight g) | B (Metric) | C (Formula) | D (Result) |
|---|---|---|---|---|
| 1 | Weight (g) | Metric | Formula | Result |
| 2 | 98 | Mean | =AVERAGE(A2:A6) |
100.0 |
| 3 | 100 | Sample Standard Deviation | =STDEV(A2:A6) |
1.58 |
| 4 | 102 | |||
| 5 | 99 | |||
| 6 | 101 |
Against an average of 100.0g, the standard deviation is calculated as approximately 1.58g.
Common Errors and Notes
#DIV/0!Error: Occurs if there are fewer than 2 numeric values in the specified range (sample standard deviation uses “count - 1” as the denominator, so at least 2 numbers are required).#VALUE!Error: Occurs if you pass a non-numeric string like"abc"directly as an argument rather than via a cell reference.- Relationship to STDEV.S:
STDEVandSTDEV.Sperform the exact same calculation. If you want to standardize on modern function names, usingSTDEV.Sis recommended.
Frequently Asked Questions
Q. How do I choose between STDEV and STDEVP?
A. Use STDEV when your data is a subset (sample) of the whole, and use STDEVP when you have the entire dataset (population) being studied.
Q. What happens if the range contains text or blank cells?
A. When specifying a cell range, text, boolean values (TRUE/FALSE), and blank cells are automatically ignored. However, entering text directly as an argument in the formula will cause an error.