What the standard deviation tells you

The standard deviation is the most common summary of how widely values scatter around their mean. It is expressed in the same unit as the data, so a standard deviation of 2.3 kg describes a list of weights in kilograms. A small value means the numbers cluster tightly, and a large one means they are spread out. For data that follow a roughly bell-shaped distribution, about 68 percent of values fall within one standard deviation of the mean and about 95 percent within two. This page computes it for any list you enter, and it asks you to choose between the sample and population versions, because the two divide by different numbers and give different answers for the same data.

Sample versus population mode

Use population mode when your list contains every member of the group you care about, such as the exam scores of all students in one class when the class itself is the subject. Use sample mode when the list is a subset drawn from a larger group and you want to estimate the spread of that group, such as 25 widgets taken from a production line. Population mode divides the sum of squared deviations by n. Sample mode divides by n − 1, a choice known as Bessel's correction, which compensates for the fact that deviations measured from the sample mean are smaller on average than deviations from the unknown true mean. Sample mode needs at least two values.

The calculation, step by step

First find the arithmetic mean of the list. Subtract the mean from each value and square the result. Add the squares, divide by n or n − 1 according to the mode to get the variance, and take the square root. The default list 1, 2, 3 has a mean of 2, squared deviations of 1, 0 and 1, and a sum of 2. In sample mode the variance is 2 / 2 = 1 and the standard deviation is 1. In population mode the variance is 2 / 3 and the standard deviation is about 0.8165. The only difference is the denominator, and it shrinks as the list grows longer.

A worked example with eight values

The list 2, 4, 4, 4, 5, 5, 7, 9 has a mean of 5. The deviations are −3, −1, −1, −1, 0, 0, 2 and 4, whose squares are 9, 1, 1, 1, 0, 0, 4 and 16, a total of 32. Population mode divides by 8 to get a variance of 4 and a standard deviation of exactly 2. Sample mode divides by 7, giving a variance of about 4.5714 and a standard deviation of about 2.1381. Another list, 50, 60, 70, 80, 90, has a mean of 70 and a squared total of 1,000, so the sample result is about 15.8114 and the population result is about 14.1421. For two values such as 10 and 20, the sample result is about 7.0711 and the population result is 5.

How sample size changes the gap

The ratio between the sample and population results is the square root of n divided by n − 1. For 3 values it is about 1.2247. For 10 values it is about 1.0541, and for 100 values about 1.005. Beyond a few dozen observations, the choice of mode changes the second significant digit at most. With very short lists it matters a great deal, which is why the default of three values shows a visible difference. If you are unsure which mode applies, think about what the list represents and whether you intend to generalize beyond it. When in doubt, sample mode is the conventional choice for experimental or survey data.

Sensitivity to extreme values

Squaring the deviations gives large departures disproportionate weight, so a single outlier can dominate the result. In the list 1, 2, 3, 4, 100 the mean is 22 and the sample standard deviation is about 43.6, although four of the five values lie within 3 units of one another. Always look at the data before trusting the summary. Checking for entry errors, such as a misplaced decimal point, is the quickest fix. If the extreme value is genuine, consider reporting a robust measure such as the median absolute deviation alongside the standard deviation, so readers can see both the overall spread and the spread of the typical values.

Units and scaling

Adding a constant to every value leaves the standard deviation unchanged, because the spread is the same. Multiplying every value by a constant multiplies the standard deviation by the absolute value of that constant. Converting a list of lengths from meters to centimeters multiplies the result by 100. The variance, the square of the standard deviation, carries squared units, which is why people usually quote the standard deviation instead. If you need a relative measure that does not depend on units, divide the standard deviation by the mean to get the coefficient of variation, which has its own calculator on this site and applies to positive ratio-scale data only.

Reading the result for a small sample

With short lists the standard deviation is itself uncertain. Five measurements of a part length, say 9.8, 10.1, 10.0, 10.2 and 9.9 mm, have a mean of 10.0 mm and a sample standard deviation of about 0.1581 mm. A new batch of five could easily produce 0.10 or 0.25, so the figure is a rough indication of the process spread and not a precise value. Control charts and capability studies typically use dozens of observations before the standard deviation is trusted. Report the number of values with the result, and prefer sample mode for such data so that the estimate is not biased low on average. Quoting a standard deviation to many digits from five readings suggests precision that the data cannot support.

Accepted separators and decimal marks

Separate the numbers with commas, semicolons, spaces or line breaks and use a dot for decimals. A comma used as a decimal mark will split one number into two. At most 10,000 values are supported, and each must be finite. Sample mode needs at least two observations, because the denominator n − 1 would otherwise be zero. The page computes in floating point and displays up to 12 significant digits, so long decimals show representation noise and not extra precision. Save the mode with any result you share, since a sample and a population value for the same list are not interchangeable. The NIST handbook on exploratory data analysis discusses these measures of spread.