Statistics function
STDEV.S function in Google Sheets and Excel
STDEV.S estimates the standard deviation of a sample: how far the values typically sit from their average.
Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet
- Excel 2016
- Excel 2019
- Excel 2021
- Excel 2024
- Microsoft 365
- Google Sheets
Syntax
STDEV.S(number1, [number2], ...)Arguments in [brackets] are optional. Google Sheets writes it STDEV.S(value1, [value2, ...]).
Example
=STDEV.S(C2:C13) reads: Treat the twelve students' study hours in C2:C13 as a sample and return how far they typically sit from their average.
| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Student | Class | Hours | Score | From | Grade | Hours spread | 2.8 | ||
| 2 | Noor | A | 2 | 48 | 0 | F | ||||
| 3 | Mateo | B | 5 | 66 | 50 | D | ||||
| 4 | Hana | A | 8 | 81 | 60 | C | ||||
| 5 | Ollie | B | 3 | 55 | 70 | B | ||||
| 6 | Zara | A | 10 | 93 | 85 | A | ||||
| 7 | Ivan | B | 6 | 72 | ||||||
| 8 | Lea | A | 1 | 39 | ||||||
| 9 | Omar | B | 7 | 77 | ||||||
| 10 | Sara | A | 9 | 88 | ||||||
| 11 | Theo | B | 4 | 61 | ||||||
| 12 | Yuki | A | 6 | 70 | ||||||
| 13 | Bea | B | 8 | 84 |
J1 shows 2.8: study hours typically sit about 2.8 hours from their average of 5.75.
How the spreadsheet calculates it
Works out the standard deviation of C2:C13, treating it as a sample.
- 1. STDEV.S: Works out the standard deviation of
C2:C13, treating it as a sample.range=`C2:C13`: the numbers
More STDEV.S examples
=STDEV.S(D2:D13)The spread of the exam scores.=STDEV.S(C2:C13)/AVERAGE(C2:C13)The spread as a share of the average, to compare groups of different sizes.=(C2-AVERAGE($C$2:$C$13))/STDEV.S($C$2:$C$13)How many standard deviations C2 is from the average (fill down).=STDEV.S(FILTER(D2:D13,B2:B13="B"))The spread of class B's scores only.
Paste any of these into the formula explainer to see it step by step.
Tips
- Always show the average next to the standard deviation.
- Use STDEV.S unless you're sure you have the whole population.
- Format the result to one or two decimals; more digits suggest a precision the data doesn't have.
What STDEV.S is used for
Measuring how consistent delivery times, sales or test scores are, comparing the spread of two teams or products, and spotting unusual values that sit far from the average.
Arguments
| Argument | Required | What it is |
|---|---|---|
| number1 | Yes | A range of numbers that is a sample of a bigger group, such as C2:C13. |
| number2, … | No | More ranges or numbers in the sample. |
Common mistakes
Using STDEV.P on a sample: it understates the spread.
Reading the result without the average beside it: a spread of 2.8 hours is large around an average of 5.75 but would be tiny around 500.
Typing TRUE/FALSE or text into the range and expecting them to count: Microsoft's page says text and logical values in a reference are ignored.
Using it on a column that also holds the total row, which inflates the spread.
In Google Sheets
Google Sheets has STDEV.S with the same arguments (STDEV.S(value1, [value2, ...])), and also the older name STDEV.
Errors you may see with STDEV.S
Questions
STDEV.S or STDEV.P: which should I use?
STDEV.S when your data is a sample of a bigger group (most real data: some customers, some days). STDEV.P only when you have every member of the group. STDEV.S divides by n−1, so it's slightly larger.
What's the difference between STDEV and STDEV.S?
STDEV is the older name for the same sample calculation, kept for compatibility. Use STDEV.S in new work.
How do I read a standard deviation?
In the same units as the data: a standard deviation of 2.8 hours means study hours typically sit about 2.8 hours from the average. Compare it with the average to judge whether that's a lot.
How do I find values far from the average?
Subtract the average and divide by STDEV.S: (C2-AVERAGE($C$2:$C$13))/STDEV.S($C$2:$C$13) gives how many standard deviations each value is from the average.
Sources
Official documentation the facts on this page were checked against.