Standard Deviation Calculator

Find the standard deviation, variance and mean of up to 15 numbers, as a population or a sample, with every step worked out in a table.

Your details

Population if you have every value; sample if they are a part of a larger group.

From 2 to 15.

Standard deviation

2

Mean
5
Variance
4
Count (n)
8
Sum (Σx)
40
Sum of squared deviations
32

Visual breakdown

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

  1. 1

    Add the values and divide by how many there are

    mean = Σx ÷ n

    = 40 ÷ 8

    = 5

    The 8 values: 2, 4, 4, 4, 5, 5, 7, 9.

  2. 2

    Subtract the mean from each value

    deviation = x − mean

    = each of the 8 values − 5

    = see the table

  3. 3

    Square each deviation and add them up

    Σ(x − mean)²

    = 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16

    = 32

  4. 4

    Divide by the count, for a whole population

    variance = Σ(x − mean)² ÷ n

    = 32 ÷ 8

    = 4

  5. 5

    Take the square root

    σ = √variance

    = √4

    = 2

Deviation from the mean

Mean 5. The squared deviations add up to 32.

#Valuex − mean(x − mean)²
12-39
24-11
34-11
44-11
5500
6500
7724
89416

The standard deviation shows how far values sit from their mean: for 2, 4, 4, 4, 5, 5, 7, 9 it is 2 as a population and about 2.138 as a sample. Choose population if you have every value, sample if you have part of a bigger group.

What this calculates

Enter up to 15 numbers and choose whether they are a whole population or a sample. This works out the mean, the variance and the standard deviation, and shows each step in a table: every value, its distance from the mean, and that distance squared.

The formula

Mean

μ = Σx ÷ n

Population

σ = √( Σ(x − μ)² ÷ n )

Sample

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

Σ means "add up", x is each value, n is how many there are, and μ or x̄ is the mean. The only difference between the two is the divisor: n for a population, n − 1 for a sample.

Worked example

Another set, 10, 12, 23, 23, 16, 23, 21, 16, has a mean of 18 and a population variance of 24, so a population standard deviation of about 4.899.

When to use it, and the mistakes to avoid

Use it to compare how consistent two sets of marks, prices or measurements are, to judge how reliable an average is, or to check homework step by step.

The mistakes that cost the most:

  • Using the wrong divisor. Most real data is a sample; dividing by n then understates the spread.
  • Comparing standard deviations of different units. Compare spread relative to the mean instead, or compare data in the same units.
  • Forgetting that a few extreme values pull it up. One outlier can dominate the result.
  • Rounding the mean first. Round only the final figure, or the squares drift.
  • Reading it as a range. The standard deviation is a typical distance from the mean, not the distance from the smallest to the largest value.

FAQ

Should I use the population or the sample standard deviation?

Use the population figure when your numbers are every value in the group, such as the marks of all 40 students in a class. Use the sample figure when they are a part of a larger group you want to say something about, such as 40 customers out of thousands.

Why does a sample divide by n − 1?

A sample's values sit closer to the sample's own mean than to the true mean of the whole group, so dividing by n would understate the spread. Dividing by n − 1 corrects for that. The difference shrinks as the sample grows.

What does the standard deviation tell me?

How far values typically sit from the mean, in the same units as the values. A small figure means they cluster close to the mean; a large one means they are spread out. For data shaped like a bell curve, about 68% of values fall within one standard deviation of the mean and about 95% within two.

How are variance and standard deviation related?

The standard deviation is the square root of the variance. Variance is in squared units, such as rupees squared, which is hard to read, so the square root brings it back to rupees.

Can the standard deviation be zero or negative?

It is zero when every value is the same, and it can never be negative, because it is a square root of an average of squares. If you get a negative result somewhere, the variance step has gone wrong.

Related calculators