How to Use This Tool
Paste your numbers. Both standard deviations are shown, because which one you want depends on your data rather than on the arithmetic.
The question that decides it
Ask: is this every value that exists, or a sample from something larger?
- Population — you measured every case. The height of everyone in this room, the salary of all twelve employees, the score of every test you ran. Divide by n.
- Sample — these values came from a larger group you are trying to describe. Divide by n−1.
Almost all real data is a sample. Survey responses are a sample of people. Last month's load times are a sample of all load times. Ten measurements are a sample of the measurements you could have taken. If you are drawing any conclusion beyond the exact numbers in front of you, it is a sample.
Why n−1 rather than n
Because you used the same data twice. The mean was calculated from your values, so your values are closer to that mean than they would be to the true mean of the whole population. Squared differences from your own mean are therefore systematically too small, and dividing by n would give a standard deviation that is systematically too low.
Subtracting one from the divisor corrects for that. The name for it is Bessel's correction, and the justification is that you spent one degree of freedom estimating the mean.
The spreadsheet trap
Excel and Google Sheets both ship STDEV.P and STDEV.S, and the names give no
hint that one of them is usually wrong for your data. Excel also keeps a legacy STDEV, which
is the sample version, and a legacy STDEVP, which is not.
The practical advice is to use STDEV.S unless you can state clearly why your data is a
complete population. If you cannot articulate what larger group it came from, that is worth pausing
over — it usually means it is a sample and you had not thought about it.
What standard deviation does not tell you
It is a summary, and summaries hide things. Two datasets with identical means and standard deviations can look completely different — one symmetric, one heavily skewed, one with two clusters. The familiar rules about 68% falling within one standard deviation assume a normal distribution, and most real data is not normal.
So look at the plot above as well as the number. If the values cluster in two groups, or trail off in one direction, the standard deviation is technically correct and is describing a shape your data does not have.
