Spreadsheet Practice

STDEV function

STDEV measures how spread out a set of numbers is, treating them as a sample of a larger group. A small result means the values sit close to the average; a large one means they vary a lot. STDEV.S is the newer name for the same calculation.

Available in
Every current version
Category
Statistical functions
Returns
The sample standard deviation, or #DIV/0! if there are fewer than two numbers.
Google Sheets
Also available in Google Sheets.

Syntax

=STDEV(number1, [number2], ...)

ArgumentRequired?What it is
number1RequiredThe first number, cell or range in the sample.
number2OptionalMore numbers, cells or ranges, up to 255 in total.

Examples

Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.

CellFormulaResultWhat it shows
F2=STDEV(B2:B7)1.87Line A fills consistently close to 500 g
F3=STDEV(C2:C7)7.23Line B varies about four times as much
F4=AVERAGE(B2:B7)+2*STDEV(B2:B7)504.24A simple upper control limit: average plus two standard deviations

Try it live

This is the sample sheet. Change any number or text, or edit a formula, and the results update.

Show the sample data as a table
BagLine A (g)Line B (g)CheckResult
1502497Spread, line A1.87
2498509Spread, line B7.23
3501490Upper limit, line A504.24
4499506
5500501
6503494

Practice STDEV

Graded instantly, then re-checked on changed data.

Which store is most consistent?

In H2, calculate the sample standard deviation of Store 1's daily sales. Fill down to H4.

Common mistakes

What you seeWhy, and how to fix it
#DIV/0!The range has fewer than two numbers. A standard deviation needs at least two values.
The result is a little higher than another tool'sSTDEV divides by n-1 (sample). If your numbers are the whole population, use STDEV.P, which divides by n.
The sample is smaller than you thinkSTDEV skips text and blanks in a range, including numbers stored as text. Check with COUNT that every value is included.

Tips

  • Compare spreads with the coefficient of variation, STDEV divided by AVERAGE, when the averages are very different.

Questions

Should I use STDEV or STDEV.P?

Use STDEV (or STDEV.S) when your data is a sample of a bigger group. Use STDEV.P when you have every value in the group.

Is STDEV the same as STDEV.S?

Yes. STDEV.S is the name introduced in Excel 2010; both give the same result.

Last reviewed October 2026. Every example result on this page is calculated live by the Spreadsheet Practice formula engine.