Standard Deviation Calculator
Paste a list of numbers to get the standard deviation, variance, mean, median, range, and coefficient of variation, with both sample and population variants and a full step-by-step solution.
Enter your data
Separate numbers with commas, spaces, or new lines. The calculator skips anything it cannot parse as a number, so you can paste straight from a spreadsheet column.
Step-by-Step Solution
Using Bessel's correction (n − 1) on the 12 values you entered.
Step 1Compute the mean
Step 2Find the deviations from the mean
| i | xᵢ | xᵢ − x̄ | (xᵢ − x̄)² |
|---|---|---|---|
| 1 | 72.00 | -9.8333 | 96.6944 |
| 2 | 85.00 | 3.1667 | 10.0278 |
| 3 | 90.00 | 8.1667 | 66.6944 |
| 4 | 67.00 | -14.8333 | 220.0278 |
| 5 | 74.00 | -7.8333 | 61.3611 |
| 6 | 88.00 | 6.1667 | 38.0278 |
| 7 | 95.00 | 13.1667 | 173.3611 |
| 8 | 81.00 | -0.8333 | 0.6944 |
| 9 | 79.00 | -2.8333 | 8.0278 |
| 10 | 83.00 | 1.1667 | 1.3611 |
| 11 | 92.00 | 10.1667 | 103.3611 |
| 12 | 76.00 | -5.8333 | 34.0278 |
| Σ | 982.00 | 0.0000 | 813.6667 |
Step 3Sum the squared deviations
Step 4Divide by the right denominator
For a sample, divide by = 11.
Step 5Take the square root
Step 6Interpret the result
On average, values in this dataset lie about 8.60 units from the mean (81.83). If the data is approximately normal, roughly 68% of values are expected to fall between 73.23 and 90.43 (the shaded band on the chart).
The Standard Deviation Formula
The two formulas differ only in the denominator. The choice depends on whether your data is the entire population or a sample drawn from it.
Sample standard deviation (s)
Use when the data is a sample meant to represent a larger population. The n − 1 denominator (Bessel's correction) removes the small bias that arises because you estimated the mean from the same data.
Population standard deviation (σ)
Use when your data is the complete population. For very large n the two formulas converge - the difference is negligible once n is in the hundreds.
The Empirical Rule (68 - 95 - 99.7)
When a distribution is approximately normal, the standard deviation tells you exactly how the data is partitioned around the mean. Knowing this lets you make quick probability statements without computing anything.
| Interval | Approx. share of data | Practical use |
|---|---|---|
| μ ± 1σ | 68.27% | A "typical" range. Two-thirds of observations fall here. |
| μ ± 2σ | 95.45% | Common cut-off for "unusual". 95% confidence intervals use this band. |
| μ ± 3σ | 99.73% | Used as control limits in manufacturing - anything beyond ±3σ is investigated as a possible process fault. |
Heavy-tailed or skewed distributions (income, file sizes, stock returns during crises) violate the empirical rule. Use a histogram or QQ plot to check normality before relying on these percentages.
Worked Example: Six Test Scores by Hand
Take the six scores 4, 8, 6, 5, 3, 7. The arithmetic is small enough to do without a calculator.
| xᵢ | xᵢ − 5.5 | (xᵢ − 5.5)² |
|---|---|---|
| 4 | -1.5 | 2.25 |
| 8 | 2.5 | 6.25 |
| 6 | 0.5 | 0.25 |
| 5 | -0.5 | 0.25 |
| 3 | -2.5 | 6.25 |
| 7 | 1.5 | 2.25 |
| Σ | 0 | 17.50 |
Notice how close the two values are even at this small n. The gap shrinks further as n grows. Paste 4, 8, 6, 5, 3, 7 into the calculator above to reproduce both.
Where Standard Deviation Shows Up
Finance - volatility
Annualised SD of daily returns is the standard definition of volatility for stocks, funds, and portfolios. Sharpe ratio divides excess return by this SD.
Quality control - Six Sigma
A process is 'six sigma' when defects fall outside ±6 SD of the target, corresponding to about 3.4 defects per million opportunities.
Education - standardised tests
SAT scores have mean 500 and SD 100 on each section. IQ scales fix mean 100, SD 15. These choices let any individual score be expressed as a z-score.
Sports - performance variability
A pitcher's ERA, a golfer's stroke average, a sprinter's 100m time - SD across games or rounds tells you whose performance is consistent versus volatile.
Climate science - variability vs trend
Temperature trends are debated against year-to-year SD to assess whether a recent year is genuinely unusual or within historical variability.
Data science - feature scaling
Z-score normalisation subtracts the mean and divides by SD, putting every feature on a comparable scale before fitting many ML models.
Common Mistakes to Avoid
- Using the population formula on a sample. Dividing by n when you should divide by n − 1 slightly underestimates the SD. The difference is large when n is small.
- Forgetting to take the square root. Variance and SD are different quantities - variance is in squared units, SD is in the original units. Most "wrong" SD values are actually variances.
- Reporting SD for clearly skewed data. For income, response time, or any heavy-tailed variable, the mean and SD are misleading. Report median and interquartile range instead, or describe the SD alongside a histogram.
- Ignoring units when comparing. An SD of 50 means something completely different for daily steps versus daily revenue. Use the coefficient of variation when you want to compare spread across datasets with different scales.
- Assuming SD implies normality. The 68 - 95 - 99.7 rule only holds for distributions that are roughly normal. For a uniform distribution, ±1 SD covers roughly 58% of the data, not 68%.
Frequently Asked Questions
What is standard deviation?
What is the difference between sample and population standard deviation?
How do you calculate standard deviation by hand?
What is variance?
When should I use standard deviation vs interquartile range?
Can standard deviation be negative?
What is the empirical rule (68–95–99.7)?
What is the coefficient of variation?
How many data points do I need for the standard deviation to be reliable?
How is standard deviation used in real life?
Why divide by n − 1 instead of n for the sample?
Standard Deviation vs MAD vs IQR
Standard deviation is not the only measure of spread, and it is not always the best one. Two robust alternatives are worth knowing - the median absolute deviation (MAD) and the interquartile range (IQR). Each handles outliers and skew differently, and each suits a different question.
| Measure | Definition | Sensitive to outliers? | Best for |
|---|---|---|---|
| Standard deviation (SD) | Square root of the average squared distance from the mean. | Very. A single extreme value can dominate the result. | Symmetric data, parametric inference, control charts. |
| MAD | Median of the absolute deviations from the median. | Resistant. Breakdown point ≈ 50%. | Heavy-tailed data, robust outlier detection. |
| IQR | Q3 − Q1: the spread of the middle 50% of the data. | Resistant. Ignores the most extreme 25% on each side. | Skewed data, boxplots, reporting median ± IQR. |
Rule of thumb: if the histogram of your data is roughly bell-shaped, quote mean ± SD. If it has a long tail or visible outliers, quote median ± IQR. MAD is the right choice when you specifically need a robust spread on the same scale as SD - multiply by 1.4826 to get an SD-equivalent estimate.
References and Further Reading
- Bessel's correction explains why the sample SD divides by n − 1 - Bessel's correction (Wikipedia).
- The 68–95–99.7 rule, formally the empirical rule, applies to roughly normal distributions - 68–95–99.7 rule.
- NIST/SEMATECH e-Handbook on dispersion, including SD and related measures - NIST handbook: measures of scale.
- For robust alternatives when the data is skewed or outlier-heavy - Median absolute deviation.
- The original case for n − 1 in the sample variance estimator, from R. A. Fisher's 1925 textbook, is the historical reference most undergraduate texts still trace back to.