How standard deviation is calculated
Standard deviation measures how spread out a set of numbers is. The steps are:
- Find the mean (average) of the data.
- Subtract the mean from each value and square the difference.
- Add up all the squared differences.
- Divide by N (population) or N − 1 (sample) to get the variance.
- Take the square root of the variance.
σ = √( Σ(x − mean)² ÷ N ) | s = √( Σ(x − mean)² ÷ (N − 1) )
Sample or population?
Choose population when your numbers are the entire group you care about — every employee, every test in a class. Choose sample when they are a subset standing in for a larger group, which is the more common case in statistics. The sample formula divides by N − 1 to correct the slight underestimate a sample gives, so it always returns a slightly larger value.
A quick example
For 10, 12, 23, 23, 16, 23, 21, 16 the mean is 18. The squared differences sum to 192, so the population standard deviation is √(192 ÷ 8) = √24 ≈ 4.90, and the sample standard deviation is √(192 ÷ 7) ≈ 5.24.
Frequently asked questions
How do you calculate standard deviation?
Find the mean of your data, subtract it from each value and square the result, add up those squared differences, divide by the count (population) or the count minus one (sample), then take the square root. That square root is the standard deviation — the average distance of values from the mean.
What is the difference between sample and population standard deviation?
Use population standard deviation when your data includes every member of the group you care about, dividing by N. Use sample standard deviation when your data is a sample drawn from a larger population, dividing by N − 1 (Bessel's correction), which corrects the slight underestimate a sample produces. The sample value is always a little larger.
What is variance?
Variance is the average of the squared differences from the mean — it is the standard deviation before you take the square root. It is useful in calculations but is in squared units, which is why standard deviation, in the original units, is usually reported instead.
What does a high standard deviation mean?
A high standard deviation means the values are spread out far from the mean; a low one means they cluster tightly around it. A standard deviation of zero means every value is identical. It only makes sense relative to the scale of your data — a deviation of 5 is large for test scores out of 10 but tiny for house prices.
Tip: Paste numbers separated by commas, spaces, or new lines — a whole spreadsheet column works, and non-numbers are ignored.