Skip to content

Standard deviation calculator

 —

Paste or type numbers separated by commas, spaces or new lines. Population standard deviation divides by n and is for a complete set; sample standard deviation divides by n − 1 and is for a sample drawn from a bigger group.

Sample standard deviation

2.1381

8 numbers with a mean of 5. Treated as the whole population, the standard deviation is 2.

Population SD (σ)
2
Sample SD (s)
2.1381
Mean
5
Median
4.5
Population variance
4
Sample variance
4.5714
Count
8
Range
2 to 9

Working, value by value

ValueMinus the meanSquared
2-39
4-11
4-11
4-11
500
500
724
9416
Sum of squares32

What standard deviation tells you

Standard deviation is a single number for how spread out a set of values is. Two classes can both average 70 marks, but in one most students score 65 to 75, while in the other scores range from 30 to 100. The second class has a much larger standard deviation.

Take the numbers 2, 4, 4, 4, 5, 5, 7 and 9. The mean is 40 ÷ 8 = 5. The squared distances from the mean are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32. Divide by 8 for the population variance of 4, and the population standard deviation is √4 = 2.

If those eight numbers are a sample from something larger, divide by 7 instead: 32 ÷ 7 = 4.571, and the sample standard deviation is about 2.1381. The table under the result shows this working line by line, which is what teachers usually want to see.

In a roughly bell-shaped set of data, about 68% of values sit within one standard deviation of the mean and about 95% within two. To see how far a single value is from the mean in those units, use the z-score calculator.

Sources

What this calculator does not account for

  • Working table shows the first 50 values.
  • Needs at least two numbers.

How this is calculated

Formula: Standard deviation

σ =√(Σ(x − μ)² ÷ n); s =√(Σ(x − x̄)² ÷ (n − 1))

What the symbols mean

  • xEach value.
  • μ or x̄The mean of the values.
  • nHow many values there are.
  • σ, sPopulation and sample standard deviation.

Good to know

Read the full methodologyFound an error? Contact us

Worked examples

Each example is worked out by the same code as the calculator above.

2, 4, 4, 4, 5, 5, 7, 9

Mean 5, population SD 2, sample SD 2.1381, median 4.5.

Embed this calculator

The frame shows the tool only.

<iframe src="/embed/standard-deviation-calculator" title="Standard deviation" width="100%" height="720" style="border:0;max-width:42rem" loading="lazy"></iframe>

Questions

How do you calculate standard deviation?

Find the mean, subtract it from each value, square the results, add them up, divide by n (population) or n − 1 (sample) and take the square root.

What is the difference between sample and population standard deviation?

Population SD divides by n and describes a complete group. Sample SD divides by n − 1, which corrects for estimating the spread of a bigger group from part of it.

Which one should I use?

If your numbers are every member of the group, use population. If they are a sample, such as 30 people from a city, use sample. Most statistics classes and Excel's STDEV use sample.

What is the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9?

The mean is 5 and the population standard deviation is exactly 2. The sample standard deviation is about 2.1381.

What does a large standard deviation mean?

The values are spread far from the mean. A small one means they cluster close to it.