Standard Deviation Calculator
Standard deviation measures how spread out a set of numbers is. This calculator gives both the sample and population figures, which are not the same.
Formula
σ = √( Σ(x − mean)² ÷ n ) · s = √( Σ(x − mean)² ÷ (n − 1) )
- σ for a whole population, s for a sample
- The n − 1 divisor is Bessel’s correction
For 2, 4, 4, 4, 5, 5, 7, 9: mean 5, population σ = 2.00, sample s = 2.14
How It Is Calculated
- Find the mean.
- Subtract the mean from each value and square the result.
- Add those squares together.
- Divide by n for a population, or n − 1 for a sample.
- Take the square root.
For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5. The population standard deviation is 2.00 and the sample standard deviation 2.14.
Sample or Population?
Use the population formula when your data is the entire group you care about — every pupil in a class, every item produced in a batch.
Use the sample formula when the data is a subset used to estimate something larger. Dividing by n − 1 rather than n is Bessel's correction: a sample tends to understate the true spread, because it is unlikely to contain the most extreme values, so the smaller divisor corrects the bias upward.
Most real-world statistics uses the sample formula, and it is the default in Excel's STDEV.S.
Reading the Result
For roughly normal data, the empirical rule applies: about 68% of values fall within one standard deviation of the mean, 95% within two and 99.7% within three.
Standard deviation shares the units of your data, which makes it easier to interpret than variance (its square). It is also sensitive to outliers, because the differences are squared — a single extreme value can inflate it substantially.
Quick Reference
| Measure | Population | Sample |
|---|---|---|
| Divisor | n = 8 | n − 1 = 7 |
| Variance | 4.00 | 4.57 |
| Standard deviation | 2.00 | 2.14 |
| Use when | You have every value | These values estimate a wider group |
Frequently Asked Questions
- What is the difference between sample and population standard deviation?
- Population divides by n and is used when you have the whole group. Sample divides by n − 1 to correct for the tendency of samples to understate true spread.
- Why divide by n − 1?
- Bessel's correction. A sample rarely includes the most extreme values, so it underestimates variability. The smaller divisor compensates.
- What does the standard deviation actually mean?
- For roughly normal data, about 68 per cent of values lie within one standard deviation of the mean and 95 per cent within two.
- What is the difference between variance and standard deviation?
- Variance is the square of the standard deviation. Standard deviation is usually preferred because it shares the units of the original data.