Standard deviation measures how far values typically sit from their mean. A small standard deviation means the values are close together; a large one means they are spread out.
Sample standard deviation = √( Σ (x − mean)² ÷ (n − 1) )
On the 30-day sample below: 7.
When to use it
It is the yardstick for "is this unusual?": a day more than two or three standard deviations from the mean deserves a look. It also sets the size of error bars and confidence intervals.
Worked example
Use the sample standard deviation (dividing by n − 1) when your rows are a sample of a longer process, which business data almost always is.
=STDEV.S(C2:C31)| Day | Website orders |
|---|---|
| 1 | 24 |
| 2 | 27 |
| 3 | 22 |
| 4 | 30 |
| 5 | 28 |
| 6 | 25 |
| 7 | 31 |
| 8 | 29 |
| 9 | 26 |
| 10 | 33 |
| 11 | 30 |
| 12 | 28 |
| 13 | 35 |
| 14 | 32 |
| 15 | 29 |
| 16 | 34 |
| 17 | 61 |
| 18 | 31 |
| 19 | 36 |
| 20 | 33 |
| 21 | 30 |
| 22 | 37 |
| 23 | 35 |
| 24 | 32 |
| 25 | 38 |
| 26 | 36 |
| 27 | 34 |
| 28 | 40 |
| 29 | 37 |
| 30 | 39 |
Common mistakes
- STDEV.S and STDEV.P differ: .S divides by n − 1 (a sample), .P by n (a whole population). pandas .std() is the sample version; NumPy np.std() is the population version by default.
- One extreme value inflates it. Here day 17 adds a lot; without it the standard deviation is much smaller.
- It assumes the mean is a sensible centre. For skewed data, the interquartile range describes spread more honestly.
Calculate it yourself
Related methods
See all statistics methods or the business metrics they are used on.
Guides that use it
Further reading
Questions people ask
- What is standard deviation?
- Standard deviation measures how far values typically sit from their mean. A small standard deviation means the values are close together; a large one means they are spread out.
- What is the formula for standard deviation?
- Sample standard deviation = √( Σ (x − mean)² ÷ (n − 1) ). On the 30-day sample data the result is 7.
- How do you calculate standard deviation in Excel?
- Use =STDEV.S(C2:C31) with the data in rows 2 to 31. The same formula works in Google Sheets.
About the data on this page
The figures come from a small made-up dataset, printed above in full so you can check every number by hand. Download it as daily.csv. The results are computed from those rows when the page is built, and the Excel formulas, SQL and Python on these pages are run against the same rows before publishing, so the code and the answers agree.
To get these numbers from your own data without writing formulas, try AnalyzeIt: ask in plain words and it shows the working behind every figure.
Legal entity
Devansh Yadav
Moradabad, Uttar Pradesh
Governing law: Courts at Moradabad, Uttar Pradesh
Phone: +91 8433475698
Legal: legal@analyzeit.in