Country & language

Sets the currency, units and country-specific rules (tax, VAT, salary) in calculators. General tools stay the same.

Pages that are not translated yet open in English.

↑ ↓ to move · Enter to open · Esc to close

Standard Deviation Calculator

Paste numbers separated by commas, spaces or new lines and say whether they are a sample or the whole population. You get that standard deviation and the other one beside it, the variance, the standard error, how many values fall within 1 and 2 SD, and each value’s deviation and z-score.

Quick answer: For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the squared deviations add up to 32. As a population, variance = 32 ÷ 8 = 4 and σ = √4 = 2; as a sample, variance = 32 ÷ 7 = 4.571429 and s = 2.13809.

Updated · Free · No sign-up

Standard Deviation Calculator inputs

Separate values with commas, spaces or new lines.

Result

Population standard deviation (σ)

2

Variance (σ²)
4
Mean
5
Sample SD (s, divide by n − 1)
2.13809
Count
8
Sum of squares
32
Coefficient of variation
40%
Range
7 (2 to 9)
Mean ± 1 SD: 3 to 76 of 8 values (75%)
Mean ± 2 SD: 1 to 98 of 8 values (100%)

For bell-shaped data expect about 68% within 1 SD and 95% within 2 SD.

Step by step

  1. Mean: 40 ÷ 8 = 5
  2. Subtract the mean from each value and square the result (see the table below)
  3. Add the squares: Σ(x − mean)² = 32
  4. Divide by N = 8: variance = 32 ÷ 8 = 4
  5. Take the square root: σ = √4 = 2

Deviations from the mean (5)

#xx − mean(x − mean)²z-score
12−39−1.5
24−11−0.5
34−11−0.5
44−11−0.5
55000
65000
77241
894162

What the standard deviation measures

An average tells you where the middle of the data is; the standard deviation tells you how far the values typically stray from it. Two classes can both average 70: one where every student scored 70 (standard deviation 0) and one with marks of 40, 55, 70, 85 and 100 (σ = 21.213203). The mean is identical, the experience of teaching them is not. That is why the US Common Core asks high-school students to compare data sets by spread as well as centre, and why the NIST statistics handbook lists the standard deviation as the standard measure of scale for roughly bell-shaped data.

σ = √( Σ(x − μ)² ÷ N ) · s = √( Σ(x − x̄)² ÷ (n − 1) ) · z = (x − mean) ÷ SD

σ (sigma) is the population standard deviation and s the sample standard deviation. The working is the same until the last division: N for a population, n − 1 for a sample.

Worked examples

The textbook list: 2, 4, 4, 4, 5, 5, 7, 9

The mean is 40 ÷ 8 = 5. The deviations are −3, −1, −1, −1, 0, 0, 2 and 4; their squares, 9, 1, 1, 1, 0, 0, 4 and 16, add up to 32. As a population, the variance is 32 ÷ 8 = 4 and σ = 2. As a sample, the variance is 32 ÷ 7 = 4.571429 and s = 2.13809. Six of the eight values (75%) lie within one SD of the mean, 3 to 7, and all eight lie within two.

One class’s test marks

Ten students scored 72, 85, 90, 64, 78, 88, 95, 70, 82 and 76. They are the whole class, so this is a population: the mean is 80, the squared deviations add up to 858, the variance is 85.8 and σ = 9.262829 marks. The top mark, 95, has a z-score of (95 − 80) ÷ 9.262829 = 1.619; the lowest, 64, is at −1.727. If the same ten marks were used to estimate how the whole year group performs, the sample figure, s = 9.763879, would be the right one. The coefficient of variation, 9.262829 ÷ 80 = 11.58%, lets you compare this spread with a test marked out of a different total.

Monthly fund returns

Twelve monthly returns of 1.2, −0.8, 2.5, 0.4, −1.6, 3.1, 0.9, −0.3, 1.8, −2.2, 0.6 and 1.4% are a sample of how the fund behaves, so use s: the mean is 0.583333% a month and s = 1.59193%. Fund fact sheets usually quote volatility per year, conventionally the monthly figure × √12 – here about 5.5146%. That conversion assumes one month’s return does not predict the next; twelve months is also a short history, so treat the figure as a rough guide. The coefficient of variation is not meaningful here because the mean is close to zero.

Which formula, and which spreadsheet function?

Your dataUseExcel / Google Sheets2, 4, 4, 4, 5, 5, 7, 9 gives
Every member of the group (whole class, all 12 months you report on)Population σ, ÷ NSTDEV.P · VAR.Pσ = 2 · σ² = 4
Part of a larger group (survey, test batch, past returns)Sample s, ÷ (n − 1)STDEV.S · VAR.S (old STDEV, VAR)s = 2.13809 · s² = 4.571429
Precision of a sample meanStandard error, s ÷ √nSTDEV.S(range)/SQRT(COUNT(range))0.755929

The calculator always shows the other standard deviation next to the one you chose, so a wrong guess costs nothing. With large data sets the two converge; with a handful of values they differ noticeably.

