Use population standard deviation when the data represents the whole population, and sample standard deviation when estimating population variation from a sample. The sample formula divides by n − 1.
Standard deviation measures how spread out numbers are around their mean. A small value means the numbers sit close to the average; a large value means they are scattered. It is in the same units as the data, which makes it easier to read than variance, which is in squared units.
The values are 10, 12, 23, 23, 16, 23, 21 and 16. Their sum is 144, so the mean is 144 ÷ 8 = 18. Subtract the mean from each value and square it:
| Value | Value − mean | Squared |
|---|---|---|
| 10 | -8 | 64 |
| 12 | -6 | 36 |
| 23 | 5 | 25 |
| 23 | 5 | 25 |
| 16 | -2 | 4 |
| 23 | 5 | 25 |
| 21 | 3 | 9 |
| 16 | -2 | 4 |
| Total | 0 | 192 |
The squared differences add up to 192. For a population, the variance is 192 ÷ 8 = 24 and the standard deviation is √24 = 4.899. For a sample, divide by 7 instead: the variance is 27.4286 and the standard deviation is 5.2372. The standard error of the mean is 1.7321 for the population setting (4.899 ÷ √8) and 1.8516 for the sample setting.
Use population when your data covers every member of the group, such as all the test scores in one class. Use sample when the data is only part of a larger group you want to learn about, such as 50 customers out of thousands. Dividing by N − 1 corrects for the fact that a sample’s own mean sits closer to its values than the true mean does, so the spread would otherwise be underestimated. For the values 2, 4 and 6 the mean is 4, the population variance is 8/3 = 2.6667 and the sample variance is 8/2 = 4. The gap between the two shrinks as N grows.
Two exam classes can both average 70, but if one class scored between 68 and 72 and the other between 30 and 100, they need different teaching. Always report spread next to the mean.
For data that follows a bell-shaped (normal) distribution, about 68% of values lie within one standard deviation of the mean, 95% within two and 99.7% within three. The rule is a guide, not a law: skewed data or data with outliers does not follow it.
The calculator also turns the standard error into a range for the true mean at several confidence levels, using the z-scores 1, 1.645, 1.96, 2.576 and 3.291. For the default numbers in the population setting:
| Confidence | Mean ± margin | As a share of the mean |
|---|---|---|
| 68.3% | 18 ± 1.7321 | ±9.62% |
| 90% | 18 ± 2.8492 | ±15.83% |
| 95% | 18 ± 3.3948 | ±18.86% |
| 99% | 18 ± 4.4618 | ±24.79% |
| 99.9% | 18 ± 5.7002 | ±31.67% |
A 95% confidence level means that if you repeated the sampling many times, about 95% of the intervals built this way would contain the true mean. These ranges use the normal z-scores, which suit larger samples; with very few values a t-based interval is wider.
The standard error shrinks as the sample grows, so larger samples give tighter ranges for the mean:
| Sample size (n) | Standard error |
|---|---|
| 4 | 2.4495 |
| 8 | 1.7321 |
| 16 | 1.2247 |
| 32 | 0.866 |
| 64 | 0.6124 |
| 128 | 0.433 |
Compare the standard deviation with the mean. Here 4.9 against a mean of 18 means a typical value is within about 4.9 of the average. A value more than two standard deviations from the mean is unusual and worth checking. To see how unusual a single value is, use the Z-score Calculator, and for a range around the mean use the Confidence Interval Calculator.
This is Bessel's correction. A sample's own mean is the value that minimizes the sum of squared differences for that sample, so dividing by N slightly underestimates the true spread. Dividing by N-1 corrects the bias.
Sample standard deviation is undefined for a single value because it would divide by zero. The population standard deviation of a single value is 0, since the value equals the mean.
Variance is the average squared difference from the mean. Standard deviation is its square root, which puts the spread back in the units of your data.
It is the standard deviation divided by the square root of N and describes how much the sample mean would vary if you repeated the sampling. It shrinks as the sample grows.
It is relative. Compare it with the mean: a standard deviation of 5 is large for numbers near 10 but small for numbers near 10,000.
No. It is a square root of an average of squares, so it is zero or positive. It is zero only when every value is the same.
Pick another tool to jump straight to it.