Standard Deviation Calculator (Sample and Population, with Steps)
Paste your numbers to get the sample and population standard deviation, variance, mean and standard error, with every step shown. It runs in your browser.
Numbers
Separate with commas, spaces or new lines. Do not use thousands separators (write 1000, not 1,000).
Result
Steps
- Mean: 40 ÷ 8 = 5
- Subtract the mean from each value and square it (table below). The squares add up to 32.
- Population variance: 32 ÷ 8 = 4. Population standard deviation: √4 = 2.
- Sample variance: 32 ÷ 7 = 4.571429. Sample standard deviation: √4.571429 = 2.13809.
| Value (x) | x − mean | (x − mean)² |
|---|---|---|
| 2 | -3 | 9 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
How to use the standard deviation calculator
- Type or paste your numbers, separated by commas, spaces or new lines.
- Decide whether your numbers are a sample or the whole population.
- Read the matching standard deviation and variance, and follow the steps underneath.
Sample vs population standard deviation
- Population (σ): the numbers are everyone in the group, such as all the scores in one class. σ = √(Σ(x − mean)² ÷ n).
- Sample (s): the numbers are a sample from a bigger group, such as 30 customers out of thousands. s = √(Σ(x − mean)² ÷ (n − 1)).
- If you are unsure, use the sample figure. Statistics classes and surveys usually mean sample.
Worked example
For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the squared differences add up to 32. Population variance is 32 ÷ 8 = 4, so σ = 2. Sample variance is 32 ÷ 7 ≈ 4.571, so s ≈ 2.138.
Related tools
Find the mean, median and mode with the average calculator, work out percentages with the percentage calculator, or tidy the result with the rounding calculator.
See also
- Find the mean, median and mode with the average calculator.
- Work out percentages with the percentage calculator.
- Tidy up the result with the rounding calculator.
Frequently Asked Questions (FAQ)
Find the mean, subtract it from each value, square each difference and add them up. Divide by n for a population or n − 1 for a sample, then take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the squared differences add up to 32, and the population standard deviation is √(32 ÷ 8) = 2.
Use the population formula (divide by n) when your numbers are every member of the group you care about. Use the sample formula (divide by n − 1) when they are a sample drawn from a larger group. The sample result is always a little larger.
A sample sits 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) corrects for this.
Variance is the average squared distance from the mean. Standard deviation is its square root, which puts the spread back in the same units as your data.
The standard error of the mean is the sample standard deviation divided by the square root of n. It shows how precisely the sample mean estimates the population mean, and it shrinks as the sample grows.
A low value means the numbers sit close to the mean. A high value means they are spread out. A standard deviation of 0 means every value is identical. Compare it with the mean, or use the coefficient of variation, to judge whether it is large.
No. It is a square root, so it is zero or positive.
The sample formula divides by n − 1, which is 0 for one value. You need at least two numbers for a sample result. The population standard deviation of one number is 0.