Statistical function

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], ...)
ArgumentWhat it means
number1RequiredA number, reference or range from the sample.
number2, ...OptionalUp 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

E2fx=STDEV.S(B2:B7)
ABCDE
1WeekRep ARep B
21120802.58
32125160
4311895
54122150
65121110
76124135

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

E2fx=STDEV.S(C2:C7)
ABCDE
1WeekRep ARep B
211208031.73
32125160
4311895
54122150
65121110
76124135

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

E2fx=STDEV.S(C2:C7)/AVERAGE(C2:C7)
ABCDE
1WeekRep ARep B
211208026.1%
32125160
4311895
54122150
65121110
76124135

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

D2fx=STDEV.S(FILTER(B2:B6, A2:A6="Night"))
ABCD
1ShiftDefects
2Day42.1213
3Night9
4Day6
5Night12
6Day5

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.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 18 KB

Common errors and how to fix them

ErrorWhy it happensFix
#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 / zeroNumbers 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.

LanguageFunction name
CzechSMODCH.VÝBĚR.S
DanishSTDAFV.S
FinnishKESKIHAJONTA.S
FrenchECARTYPE.STANDARD
GermanSTABW.S
HungarianSZÓR.M
ItalianDEV.ST.C
Norwegian (Bokmål)STDAV.S
PolishODCH.STANDARD.PRÓBKI
Portuguese (Brazil)DESVPAD.A
Portuguese (Portugal)DESVPAD.S
RussianСТАНДОТКЛОН.В
SpanishDESVEST.M
SwedishSTDAV.S
TurkishSTDSAPMA.S