Paste your data set and get mean, variance, and standard deviation in seconds.
Standard deviation is the square root of the average squared distance each data point sits from the mean. For a sample, divide by n minus 1; for a whole population, divide by n. A small SD means values cluster tightly; a large SD means they are spread wide.
For a sample (the common case when you collected data from a subset of a population):
s = sqrt( sum((x - x_bar)^2) / (n - 1) )
Where x_bar is the sample mean and n is the number of data points. Dividing by n minus 1 (Bessel's correction) gives an unbiased estimate of the population spread.
For a population (when you have every value, not just a sample):
sigma = sqrt( sum((x - mu)^2) / n )
Data set: 4, 7, 13, 16
| Step | Calculation | Result |
|---|---|---|
| 1. Find the mean | (4 + 7 + 13 + 16) / 4 | 10 |
| 2. Subtract mean, square each | (4-10)^2, (7-10)^2, (13-10)^2, (16-10)^2 | 36, 9, 9, 36 |
| 3. Sum of squares | 36 + 9 + 9 + 36 | 90 |
| 4. Divide by n-1 (sample) | 90 / 3 | 30 (variance) |
| 5. Take square root | sqrt(30) | 5.48 (SD) |
The standard deviation is 5.48. Each value is, on average, about 5.5 units from the mean of 10.
Use the sample formula (divide by n minus 1) whenever your data is a sample drawn from a larger population, which is the most common case in research, surveys, and experiments. Use the population formula (divide by n) only when you have every single value in the group you care about (for example, the exact test scores of every student in one specific class, with no intention to generalize).
Standard deviation is in the same units as your original data. An SD of 5.48 on a data set measured in kilograms means values typically sit within about 5.48 kg of the mean. A larger SD signals more variability; a smaller SD signals less. In a normal distribution, roughly 68% of values fall within one SD of the mean, and about 95% fall within two SDs. See z-scores to put any single value in context relative to the SD.
The two most frequent errors are using the population formula on sample data (which underestimates variability) and forgetting to take the square root at the end (which gives the variance, not the SD). If your calculator or spreadsheet gives you a choice between STDEV and STDEVP (or SD and sigma), pick STDEV for sample data.
Paste your data set and get mean, variance, and standard deviation in seconds.
Mean = (5+5+5+9+9+9+10+10+10)/9 = 72/9 = 8. Squared deviations: (5-8)^2 = 9, repeated three times; (9-8)^2 = 1, three times; (10-8)^2 = 4, three times. Sum = 27 + 3 + 12 = 42. Sample variance = 42/8 = 5.25. Sample SD = sqrt(5.25) = approximately 2.29.
The fastest way is to paste your values into a calculator tool. In a spreadsheet, =STDEV(range) gives the sample SD instantly. For hand calculations, the shortcut formula s = sqrt( (sum of x^2 - n*x_bar^2) / (n-1) ) avoids computing each deviation separately.
The formula measures spread by squaring the distance from the mean (so negatives do not cancel positives), averaging those squared distances, then square-rooting back to the original units. Squaring punishes outliers more heavily than a simple average distance would, which makes SD sensitive to extreme values.
Sample SD: s = sqrt( sum((x - x_bar)^2) / (n - 1) ). Population SD: sigma = sqrt( sum((x - mu)^2) / n ). In both cases x_bar or mu is the mean, n is the count, and the sum runs over every data point.