Standard Deviation Calculator

Use population standard deviation when the data represents the whole population, and sample standard deviation when estimating population variation from a sample. The sample formula divides by n − 1.

Quick answer. Standard deviation shows how far values typically sit from their mean. For 10, 12, 23, 23, 16, 23, 21 and 16 the mean is 18, the population standard deviation is 4.899 and the sample standard deviation is 5.237.

What standard deviation tells you

Standard deviation measures how spread out numbers are around their mean. A small value means the numbers sit close to the average; a large value means they are scattered. It is in the same units as the data, which makes it easier to read than variance, which is in squared units.

The formulas

  • Mean: add the values and divide by how many there are (N).
  • Variance: add up the squared differences from the mean, then divide by N (population) or N − 1 (sample).
  • Standard deviation: the square root of the variance.
  • Standard error of the mean: the standard deviation divided by the square root of N.

Worked example with the default numbers

The values are 10, 12, 23, 23, 16, 23, 21 and 16. Their sum is 144, so the mean is 144 ÷ 8 = 18. Subtract the mean from each value and square it:

ValueValue − meanSquared
10-864
12-636
23525
23525
16-24
23525
2139
16-24
Total0192
Squared difference from the mean for each default value (mean = 18)The squared differences add up to 192. Values far from the mean, like 10 (64), contribute the most.Squared difference from the mean for each default value (mean = 18)10641236232523251642325219164
Squaring makes every difference positive and gives more weight to values far from the mean.

The squared differences add up to 192. For a population, the variance is 192 ÷ 8 = 24 and the standard deviation is √24 = 4.899. For a sample, divide by 7 instead: the variance is 27.4286 and the standard deviation is 5.2372. The standard error of the mean is 1.7321 for the population setting (4.899 ÷ √8) and 1.8516 for the sample setting.

Population or sample?

Use population when your data covers every member of the group, such as all the test scores in one class. Use sample when the data is only part of a larger group you want to learn about, such as 50 customers out of thousands. Dividing by N − 1 corrects for the fact that a sample’s own mean sits closer to its values than the true mean does, so the spread would otherwise be underestimated. For the values 2, 4 and 6 the mean is 4, the population variance is 8/3 = 2.6667 and the sample variance is 8/2 = 4. The gap between the two shrinks as N grows.

Same average, different spread

Same mean of 50, very different spread: population standard deviationBoth lists average 50, but A has a standard deviation of 1.414 and B has 21.213, about 15 times larger.Same mean of 50, very different spread: population standard deviationData set A (48 to 52)1.414Data set B (20 to 80)21.213
The average alone cannot tell these two lists apart; the standard deviation can.

Two exam classes can both average 70, but if one class scored between 68 and 72 and the other between 30 and 100, they need different teaching. Always report spread next to the mean.

The 68-95-99.7 rule

For data that follows a bell-shaped (normal) distribution, about 68% of values lie within one standard deviation of the mean, 95% within two and 99.7% within three. The rule is a guide, not a law: skewed data or data with outliers does not follow it.

The 68-95-99.7 rule for a roughly bell-shaped data set (default mean and standard deviation)If the data are close to normal, about 68% of values fall within 13.1 and 22.9 and about 95% within 8.2 and 27.8.The 68-95-99.7 rule for a roughly bell-shaped data set (default mean and standard deviation)2.1%13.6%68.3%13.6%2.1%Mean 18
With the default mean and standard deviation, one standard deviation covers roughly 13.1 to 22.9.

The margin of error table

The calculator also turns the standard error into a range for the true mean at several confidence levels, using the z-scores 1, 1.645, 1.96, 2.576 and 3.291. For the default numbers in the population setting:

ConfidenceMean ± marginAs a share of the mean
68.3%18 ± 1.7321±9.62%
90%18 ± 2.8492±15.83%
95%18 ± 3.3948±18.86%
99%18 ± 4.4618±24.79%
99.9%18 ± 5.7002±31.67%

A 95% confidence level means that if you repeated the sampling many times, about 95% of the intervals built this way would contain the true mean. These ranges use the normal z-scores, which suit larger samples; with very few values a t-based interval is wider.

Why sample size matters

The standard error shrinks as the sample grows, so larger samples give tighter ranges for the mean:

Sample size (n)Standard error
42.4495
81.7321
161.2247
320.866
640.6124
1280.433
Standard error of the mean for a standard deviation of 4.899Quadrupling the sample size halves the standard error. At n = 8 it is 1.732 and at n = 32 it is 0.866.Standard error of the mean for a standard deviation of 4.899n = 42.449n = 81.732n = 161.225n = 320.866n = 640.612n = 1280.433
The standard deviation of the data stays the same; only the uncertainty about the mean falls.

Common mistakes

  • Using the sample formula when you really have the whole population, or the other way around.
  • Reading a large standard deviation as an error. It may be a real feature of the data.
  • Applying the 68-95-99.7 rule to skewed data.
  • Entering values with a comma inside a number such as 1,200. Separate numbers with commas or spaces and write 1200.
  • Calculating a sample standard deviation from a single value, which is not defined.

How to read your result

Compare the standard deviation with the mean. Here 4.9 against a mean of 18 means a typical value is within about 4.9 of the average. A value more than two standard deviations from the mean is unusual and worth checking. To see how unusual a single value is, use the Z-score Calculator, and for a range around the mean use the Confidence Interval Calculator.

This tool describes the numbers you enter. It does not test whether data are normal or whether differences are statistically significant.

What to do next

Common questions

Why does sample standard deviation divide by N-1 instead of N?

This is Bessel's correction. A sample's own mean is the value that minimizes the sum of squared differences for that sample, so dividing by N slightly underestimates the true spread. Dividing by N-1 corrects the bias.

What if I only have one data point?

Sample standard deviation is undefined for a single value because it would divide by zero. The population standard deviation of a single value is 0, since the value equals the mean.

What is the difference between variance and standard deviation?

Variance is the average squared difference from the mean. Standard deviation is its square root, which puts the spread back in the units of your data.

What is the standard error of the mean?

It is the standard deviation divided by the square root of N and describes how much the sample mean would vary if you repeated the sampling. It shrinks as the sample grows.

What counts as a high standard deviation?

It is relative. Compare it with the mean: a standard deviation of 5 is large for numbers near 10 but small for numbers near 10,000.

Can standard deviation be negative?

No. It is a square root of an average of squares, so it is zero or positive. It is zero only when every value is the same.

Sources: NIST/SEMATECH e-Handbook: Measures of Scale

More Math Calculators

Pick another tool to jump straight to it.