By hand, step by step, with a worked example and the Excel formula.
Written & reviewed by Dackohn; last reviewed October 2026.
To calculate standard deviation: (1) find the mean, (2) subtract the mean from each value and square the result, (3) add up those squared differences, (4) divide by n−1 for a sample (or n for a whole population) to get the variance, and (5) take the square root. For 4, 8, 15, 16, 23, 42 the sample standard deviation is ≈ 13.49. Use n−1 when your data is a sample (the usual case).
Sample standard deviation: s = √( Σ(xi − x̄)² / (n − 1) ). Population: divide by N instead of n−1 and call it σ.
Data: 4, 8, 15, 16, 23, 42 (n = 6).
=STDEV.S(A1:A6)=STDEV.P(A1:A6)When your data is a sample, dividing by n−1 (Bessel’s correction) corrects a bias that would otherwise make the estimate too small. Use N only when your data is the entire population. Most real analyses use the sample version.
Standard deviation is the typical distance of a value from the mean, in the same units as the data. For data that are roughly bell-shaped, the 68–95–99.7 rule applies: about 68% of values lie within one SD of the mean, 95% within two, and 99.7% within three. If exam scores have mean 70 and SD 10, about two-thirds of students scored between 60 and 80.
In the worked example, the single value 42 has a large effect. Without it, the data 4, 8, 15, 16, 23 have mean 13.2 and a sample standard deviation of 7.40, roughly half of 13.49. Because deviations are squared, one far-away value can dominate the result. When data are skewed or contain outliers, report the median and interquartile range alongside, or instead of, the mean and standard deviation.
The variance (182 in the example) is the standard deviation squared. It is what statistical methods such as ANOVA work with internally, because variances from independent sources add up. For describing data to a reader, use the standard deviation: it is in the original units, so “scores vary by about 13 points” makes sense, whereas a variance of 182 “squared points” does not.
Skip the arithmetic: paste your numbers into the descriptive statistics calculator for the SD, variance, mean, and quartiles instantly.