How to Calculate Standard Deviation (Step by Step)
Updated June 2026
Mean, median, mode & std dev.
Standard deviation tells you how spread out a set of numbers is. A small value means they're clustered near the average; a large one means they're scattered.
The steps
- Find the mean (average) of your numbers.
- Subtract the mean from each number and square the result.
- Find the average of those squared differences โ that's the variance.
- Take the square root of the variance.
Worked example
Numbers: 4, 8, 6, 5, 3. Mean = 26 รท 5 = 5.2.
Squared differences: (4โ5.2)ยฒ=1.44, (8โ5.2)ยฒ=7.84, (6โ5.2)ยฒ=0.64, (5โ5.2)ยฒ=0.04, (3โ5.2)ยฒ=4.84. Sum = 14.8. Variance = 14.8 รท 5 = 2.96. Standard deviation = โ2.96 โ 1.72.
Population vs sample
If your numbers are the entire group, divide by the count (n) โ that's population standard deviation. If they're a sample used to estimate a bigger group, divide by (n โ 1) instead. The sample version is slightly larger to account for the uncertainty.
Mean, median, mode & std dev.
Frequently asked questions
When do I use n โ 1?
Use n โ 1 (sample) when your data is a subset you're using to estimate a larger population. Use n (population) when you have every value.
What's the difference between variance and standard deviation?
Variance is the average squared difference from the mean; standard deviation is its square root, which puts it back in the original units.