House of Calculator

Updated 5 October 2026 · By the House of Calculator team

Standard deviation is a measure of how spread out a set of numbers is around its mean. A small standard deviation means the values cluster close to the average; a large one means they are widely scattered. It is in the same units as the data, which makes it easy to interpret.

What standard deviation tells you

The mean alone can hide a lot. Two classes can both average 60 marks, yet in one almost everyone scored between 55 and 65, and in the other the marks ranged from 20 to 100. Standard deviation captures that difference in a single number.

Roughly speaking, it is the typical distance of a value from the mean. Where the data follow a bell-shaped (normal) distribution, about 68% of values fall within one standard deviation of the mean, about 95% within two and about 99.7% within three. That rule of thumb only applies to data that are roughly bell-shaped, so do not assume it for every data set.

If you only need the centre of the data, the mean, median and mode are covered by the Average, median and mode.

How to calculate it step by step

Take this data set: 2, 4, 4, 4, 5, 5, 7, 9.

  1. Find the mean. The total is 40 and there are 8 values, so the mean is 5.
  2. Subtract the mean from each value: −3, −1, −1, −1, 0, 0, 2, 4.
  3. Square each difference: 9, 1, 1, 1, 0, 0, 4, 16.
  4. Add the squares: 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32. This is the sum of squared deviations.
  5. Divide to get the variance. Divide by n (8) for the population variance: 4. Divide by n − 1 (7) for the sample variance: about 4.5714.
  6. Take the square root. The population standard deviation is √4 = 2. The sample standard deviation is √4.5714, about 2.138.

The variance is the standard deviation squared. It is useful in formulas but is in squared units, which is why people usually quote the standard deviation instead.

Sample or population: which formula?

The two formulas differ only in the divisor.

Population (σ) Sample (s)
When to use You have every value in the group Your values are a sample from a bigger group
Divisor n n − 1
Example result 2 about 2.138

A sample tends to understate the true spread of the whole group, because its values are closer to their own mean than to the true mean. Dividing by n − 1 corrects for that. In practice most data are samples (survey answers, measurements, test results from some of the students), so the sample figure is the usual choice. With large data sets the two numbers become very close.

A single value has no sample standard deviation, because n − 1 would be zero. The Standard deviation calculator shows a dash in that case.

Standard error of the mean

The standard error is the sample standard deviation divided by the square root of n. For the example above, 2.138 ÷ √8 is about 0.756.

It is not a measure of spread in the data. It describes how precisely the sample mean estimates the mean of the wider group. It shrinks as the sample gets larger: more data means a more reliable mean, even if the data themselves are just as spread out.

A second worked example

Take eight values: 10, 12, 23, 23, 16, 23, 21, 16. The mean is 18 and the sum of squared deviations is 192.

  • Population variance: 192 ÷ 8 = 24, so the standard deviation is about 4.899.
  • Sample variance: 192 ÷ 7, about 27.43, so the sample standard deviation is about 5.237.

Here the two values are noticeably different because there are only eight numbers. Reporting which one you used matters.

Common mistakes

  • Mixing up sample and population. State which you used, especially in coursework or reports.
  • Forgetting to square. If you add the plain differences, they sum to zero by definition.
  • Typing errors. One misplaced digit can inflate the result, so check your list.
  • Comparing across different scales. A standard deviation of 5 means something different for heights in centimetres than for annual salaries. Compare relative spread only after considering the means.

For percentages and proportions in your data, see our guides on How to calculate percentages and Percentage change, increases and discounts.

Note: This guide is general information for learning, not statistical or professional advice. The calculator gives estimates based on the numbers you enter.

Try the calculator

Paste your numbers into the Standard deviation calculator to see the sample and population standard deviation, variance, mean and standard error together. For the median and mode, use the Average, median and mode.

Open the free Standard deviation calculator

Worked example 3: exam marks and the z-score

Here are eight test marks: 62, 65, 70, 71, 74, 78, 80 and 95. Our standard deviation calculator gives:

Measure Value
Mean 74.375
Sample standard deviation (s) 10.295
Population standard deviation (σ) 9.630
Sample variance 105.98
Standard error of the mean 3.640

A z-score tells you how many standard deviations a value sits from the mean: z = (value − mean) ÷ standard deviation. Using the sample figure, the mark of 95 has a z-score of (95 − 74.375) ÷ 10.295, which is about 2.0. The mark of 62 has a z-score of about −1.2, and 80 has a z-score of about 0.5.

