Standard Deviation Calculator
Paste a list of numbers for the mean, variance and standard deviation — sample and population side by side, so the n − 1 you need is the one you get.
How many values (n)
8
Mean
5
Sample standard deviation, divided by n − 1
2.1380899
Population standard deviation, divided by n
2
Sample variance
4.5714286
Population variance
4
Standard error of the mean
0.75592895
s = √( Σ(xᵢ − x̄)² / (n − 1) ) · σ = √( Σ(xᵢ − μ)² / n )
A standard deviation says how far a typical value sits from the mean, and there are two of them. Divide the summed squared deviations by n and you get the spread of the numbers you actually have; divide by n − 1 and you get an estimate of the spread of the population they came from. Almost everyone wants the second one and almost every spreadsheet offers both under names a keystroke apart, so this page shows them next to each other rather than making you choose before you see the difference.
How it is calculated
s = √( Σ(xᵢ − x̄)² / (n − 1) ) · σ = √( Σ(xᵢ − μ)² / n )
The n − 1 is called Bessel's correction and it exists because the mean you subtract was itself computed from the same data. The sum of squared deviations is smallest around that sample mean, so measuring spread from it understates the spread around the true mean. Dividing by n − 1 rather than n corrects that bias in the variance. What it does not mean is that a small sample gives you a reliable figure: the correction removes a systematic tilt, it does not remove the uncertainty, and from eight numbers the standard deviation is itself a rough estimate.
Questions people ask
- Should I use the sample or the population standard deviation?
- Use the sample figure, divided by n − 1, whenever your numbers are a sample and you want to say something about the wider group they came from — which is nearly always. Use the population figure, divided by n, only when your list is genuinely everything: all twelve months of last year, every employee on the payroll, all six faces of a die. If you are unsure, the honest answer is that you have a sample.
- What does a standard deviation of 2.14 actually tell me?
- That values in this data sit about two units away from the mean on average, in the same units as the data itself. What it does not tell you is that roughly two thirds of values fall within one deviation of the mean — that rule comes from the normal distribution, not from the standard deviation, and it fails badly for skewed data, for data with a long tail, and for anything with two humps in it. Look at the numbers before you trust the rule.
- What is the standard error of the mean, and how is it different?
- The standard deviation describes how spread out the individual values are. The standard error describes how much the mean itself would move if you took another sample of the same size, and it is the standard deviation divided by the square root of n. It is always the smaller number, and it shrinks as you collect more data while the standard deviation does not. Quoting a standard error as though it described the spread of the data makes the data look four or five times tidier than it is.
- Why does one value give no sample standard deviation?
- Because the denominator n − 1 would be zero. One measurement tells you nothing about how much the next one would differ from it. The population standard deviation of a single value is reported as zero, which is arithmetically true and practically useless — it says the list you have contains no variation, not that the thing you measured does not vary.
- How should I separate the numbers?
- Commas, spaces, semicolons and line breaks all work, so a column pasted straight out of a spreadsheet is fine. One thing to watch: a comma is treated as a separator here, never as a thousands mark, so write 1500 rather than 1,500 or you will get two values instead of one. The count is the first result on the page precisely so that mistake is visible.
- Does the calculator handle negative numbers and decimals?
- Yes to both. Squaring the deviations removes the sign, so negative values are no different from positive ones. Very large values that differ only in their last digits are the hard case for any calculator: this page is checked against the NIST reference data sets built to expose exactly that failure, and reproduces their certified figures.
Related tools
Confidence Interval Calculator
Turn a mean, a standard deviation and a sample size into a margin of error and an interval, with the Student t value the sample size actually calls for.
Z-Score Calculator
Turn a value, a mean and a standard deviation into a z-score, then into the share of a normal distribution below it, above it and outside it either way.
Percentage Calculator
Work out a percentage of a number, the result of adding or removing it, and the percentage change between two values — all at once.
Found a problem, or want more?
A number that disagrees with its source is a defect, not a rounding preference.
What did you enter, what did the tool show, and what did you expect instead? If you have a source that disagrees with ours, a link to it is the most useful thing you can send.
Opens your mail app with the page and tool already filled in.