Standard deviation calculator

Paste your data to get sample and population standard deviation, variance, mean and count.

Sample standard deviation
Population standard deviation
Sample variance
Population variance
Mean
Count (n)

What standard deviation tells you

The mean tells you where the centre of your data sits; standard deviation tells you how far the values stray from that centre, in the same units as the data itself. Delivery times of 29, 30 and 31 minutes and delivery times of 10, 30 and 50 minutes share a mean of 30, but the second set is a very different customer experience. Standard deviation is the number that captures that difference.

population: σ = √( Σ(x − mean)² ÷ n )   ·   sample: s = √( Σ(x − mean)² ÷ (n − 1) )

Both formulas start the same way: find the mean, measure each value's deviation from it, square those deviations and add them up. The only difference is the final divisor, and that choice is what separates the two figures this calculator shows.

A worked example, step by step

Take the data set 2, 4, 4, 4, 5, 5, 7, 9. The sum is 40 and there are 8 values, so the mean is 5. The deviations from the mean are −3, −1, −1, −1, 0, 0, 2 and 4, and squaring each gives 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32.

Population: 2, 4, 4, 4, 5, 5, 7, 9
Variance = 32 ÷ 8 = 4, so σ = √4 = 2 exactly
Sample: the same eight values
Variance = 32 ÷ 7 ≈ 4.5714, so s = √4.5714 ≈ 2.1381
Test scores 60, 70, 80, 90, 100
Mean 80, squared deviations sum to 1,000. Population σ = √(1,000 ÷ 5) = √200 ≈ 14.14; sample s = √(1,000 ÷ 4) = √250 ≈ 15.81

Sample or population?

Use the population figure when your data is the whole story: every pupil in the class, every match of the season, every order your shop took last month. Nothing is being estimated, so dividing by n is correct.

Use the sample figure when your values stand in for a bigger group you could not measure in full, which covers most real data: a survey of 200 customers, a batch of 30 parts off a production line, a week of temperature readings. Dividing by n − 1 (Bessel's correction) compensates for the fact that deviations measured from the sample's own mean come out slightly too small on average. The sample figure is therefore always a little larger than the population figure, and the gap shrinks as n grows: with 8 values the two differ by about 7%, with 1,000 values by under 0.1%.

Note that the sample calculation needs at least two values, since dividing by n − 1 is impossible when n is 1. The tool shows a dash until you paste a second number.

Using the result

For roughly bell-shaped data, a useful rule of thumb is that about 68% of values fall within one standard deviation of the mean and about 95% within two. With the test scores above (mean 80, sample s ≈ 15.81), most scores would be expected between about 64 and 96. Values beyond two or three standard deviations are worth a second look as possible outliers or data entry mistakes.

If you only need the centre of your data rather than its spread, our mean, median and mode calculator takes the same paste-in list and breaks down the averages instead.

Frequently asked questions

What does standard deviation actually tell me?

It measures how spread out your values are around the mean, in the same units as the data. A small standard deviation means the values cluster tightly around the mean; a large one means they are widely scattered. Two data sets can share a mean yet have completely different standard deviations.

Should I use the sample or the population figure?

Use the population version only when your data is the entire group you care about, such as the test scores of every pupil in one class. Use the sample version when your data is a subset standing in for something bigger, which is the usual situation. If in doubt, use the sample figure.

Why does the sample formula divide by n minus 1?

Because deviations are measured from the sample mean, which always sits conveniently in the middle of your sample, the raw average of squared deviations understates the true spread. Dividing by n minus 1 instead of n corrects this bias. The adjustment is called Bessel's correction.

What is variance?

Variance is the standard deviation squared, the average of the squared deviations from the mean. It is central to statistics but awkward to interpret because its units are squared, for example pounds squared. Taking the square root gets you back to the data's own units, which is why standard deviation is quoted more often.

What does a standard deviation of 0 mean?

Every value in the data set is identical, so there is no spread at all. The standard deviation can never be negative, because it is calculated from squared deviations, which are always zero or positive.

Related tools