STDEV.S function
Estimates the standard deviation of a population from a sample, showing how much values typically vary from the average.
Available in Excel 2010 and later, Microsoft 365, Excel for the web, Excel for Mac 2011 and later
Excel 2010 and laterWorks in Google Sheets
Syntax
STDEV.S(number1, [number2], ...)| Argument | What it means | |
|---|---|---|
number1 | Required | A number, reference or range from the sample. |
number2, ... | Optional | Up to 254 more values. At least two numbers are needed. |
Returns: The sample standard deviation s, in the same units as the data.
How STDEV.S works
Two sales reps can both average 122 units a week, yet one is steady while the other swings between 80 and 160. The average hides this; the standard deviation reveals it. It measures the typical distance of values from their mean, in the original units, so a standard deviation of 3 units means "usually within a few units of the average". It is the basis of control charts, confidence intervals, safety stock and risk measures.
STDEV.S is the right choice when your numbers are a sample, a subset used to learn about something larger: six weeks of sales to judge a rep's typical week, 30 boxes to judge a whole production run. It divides by n − 1 instead of n (Bessel's correction), because a sample tends to underestimate the true spread. If your data covers the entire population, use STDEV.P. Text, logical values and empty cells in ranges are ignored; STDEV is the older name of the same function.
Examples
1A steady rep
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Week | Rep A | Rep B | ||
| 2 | 1 | 120 | 80 | 2.58 | |
| 3 | 2 | 125 | 160 | ||
| 4 | 3 | 118 | 95 | ||
| 5 | 4 | 122 | 150 | ||
| 6 | 5 | 121 | 110 | ||
| 7 | 6 | 124 | 135 |
Result: 2.58
Rep A averages 122 units with a standard deviation of 2.581989 (shown to 2 decimals): very consistent.
2A volatile rep with the same average
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Week | Rep A | Rep B | ||
| 2 | 1 | 120 | 80 | 31.73 | |
| 3 | 2 | 125 | 160 | ||
| 4 | 3 | 118 | 95 | ||
| 5 | 4 | 122 | 150 | ||
| 6 | 5 | 121 | 110 | ||
| 7 | 6 | 124 | 135 |
Result: 31.73
Rep B also averages 122, but the standard deviation is 31.728011 (shown to 2 decimals), more than ten times larger. Forecasting Rep B's next week is much less certain.
3Coefficient of variation
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Week | Rep A | Rep B | ||
| 2 | 1 | 120 | 80 | 26.1% | |
| 3 | 2 | 125 | 160 | ||
| 4 | 3 | 118 | 95 | ||
| 5 | 4 | 122 | 150 | ||
| 6 | 5 | 121 | 110 | ||
| 7 | 6 | 124 | 135 |
Result: 26.1%
Dividing by the mean expresses spread relative to size: 26.1% (formatted as a percentage). This makes it possible to compare variability of products with very different volumes.
4Standard deviation for one group
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Shift | Defects | ||
| 2 | Day | 4 | 2.1213 | |
| 3 | Night | 9 | ||
| 4 | Day | 6 | ||
| 5 | Night | 12 | ||
| 6 | Day | 5 |
Result: 2.1213
FILTER keeps the night-shift values 9 and 12; their sample standard deviation is 2.121320 (shown to 4 decimals). Microsoft 365 / Excel 2021+; in older versions use =STDEV.S(IF(A2:A6="Night",B2:B6)) with Ctrl+Shift+Enter.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#DIV/0! | Fewer than two numbers. | A sample standard deviation needs at least two values. |
#VALUE! | A typed argument is text that is not a number. | Use cell references. |
Too small / zero | Numbers stored as text were ignored. | Convert them to real numbers. |
Tips
- About 68% of normal data lies within one standard deviation of the mean and 95% within two.
- The standard error of a sample mean is
=STDEV.S(r)/SQRT(COUNT(r)). - To include text and TRUE/FALSE as values (0 and 1), use STDEVA.
Questions
Why divide by n − 1?
A sample's values sit closer to their own average than to the true population average, so dividing by n would underestimate the spread. Dividing by n − 1 corrects this.
What is a good standard deviation?
There is no universal good value. Judge it relative to the mean (coefficient of variation) and to what your process or business can tolerate.
STDEV, STDEV.S or STDEV.P?
STDEV and STDEV.S are identical (sample). STDEV.P is for complete populations.
Google Sheets
STDEV.S also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
STDEV.S 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.
| Language | Function name |
|---|---|
| Czech | SMODCH.VÝBĚR.S |
| Danish | STDAFV.S |
| Finnish | KESKIHAJONTA.S |
| French | ECARTYPE.STANDARD |
| German | STABW.S |
| Hungarian | SZÓR.M |
| Italian | DEV.ST.C |
| Norwegian (Bokmål) | STDAV.S |
| Polish | ODCH.STANDARD.PRÓBKI |
| Portuguese (Brazil) | DESVPAD.A |
| Portuguese (Portugal) | DESVPAD.S |
| Russian | СТАНДОТКЛОН.В |
| Spanish | DESVEST.M |
| Swedish | STDAV.S |
| Turkish | STDSAPMA.S |