Population formula
population SD = sqrt(sum((x - mean)^2) / n)
Sample formula
sample SD = sqrt(sum((x - mean)^2) / (n - 1))
Variables
- x: each value in the dataset.
- mean: the arithmetic average of the values.
- n: the number of values.
Worked example
For the dataset 2, 4, 4, 6, the mean is 4. The squared deviations are 4, 0, 0 and 4. Their sum is 8. Population variance is 8 / 4 = 2, so population standard deviation is sqrt(2) = 1.41. Sample variance is 8 / 3 = 2.67, so sample standard deviation is 1.63.
Sample vs population
Use the population formula when your data includes every value in the group you care about. Use the sample formula when your data is a sample used to estimate spread in a larger population. The sample formula divides by n - 1 to reduce bias in that estimate.
How to interpret the result
A larger standard deviation means values are more spread out around the mean. It does not say whether the distribution is symmetric, whether there are outliers, or whether the mean is the best center measure.
When the formula is not enough
The formula gives a spread measure, but interpretation still depends on how the data was collected, whether the values are a sample or population, and whether the distribution has outliers or strong skew.
Common mistakes
- Using population standard deviation for a sample estimate.
- Forgetting to square deviations before adding them.
- Interpreting standard deviation without checking for outliers or skew.
References
- NIST/SEMATECH e-Handbook: Measures of scale - standard deviation context, accessed 2026-05-17.