Calculators

Standard Deviation Calculator

Find the mean, variance and standard deviation of a list of numbers.

Results are provided for general informational use. Verify important financial, health or legal figures before relying on them.

About this Standard Deviation Calculator

The Standard Deviation Calculator measures how spread out a list of numbers is from the mean. Choose population or sample mode depending on whether your numbers represent an entire group or a sample drawn from a larger group.

Standard deviation measures how spread out a set of numbers is around its mean, so two data sets can share the exact same average while having very different standard deviations, one tightly clustered and one widely scattered, which the mean alone would never reveal.

How the calculation works

Variance is the average of squared differences from the mean. Population variance divides by n; sample variance divides by n−1. Standard deviation is the square root of variance.

How to use it

  1. Paste or type numbers separated by spaces, commas or new lines.
  2. Choose population or sample standard deviation.
  3. Calculate to see the mean, variance and standard deviation.

Practical example

For the numbers 2, 4, 4, 4, 5, 5, 7, 9, the mean is 5 and the population standard deviation is 2.

The data sets {10, 10, 10, 10} and {1, 7, 13, 19} both have a mean of 10, but the first has a standard deviation of 0 since every value equals the mean exactly, while the second has a much larger standard deviation reflecting its wide spread.

Things to double-check

This tool's result will differ slightly depending on whether it calculates population standard deviation (dividing by the count) or sample standard deviation (dividing by the count minus one); sample standard deviation is generally the correct choice when your numbers are a subset drawn from a larger group rather than the entire group itself.

A worked example

Take the numbers 4, 8, 6, 5 and 7. Their mean is 6. The differences from the mean are minus 2, 2, 0, minus 1 and 1, and their squares add up to 10. For a population, divide by 5 to get a variance of 2 and a standard deviation of about 1.414. For a sample, divide by 4 to get a variance of 2.5 and a standard deviation of about 1.581. The tool shows the mean, variance and count so you can follow each step.

Population or sample?

Use the population setting when your numbers are every member of the group you care about, such as all 30 students in a class. Use the sample setting when the numbers are a sample from a larger group, such as 30 students picked from a school of 1,000. Dividing by one less than the count corrects for the fact that a sample tends to underestimate the spread of the whole group. If you are not sure, the sample option is the more usual choice in surveys and experiments.

What the number means

The standard deviation measures how far values typically sit from the mean, in the same units as the data. For data that follow a bell curve, about 68 percent of values lie within one standard deviation of the mean and about 95 percent within two. With a mean of 70 and a standard deviation of 10, most results fall between 60 and 80. A small value means the data are tightly packed, and a large one means they are widely spread.

Outliers

Because deviations are squared, one extreme value has a big effect. Adding 40 to the earlier list changes the mean to about 11.7 and the population standard deviation from 1.41 to about 12.7. Always look at the data for typing errors before you trust the result, and consider the median and range alongside it. The coefficient of variation, the standard deviation divided by the mean, helps compare the spread of data measured on different scales.

Comparing two groups

Two groups can have the same average and very different spreads. Suppose two classes both average 70 on a test, with a standard deviation of 5 in class A and 15 in class B. A score of 85 is three standard deviations above the mean in class A, which is rare, but only one standard deviation above in class B, which is common. This distance from the mean in standard deviation units is called a z-score. It lets you compare results from different tests and scales on equal terms.

Worked example: two shops with the same average

Shop A sells 48, 52, 50, 49 and 51 items on five days, and Shop B sells 20, 80, 50, 35 and 65. Both average 50. For Shop A, the deviations are minus 2, 2, 0, minus 1 and 1, with squares adding to 10, so the sample variance is 2.5 and the standard deviation is about 1.58. For Shop B, the deviations are minus 30, 30, 0, minus 15 and 15, with squares adding to 2,250, so the sample variance is 562.5 and the standard deviation is about 23.7. Shop A is steady and easy to plan for, while Shop B is unpredictable, even though their averages are identical.

Standard deviation and standard error

The standard deviation describes how spread out individual values are. The standard error describes how precisely the average is known, and it is the standard deviation divided by the square root of the number of observations. With a standard deviation of 10 and 25 observations, the standard error is 2, so the average is known within roughly plus or minus 4 at about a 95 percent level, as a rough guide. Taking more observations shrinks the standard error but does not change the spread of the underlying data. Confusing the two leads to over-confident or under-confident conclusions.

Volatility and quality control

In finance, the standard deviation of returns is a common measure of volatility. Yearly returns of 8, minus 4, 15, 6 and 2 percent have a mean of 5.4 percent and a sample standard deviation of about 7.1 percent, which means a typical year lands several points away from the average. In manufacturing, control charts use limits at three standard deviations from the mean to spot when a process drifts, since very few readings should fall outside them by chance. Both uses rely on the same arithmetic as the calculator, applied to different data.

Reading the number with care

The standard deviation works best for data that is roughly symmetric around its mean. For skewed data, such as incomes or waiting times, the median and the interquartile range may describe the spread better. Small samples give unstable estimates, so be cautious with fewer than about ten values. The result has the same units as the data, so a standard deviation of 5 kg means something different from 5 cm. Check for outliers and typing errors before you trust the result. If you want to compare data measured on different scales, convert values to z-scores, which measure distance from the mean in standard deviation units.

Key terms explained

The mean is the average of the values. The variance is the average squared distance from the mean, and the standard deviation is its square root. A population includes every member of a group, while a sample is a part of it, and the sample version divides by one less than the count. A z-score measures how many standard deviations a value is from the mean. The normal distribution is the bell curve. An outlier lies far from the rest, and the standard error describes the precision of a sample mean.

Rules of thumb and quick checks

For bell-shaped data, about 68 percent of values lie within one standard deviation of the mean, 95 percent within two and 99.7 percent within three. For a quick estimate of the spread, the range is roughly four standard deviations for a data set of about a hundred values. The variance equals the standard deviation squared. A z-score is the value minus the mean, divided by the standard deviation. If the result is zero, all values are equal.

Frequently asked questions

Population or sample: which should I choose?

Use population if your data is the entire group of interest; use sample if your data is a subset used to estimate a larger population.

Why does sample standard deviation divide by n−1?

This correction, called Bessel's correction, produces a less biased estimate of the population standard deviation from a sample.

Are negative numbers supported?

Yes.

What does a standard deviation of zero mean?

It means every value in the data set is identical, since there is no variation at all around the mean.

Why divide by n-1 instead of n for sample standard deviation?

Dividing by n-1 (Bessel's correction) compensates for the tendency of a sample to underestimate the true variability of the full population it was drawn from, giving a less biased estimate.

Keep exploring

More Calculators

View category →