Standard deviation calculator

Paste a list of numbers and get the standard deviation straight away, for a sample or a whole population, together with the variance, the mean and the steps.

Type

Separate the numbers with a semicolon, space or new line. Commas work as long as you don't use decimal commas.

Fill in the fields; the answer appears here straight away.

How it works

  1. Enter the values

    Type the numbers or the formula. Decimals may use a point or a comma. No idea? Click Fill in an example.

  2. Instant answer

    The answer appears as you type, with the most important intermediate values.

  3. See the working

    Under "How it's worked out" you see the steps, handy for checking your own calculation.

Sample or population?

  • Sample (s): your numbers are a selection from a larger group, such as 50 people from a survey. You divide by n − 1. This is the usual choice, and what STDEV.S in a spreadsheet does.
  • Population (σ): your numbers are the entire group, such as all pupils in one class. You divide by n, like STDEV.P.

The difference is small for large lists, but noticeable for a handful of numbers.

How it works

  1. Work out the mean.
  2. Subtract the mean from every number and square the result.
  3. Add those squares up and divide by n − 1 (sample) or n (population). That is the variance.
  4. Take the square root: that is the standard deviation.

For 2, 4, 4, 4, 5, 5, 7 and 9 the mean is 5 and the population standard deviation is exactly 2. A small standard deviation means the numbers are close to the mean; a large one means they are spread out.

Reading the result

For the example list 2, 4, 4, 4, 5, 5, 7, 9, the mean is 5 and the squared differences add up to 32. The population variance is 32 ÷ 8 = 4, so σ = 2. The sample variance is 32 ÷ 7 ≈ 4.571, so s ≈ 2.138. The calculator shows both, so you can compare them with your spreadsheet's STDEV.S and STDEV.P.

What the number tells you

For data that is roughly bell-shaped, about 68% of the values lie within one standard deviation of the mean, about 95% within two and about 99.7% within three. If adult heights average 175 cm with a standard deviation of 7 cm, most adults are between 168 and 182 cm.

Before you start

Check the mean first with the average calculator, and compare with the median calculator to see whether outliers are pulling the numbers around. A single extreme value can change a standard deviation a lot.

Frequently asked questions

Should I use the sample or the population standard deviation?

Use the sample version when your numbers are a selection from a larger group, which is the usual case. Use the population version when you have every member of the group, such as all pupils in one class.

Why is the sample standard deviation larger?

It divides by n − 1 instead of n. A sample tends to underestimate the spread of the whole group, and dividing by one less corrects for that.

Can a standard deviation be zero or negative?

It is zero when all numbers are equal, and it is never negative, because it is a square root of an average of squares.

What is the difference between standard deviation and variance?

The variance is the standard deviation squared. It is expressed in squared units, such as cm², so the standard deviation, in the original unit, is easier to interpret.