Standard Deviation Calculator
Standard Deviation: 0
| Value | Deviation from Mean | Squared Deviation |
|---|
Population vs. Sample Standard Deviation
Standard deviation measures how spread out a set of numbers is around its mean. There are two standard formulas, and the correct one depends on whether your data is the entire population or a sample drawn from a larger population. Population standard deviation divides the sum of squared deviations by n (the number of values). Sample standard deviation divides by n − 1 instead — a correction known as Bessel's correction, which compensates for the fact that a sample's mean is itself an estimate and tends to slightly understate the true spread if divided by n. Use population when your data set is the complete group you care about (e.g. test scores for every student in a class); use sample when your data is a subset used to estimate a larger population's variability (e.g. a survey of 50 customers out of thousands).
The Formula, Step by Step
For a data set of values x₁, x₂, ..., xₙ with mean x̄: first find each value's deviation from the mean (xᵢ − x̄), then square each deviation (this makes negative and positive deviations both count as positive spread and penalizes larger gaps more heavily), then sum the squared deviations. Variance is that sum divided by n (population) or n − 1 (sample). Standard deviation is simply the square root of variance, which brings the units back in line with the original data instead of squared units. The table above shows every one of these intermediate steps for your entered data set so you can verify the arithmetic by hand.
Related Tools
If you need other summary statistics — mean, median, mode, range, and more — alongside standard deviation, try the full statistics calculator. To turn this same data into a confidence interval or margin of error for a larger population, see the confidence interval calculator.
Frequently Asked Questions
Should I use population or sample standard deviation?
Use population standard deviation (divide by n) when your data set is the entire group you care about, such as every employee's salary at a small company. Use sample standard deviation (divide by n minus 1) when your data is a subset used to estimate a larger population, such as a survey of 200 out of 50,000 customers. Sample standard deviation is used far more often in practice because complete population data is rarely available.
Why do you square the deviations instead of just averaging them?
If you averaged the raw deviations from the mean, positive and negative differences would cancel out and always sum to zero, hiding the actual spread. Squaring makes every deviation positive before averaging, and it also weights larger deviations more heavily. Taking the square root at the end (to get standard deviation from variance) brings the result back into the same units as your original data.