Reading the result

  • The 68–95–99.7 rule. For data that is roughly bell-shaped, about 68% of values fall within 1 SD of the mean, 95% within 2 SD and 99.7% within 3 SD. The calculator counts how many of your values actually do – the class marks have 6 of 10 (60%) within 1 SD and all 10 within 2. A big mismatch is a hint the data is skewed or has outliers, and the rule should not be used.
  • Standard deviation vs standard error. Six weighings of a 10 g reference – 9.98, 10.02, 10.01, 9.97, 10.03 and 10.00 g – have s = 0.023166 g: any single weighing is typically about 0.02 g off. Their mean, 10.001667 g, has a standard error of 0.023166 ÷ √6 = 0.009458 g. More weighings shrink the standard error, not the standard deviation.
  • Outliers dominate. Because deviations are squared, one wild value inflates the result. Check the deviation table: a z-score beyond ±3 deserves a second look before you report the figure.
  • A quick sanity check. For moderate-sized, bell-shaped data the standard deviation is often near range ÷ 4. The class marks have a range of 31 and σ of 9.26 – the right order of magnitude. If your answer is far off, look for a typing error.

Common mistakes

  • Picking the wrong divisor. Homework on “the data set” usually means population; anything that generalises beyond the numbers in front of you is a sample.
  • Forgetting the square root. 4.571429 is the variance; the standard deviation is 2.13809.
  • Rounding the mean first. With a mean of 0.583333, rounding it to 0.6 before squaring distorts every deviation. Round only the final answer.
  • Thousands separators. Commas split values, so “12,000” becomes 12 and 0 and inflates the spread enormously. Write 12000; the calculator warns you if it spots the pattern.
  • Using SD on categories or ranks. The standard deviation of shoe sizes sold, star ratings or ID codes means little; describe those with counts and the mode.

When to get help

The standard deviation is the right summary for the spread of measurements, scores and returns. For confidence intervals, hypothesis tests or quality-control limits it is only the first step – the sample size, the shape of the distribution and the method your course, regulator or journal requires all matter. Use the confidence interval, z-score or sample size calculators for those steps, and for research, clinical or regulatory work have the analysis checked by a statistician.

Frequently asked questions

What is standard deviation in simple terms?

It is the typical distance of the values from their mean, in the same units as the data. Class marks of 72 to 95 with a mean of 80 have a standard deviation of about 9.26 marks: most students scored within 9 or so marks of 80.

How do you calculate standard deviation by hand?

Find the mean, subtract it from each value, square the differences, add them up, divide by N (population) or n − 1 (sample), and take the square root. For 2, 4, 4, 4, 5, 5, 7, 9: mean 5, squares sum to 32, 32 ÷ 8 = 4, √4 = 2.

Should I use sample or population standard deviation?

Use population (÷ N) when the data is the whole group you are describing – every student in one class, every month you are reporting on. Use sample (÷ n − 1) when the data stands in for a bigger group – a survey, a test batch, past returns used to judge the future. The same 8 values give σ = 2 and s = 2.13809.

Why does the sample formula divide by n − 1?

Values sit closer to their own sample mean than to the true population mean, so dividing the squared deviations by n underestimates the spread. Dividing by n − 1 (Bessel’s correction) makes the sample variance an unbiased estimate of the population variance; the difference fades as n grows – 32 ÷ 7 vs 32 ÷ 8 is 14% apart, but with 1,000 values it is 0.1%.

What is the difference between variance and standard deviation?

Variance is the mean squared deviation; standard deviation is its square root. Class marks with a variance of 85.8 marks² have a standard deviation of 9.26 marks – the square root brings the answer back to the data’s own units.

What does a z-score tell me?

How many standard deviations a value is from the mean: z = (x − mean) ÷ SD. In the class with mean 80 and σ = 9.262829, a mark of 95 has z = 1.619 and a mark of 64 has z = −1.727. The calculator lists the z-score of every value.

Which Excel function should I use – STDEV.S or STDEV.P?

STDEV.S is the sample standard deviation (n − 1) and STDEV.P the population one (N); VAR.S and VAR.P give the variances. The older STDEV matches STDEV.S. =STDEV.P(2,4,4,4,5,5,7,9) returns 2 and =STDEV.S of the same values returns 2.13809.

What is the standard error, and how is it different?

The standard deviation describes the spread of individual values; the standard error of the mean, s ÷ √n, describes how precisely the sample mean estimates the true mean. Six repeat measurements averaging 10.001667 g with s = 0.023166 g give a standard error of 0.009458 g.

What changed

  • – Page fully reviewed: the calculator now shows the sample and population standard deviations side by side, the standard error of the mean, the range, how many values lie within 1 and 2 SD of the mean, a z-score for every value, and a warning when a thousands comma split a number; new worked examples, an Excel function table and sources.

Sources

Last reviewed: · Reviewed by Chelsea, CalcBright's animated guide, for the CalcBright editorial team · How we check our numbers