STDEV function
Quick answer
STDEV measures how spread out a set of numbers is, treating them as a sample of a larger group.
- Syntax
=STDEV(number1, [number2], ...)- Most common use
=STDEV(B2:B7)returns 1.87 (Line A fills consistently close to 500 g)
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], ...)
| Argument | Required? | What it is |
|---|---|---|
number1 | Required | The first number, cell or range in the sample. |
number2 | Optional | More 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.
| Cell | Formula | Result | What it shows |
|---|---|---|---|
| F2 | =STDEV(B2:B7) | 1.87 | Line A fills consistently close to 500 g |
| F3 | =STDEV(C2:C7) | 7.23 | Line B varies about four times as much |
| F4 | =AVERAGE(B2:B7)+2*STDEV(B2:B7) | 504.24 | A 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
| Bag | Line A (g) | Line B (g) | Check | Result | |
| 1 | 502 | 497 | Spread, line A | 1.87 | |
| 2 | 498 | 509 | Spread, line B | 7.23 | |
| 3 | 501 | 490 | Upper limit, line A | 504.24 | |
| 4 | 499 | 506 | |||
| 5 | 500 | 501 | |||
| 6 | 503 | 494 |
Practice STDEV
Graded instantly, then re-checked on changed data.
Which store is most consistent?
H2, calculate the sample standard deviation of Store 1's daily sales. Fill down to H4.Common mistakes
| What you see | Why, 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's | STDEV 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 think | STDEV 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.
Lessons that use STDEV
Answers that use STDEV
In other languages
STDEV is DESVEST in Spanish Excel and STABW in German Excel. Each page has the syntax with semicolons, the examples and the exercise in that language. For other functions and languages, use the Function Translator.
Updated Checked by running: every formula on this page was run by our formula engine on .