A z-score near 0 means a value is typical. Values beyond about 2 in either direction are unusual if the data are roughly bell-shaped. Here 95 stands out from the rest of the class, while six of the eight marks fall within one standard deviation of the mean (between about 64.1 and 84.7).

Comparing spread when the averages differ: the coefficient of variation

A standard deviation of 1.58 sounds small, but whether it is small depends on the size of the numbers. Compare two data sets:

Data set Values Mean Sample SD SD as % of mean
A 100, 102, 98, 101, 99 100 1.581 1.6%
B 10, 12, 8, 11, 9 10 1.581 15.8%

Both sets have exactly the same standard deviation, yet B is far more variable relative to its average. Dividing the standard deviation by the mean gives the coefficient of variation, usually shown as a percentage. It is useful for comparing things measured on different scales, such as the variability of a cheap item’s price and an expensive one. It only makes sense when the data are all positive and the mean is not close to zero. For working out percentages like these, see How to calculate percentages.

How outliers change the answer

Standard deviation squares each distance from the mean, so one extreme value has a big effect. Take 3, 5, 7 and 7. The mean is 5.5 and the sample standard deviation is 1.915. Add a single value of 38 and the picture changes:

Data Mean Median Sample SD
3, 5, 7, 7 5.5 6 1.915
3, 5, 7, 7, 38 12 7 14.629

One new number pushed the mean from 5.5 to 12 and multiplied the standard deviation by nearly eight, while the median moved only from 6 to 7. If your data may contain typing slips or genuine extremes, look at the median as well. Before removing an outlier, work out whether it is a mistake or a real observation. Deleting inconvenient values to make the spread look smaller is not good practice.

Where you meet standard deviation in everyday life

  • Test results and grading. Teachers and exam boards use spread as well as averages to compare cohorts.
  • Investments. The standard deviation of returns is often used as a rough measure of volatility. A higher figure means a bumpier ride, though not necessarily a worse one. Our Compound interest explained, with examples guide shows how steady growth builds up.
  • Manufacturing and measurement. A machine filling bags should hit the target weight with a small spread.
  • Surveys and research. Standard error, which comes from the standard deviation, helps show how reliable an average is.

Common mistakes with standard deviation

  • Using the population formula on a sample. This understates the spread, especially with small data sets.
  • Applying the 68-95-99.7 rule to skewed data. The rule works for bell-shaped data. Incomes, house prices and waiting times are often skewed, so it will mislead.
  • Quoting the variance as if it were in the original units. Variance is in squared units. Quote the standard deviation, or say clearly which you mean.
  • Reading too much into tiny samples. With three or four values, the standard deviation is a rough signal and nothing more.
  • Forgetting to say what the numbers are. Always state the count, the mean and which formula you used. To track changes in a measure over time, see Percentage increase and decrease, and reverse percentages.

Glossary

  • Mean: the sum of values divided by the count.
  • Deviation: the difference between one value and the mean.
  • Variance: the average of the squared deviations (divided by n or n − 1).
  • Standard deviation: the square root of the variance.
  • Standard error: the standard deviation divided by the square root of n.
  • z-score: a value’s distance from the mean in units of standard deviation.
  • Outlier: a value far from the rest of the data.

Frequently asked questions

What is a good standard deviation?

There is no universally good value. It depends on the units and what you are measuring, so judge it against the mean and what is normal for the data.

Can standard deviation be negative?

No. It is the square root of an average of squared numbers, so it is zero or positive. It is zero only when every value is identical.

Should I use n or n − 1?

Use n − 1 (sample) when your numbers are a sample from a larger group, which is most of the time. Use n (population) only when you have all the values.

What is the difference between variance and standard deviation?

Variance is the average squared distance from the mean, so it is in squared units. Standard deviation is its square root, back in the original units.

Is a higher standard deviation always worse?

No. It only means more spread. A wide spread may be a problem for a manufacturing process but perfectly normal for something like incomes or rainfall.

Can I calculate standard deviation from only two numbers?

Yes. With two values the sample standard deviation is the difference divided by √2. It is a very rough figure, so do not read much into it.

Why is the sum of deviations from the mean always zero?

Values above the mean are balanced exactly by values below it. That is why we square the deviations before adding them.

What does it mean if the standard deviation is zero?

Every value in the data set is identical. There is no spread at all.

Related calculators

More guides