StringMash.com

Standard deviation calculator

Sample and population standard deviation and variance, with the working shown.

22 characters
Updates as you type
Sample SD (s)2.1381
Population SD (σ)2
Sample variance (s²)4.5714
Population variance (σ²)4
Mean5
Count8
Sum of squares32
Both kinds, the variances and the working are below

Show the steps
246810mean
  1. Count: 8 values. Mean: 40 ÷ 8 = 5.
  2. Take the mean from each value and square the result:
  3. (2 − 5)² = 9
  4. (4 − 5)² = 1
  5. (4 − 5)² = 1
  6. (4 − 5)² = 1
  7. (5 − 5)² = 0
  8. (5 − 5)² = 0
  9. (7 − 5)² = 4
  10. (9 − 5)² = 16
  11. Add the squares: 32. This is the sum of squares.
  12. Divide by one less than the count, 8 − 1 = 7, because this is a sample (Bessel's correction): 32 ÷ 7 ≈ 4.5714. That's the sample variance.
  13. Take the square root: √4.5714 ≈ 2.1381. That's the sample standard deviation.

Using the calculator

Type or paste at least two numbers, separated by commas, spaces or new lines. Choose whether they are a sample or the whole population, and the standard deviation appears in the box. The sample and population figures are both listed below it, with the variances, the mean and the sum of squares.

The working takes the mean from each value and squares the result. Then it adds the squares and divides, and the square root of that is the answer. The plot shades one standard deviation either side of the mean.

What standard deviation measures

Standard deviation says how far the numbers typically sit from their mean. A small one means they are bunched close to the mean. A large one means they are spread out. The list 0, 5, 10 has the same mean as 4, 5, 6, but a much bigger standard deviation.

The variance is the standard deviation squared, which is the average of the squared distances from the mean. Squaring stops the distances above and below the mean from cancelling out. Taking the square root at the end brings the answer back to the same units as the data.

The example in the box, 2, 4, 4, 4, 5, 5, 7, 9, is the one Wikipedia uses. Its mean is 5, the squared distances add up to 32, and 32 ÷ 8 = 4, so the population standard deviation is √4 = 2.

Sample or population?

If your numbers are every member of the group you care about, such as the marks of everyone in one class, they are a population. Divide the sum of squares by the count, n, and the result is called σ (sigma).

If they are a sample taken to estimate a bigger group, divide by n − 1 instead, and the result is called s. This is Bessel's correction. A sample's values tend to sit closer to their own mean than to the true mean of the whole group, so dividing by n would come out too small on average, and the smaller divisor makes up for it.

Questions

Which one should I use for homework?

Use whichever the question asks for. If it gives a whole population, use σ. If it calls the data a sample, or asks you to estimate, use s. The calculator shows both.

Why do I need at least two numbers?

One number has no spread, and the sample formula would divide by 1 − 1 = 0.

What does a standard deviation of 0 mean?

Every value is the same, so none of them is any distance from the mean.

How is it different from the range?

The range uses only the largest and smallest values. Standard deviation uses every value, so one unusual number affects it less.

Are my numbers sent anywhere?

No. The calculations run in your browser.

Sources

Added and reviewed . What's new