Browse tools

Standard Deviation Calculator

Type or paste your numbers, separated by commas, spaces or new lines. Results update as you type.

42%
Sample standard deviation (s)
—
Population SD (σ)—
Mean—
Count (n)—
Sample variance—
Median—
Range—
Standard error of the mean—
Sum—

How to use this tool

  1. Type or paste your numbers, separated by commas, spaces or line breaks.
  2. Read the sample standard deviation, or the population figure if your data is the whole group.
  3. Use the mean, variance, median and standard error alongside it as needed.

Sample or population?

Use the sample standard deviation (divide by n − 1) when your numbers are a sample from a larger group, which is the usual case in research, lab work and surveys. Use the population figure (divide by n) only when you have every member of the group, such as the marks of all 30 students in one class. In Excel these are STDEV.S and STDEV.P.

The formulas

Sample: s = √( Σ(x − x̄)² ÷ (n − 1) ). Population: σ = √( Σ(x − μ)² ÷ n ). Variance is the same calculation without the square root. The standard error of the mean is s ÷ √n.

Worked example

Take the values 2, 4, 4, 4, 5, 5, 7, 9. There are 8 of them and they add up to 40, so the mean is 5.

ValueDifference from meanSquared
2−39
4, 4, 4−1 each1 + 1 + 1
5, 50 each0 + 0
724
9416

The squared differences add up to 32. For the population, 32 ÷ 8 = 4, and √4 = 2. For a sample, 32 ÷ 7 = 4.571, and the square root is 2.14.

What the number tells you

A small standard deviation means the values sit close to the mean; a large one means they are spread out. When data follow a normal distribution, about 68% of values lie within 1 standard deviation of the mean, about 95% within 2 and about 99.7% within 3. This is why many lab reference ranges are set at the mean ± 2 SD.

Standard deviation or standard error?

They answer different questions. Standard deviation describes how much individual values vary. Standard error describes how precisely the sample mean estimates the true mean, and it shrinks as the sample grows. In a paper, report the SD to describe your participants and the SE or a confidence interval to describe the precision of an estimate.

Frequently asked questions

How do you calculate standard deviation?

Find the mean, square each value's difference from it, add the squares, divide by n − 1 (sample) or n (population), then take the square root.

When do I divide by n − 1?

When your data is a sample from a larger population. Dividing by n − 1 corrects the tendency of a sample to underestimate the spread.

What is the difference between variance and standard deviation?

Variance is the average squared difference from the mean. Standard deviation is its square root, so it is in the same units as the data.

What is mean ± 2 SD?

For normally distributed data it covers about 95% of values, which is how many laboratory reference ranges are defined.

Which Excel function should I use?

STDEV.S for a sample and STDEV.P for a whole population.

Sources and references

  1. NIST/SEMATECH e-Handbook of Statistical Methods: Measures of scale
  2. Altman DG, Bland JM. Standard deviations and standard errors. BMJ 2005

Last reviewed by the Everyday Toolnest team. How we check our tools. Results are for general information; for legal, tax, medical or financial decisions, check with a qualified professional.

More everyday calculators

Also useful