Compatibility function

STDEV function

Estimates the standard deviation of a population from a sample (divides by n − 1). Replaced by STDEV.S.

Available in All versions of Excel, including Microsoft 365 and Excel for the web (kept for compatibility)

In every Excel versionWorks in Google Sheets

Older function. STDEV still works, but for new workbooks use STDEV.S.

Syntax

STDEV(number1, [number2], ...)
ArgumentWhat it means
number1RequiredA number, range or array from the sample.
number2, ...OptionalUp to 255 numbers or ranges in total.

Returns: The sample standard deviation.

How STDEV works

Standard deviation measures how spread out values are around their average, in the same units as the data. A small value means the numbers cluster tightly (consistent fill weights, steady delivery times); a large one means they vary a lot. STDEV assumes your data is a sample from a bigger population, which is almost always the case: a week of orders, a batch of test parts, a class of students.

It calculates √(Σ(x − mean)² / (n − 1)). Dividing by n − 1 instead of n (Bessel's correction) compensates for the fact that a sample's own mean sits closer to its values than the true population mean does. Text and logical values inside ranges are ignored; use STDEVA if you want them counted. You need at least two numbers.

Compatibility note: since Excel 2010 STDEV is a compatibility function. STDEV.S calculates exactly the same thing with a clearer name. If your data is the entire population (every employee, every day of the year), use STDEV.P instead, the modern version of STDEVP.

Examples

1Spread of fill weights

D2fx=STDEV(B2:B7)
ABCD
1BagWeight (g)
214983.43
32502
43495
54505
65500
76499

Result: 3.43

The mean is 499.83 g and the sample standard deviation is 3.43 g (formatted to 2 decimals): most bags are within about ±3.4 g of the average.

2Test scores

D2fx=STDEV(B2:B8)
ABCD
1StudentScore
2Ana7210.25
3Ben85
4Cara64
5Dev91
6Eli78
7Fay69
8Gus88

Result: 10.25

The class average is 78.14 and the scores typically vary by about 10.3 points (shown to 2 decimals). =STDEVP(B2:B8) would give a slightly smaller 9.49 because it divides by 7 instead of 6.

3Annualised volatility from monthly returns

D2fx=STDEV(B2:B7)*SQRT(12)
ABCD
1MonthReturn
2Jan0.0217.37%
3Feb-0.013
4Mar0.034
5Apr0.008
6May-0.022
7Jun0.017

Result: 7.37%

Monthly returns vary by 2.13%; multiplying by √12 scales that to an annual volatility of 7.37% (cell formatted as a percentage with 2 decimals).

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

Common errors and how to fix them

ErrorWhy it happensFix
#DIV/0!Fewer than two numbers in the arguments (for example a range of text or blanks).Check that the range contains numbers, not numbers stored as text.
#VALUE!A direct argument is text that cannot be read as a number.Use ranges, or convert with VALUE.

Tips

  • Sample or population? If the data is everything you care about, use STDEVP / STDEV.P; if it stands for something bigger, use STDEV / STDEV.S.
  • Numbers stored as text are silently skipped in ranges, which can make the result wrong without an error. Check with COUNT.
  • About 68% of normally distributed values lie within one standard deviation of the mean and 95% within two.

Questions

What is the difference between STDEV and STDEVP?

STDEV treats the data as a sample and divides by n − 1; STDEVP treats it as the whole population and divides by n. For a sample, STDEV gives the better estimate.

Should I use STDEV or STDEV.S?

They return identical results. Use STDEV.S in new workbooks; STDEV is kept so older files keep working.

Why does STDEV return #DIV/0!?

It needs at least two numeric values. Text that looks like numbers is ignored.

Google Sheets

STDEV also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

STDEV 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
DanishSTDAFV
FinnishKESKIHAJONTA
FrenchECARTYPE
GermanSTABW
HungarianSZÓRÁS
ItalianDEV.ST
Norwegian (Bokmål)STDAV
PolishODCH.STANDARDOWE
Portuguese (Brazil)DESVPAD
Portuguese (Portugal)DESVPAD
RussianСТАНДОТКЛОН
SpanishDESVEST
SwedishSTDAV
TurkishSTDSAPMA