The working
Every step, recomputed from whatever numbers are in the box above.
How it works
Standard deviation measures how far, on average, values sit from their mean. A small figure means the data clusters tightly; a large one means it is spread out. It is the square root of the variance, which exists because squaring the differences stops positive and negative gaps cancelling out.
mean = Σx ÷ n
variance = Σ(x − mean)² ÷ n (population)
variance = Σ(x − mean)² ÷ (n − 1) (sample)
standard deviation = √variance
The only difference between the two formulas is the divisor. Dividing by n − 1 rather than n makes the result slightly larger, correcting for the fact that a sample's own mean sits closer to its own values than the true population mean would. That adjustment is known as Bessel's correction.
Common questions
Sample or population — which should I pick?
Ask whether your numbers are the entire group you care about. Test scores for every student in a class you are describing? Population. Thirty customers surveyed to say something about thousands? Sample. When in doubt, sample is the safer choice, because it gives the slightly larger, more conservative figure.
Why square the differences at all?
Because values above and below the mean would otherwise cancel exactly to zero. Squaring makes every difference positive, and has the side effect of weighting large deviations more heavily than small ones — usually what you want when measuring spread.
Can I paste data straight from a spreadsheet?
Yes. A column copied from a spreadsheet arrives as one number per line, which parses cleanly. Commas, tabs and mixed spacing all work too — anything that is not a number is ignored rather than causing an error.