Standard deviation formula
Standard deviation measures how spread out a data set is around its mean. It is the square root of the variance, the average of the squared distances from the mean.
- σ = the population standard deviation
- x = each value in the data set
- μ = the mean of the data
- N = the number of values
- Σ = sum over all values
Population versus sample
The formula shown is the population standard deviation, dividing by N. For a sample drawn from a larger population, divide by N minus 1 instead and use the sample mean; this Bessel correction gives a better estimate of the true spread. The sample version is the one used in most real-world statistics.
How to compute it
Find the mean, subtract it from each value to get the deviations, square those deviations, average them to get the variance, and take the square root. Squaring keeps negative and positive deviations from cancelling and gives more weight to values far from the mean.
- Data: 2, 4, 6, 8, 10. Mean = 6.
- Deviations: −4, −2, 0, 2, 4. Squared: 16, 4, 0, 4, 16.
- Sum of squares = 40; divide by N = 5 to get variance 8.
- Standard deviation = √8 ≈ 2.83.
Go deeper
Use the Standard Deviation Calculator, or read the Standard Deviation Guide.
FAQ
What is the standard deviation formula?
For a population, σ = √(Σ(x − μ)² / N): the square root of the average squared distance from the mean.
When do I divide by N minus 1?
When the data is a sample of a larger population. This correction makes the sample standard deviation a better estimate of the population value.
