📉 Standard Deviation Calculator
Find the standard deviation and variance of a data set, for a sample or a whole population, with every step shown.
Quick answer: For the population 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the squared deviations add up to 32, so the variance is 32 ÷ 8 = 4 and the standard deviation is √4 = 2.
Updated · Free · No sign-up · Works on any device
Standard Deviation Calculator inputs
Result
Population standard deviation (σ)
2
- Variance (σ²)
- 4
- Mean
- 5
- Count
- 8
- Sum of squares
- 32
- Coefficient of variation
- 40%
Step by step
- Mean: 40 ÷ 8 = 5
- Subtract the mean from each value and square the result (see the table below)
- Add the squares: Σ(x − mean)² = 32
- Divide by N = 8: variance = 32 ÷ 8 = 4
- Take the square root: σ = √4 = 2
Deviations from the mean (5)
| # | x | x − mean | (x − mean)² |
|---|---|---|---|
| 1 | 2 | −3 | 9 |
| 2 | 4 | −1 | 1 |
| 3 | 4 | −1 | 1 |
| 4 | 4 | −1 | 1 |
| 5 | 5 | 0 | 0 |
| 6 | 5 | 0 | 0 |
| 7 | 7 | 2 | 4 |
| 8 | 9 | 4 | 16 |
What standard deviation measures
Standard deviation tells you how far, on average, the values in a data set lie from their mean. A small value means the data is tightly bunched; a large value means it is spread out. For roughly bell-shaped data about 68% of values fall within one standard deviation of the mean and about 95% within two.
The formulas
σ = √( Σ(x − μ)² ÷ N ) · s = √( Σ(x − x̄)² ÷ (n − 1) )
σ is the population standard deviation and s the sample standard deviation. The only difference is the divisor.
Step by step
- Find the mean of the data.
- Subtract the mean from every value to get its deviation.
- Square each deviation so negatives don’t cancel positives.
- Add the squares to get the sum of squares.
- Divide by N (population) or n − 1 (sample) – this is the variance.
- Take the square root to get the standard deviation.
Worked example
Data: 2, 4, 4, 4, 5, 5, 7, 9 (a population of 8 values). The mean is 40 ÷ 8 = 5.
| x | x − 5 | (x − 5)² |
|---|---|---|
| 2 | −3 | 9 |
| 4 (×3) | −1 | 1 each |
| 5 (×2) | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
The squares add to 32. Population variance = 32 ÷ 8 = 4, so σ = 2. Treated as a sample, the variance would be 32 ÷ 7 ≈ 4.571 and s ≈ 2.138.
Tips
- Standard deviation is always zero or positive and has the same units as your data.
- It is sensitive to outliers – one extreme value can inflate it considerably.
- Paste numbers separated by commas, spaces or new lines; avoid thousands separators.
Frequently asked questions
Should I use sample or population standard deviation?
Use population (divide by N) when your data includes every member of the group you care about, such as all students in one class. Use sample (divide by n − 1) when the data is a subset used to estimate a larger group – this is the more common case in research and surveys.
Why does the sample formula divide by n − 1?
A sample’s values sit closer to its own mean than to the true population mean, so dividing by n would underestimate the spread. Dividing by n − 1 (Bessel’s correction) removes that bias from the variance.
What is the difference between variance and standard deviation?
Variance is the average squared distance from the mean; standard deviation is its square root. Standard deviation is easier to interpret because it is in the same units as the data.
What counts as a high standard deviation?
It depends on the scale of the data. Compare it to the mean using the coefficient of variation (SD ÷ mean): below about 10% the data is tightly clustered, above about 30% it is widely spread.