Skip to main content

Standard deviation calculator

Paste your numbers (add frequencies if you have a table). You get both standard deviations, the one that divides by n and the one that divides by n − 1, with the working for each.

Separate with spaces, commas or new lines.

One frequency per value, in the same order.

x̄ = 6.00,   σ = 1.87,   s = 2.00
n
8
Mean
6.00
σ (divide by n)
1.87
s (divide by n − 1)
2.00
Variance σ²
3.50
Median
6.00
Q1, Q3
4.50, 7.50
IQR
3.00
Graph loads here
Show the working

n = 8,   Σx = 48.0,   Σx² = 316

Mean x̄ = Σx ÷ n = 48.0 ÷ 8 = 6.00

Variance σ² = Σx² ÷ n − x̄² = 316 ÷ 8 − 6.00² = 3.50

σ = √3.50 = 1.87   (divide by n: the spread of these values)

s = √[Σ(x − x̄)² ÷ (n − 1)] = √(28.0 ÷ 7) = 2.00   (divide by n − 1: an estimate for the whole population)

Your calculator shows both: σx (or σn) is the first, sx (or sn−1) the second. Use the one the question asks for.

Answers are rounded to 3 significant figures. A Level questions usually say how accurate to be: follow the question.

How to do it by hand

  1. Find the mean: x̄ = Σx ÷ n (with a frequency table, Σfx ÷ Σf).
  2. Find the variance: σ² = Σx² ÷ n − x̄², or Σ(x − x̄)² ÷ n.
  3. Take the square root for σ. For an estimate of the population, divide by n − 1 instead: s = √[Σ(x − x̄)² ÷ (n − 1)].

Worked example

The number of goals scored in 20 matches is: 0 goals 3 times, 1 goal 6 times, 2 goals 5 times, 3 goals 4 times and 4 goals twice. Find the mean and standard deviation.

Solution

n = 20,   Σx = 36.0,   Σx² = 94.0

Mean x̄ = Σx ÷ n = 36.0 ÷ 20 = 1.80

Variance σ² = Σx² ÷ n − x̄² = 94.0 ÷ 20 − 1.80² = 1.46

σ = √1.46 = 1.21   (divide by n: the spread of these values)

s = √[Σ(x − x̄)² ÷ (n − 1)] = √(29.2 ÷ 19) = 1.24   (divide by n − 1: an estimate for the whole population)

Your calculator shows both: σx (or σn) is the first, sx (or sn−1) the second. Use the one the question asks for.

Answer: x̄ = 1.80,   σ = 1.21,   s = 1.24

Every number in this example is worked out by the same code as the tool above, and the code is tested against independent results from Python's SciPy library.

Where you need it

Mean and standard deviation from raw data or a frequency table (the large data set), and the coded-data questions. Most A Level boards use σ (divide by n) unless they ask for an unbiased estimate s² (divide by n − 1).

Practise it: Statistical sampling and data · IAL S1.

On your calculator

In the exam you use your own calculator, so practise it too. Our guides give the exact keystrokes for the Casio fx-CG50, TI-Nspire CX II, TI-84 Plus CE, Casio fx-991EX ClassWiz and Casio fx-991CW ClassWiz, with a worked example to check against:

Common mistakes

Questions students ask

What is the difference between σ and s?

σ divides by n and describes the spread of the values you have. s divides by n − 1 and is used to estimate the spread of the whole population from a sample. Calculators show both, usually labelled σx and sx.

How do I find the standard deviation from a frequency table?

Treat each value as appearing f times: n = Σf, the mean is Σfx ÷ Σf and the variance is Σfx² ÷ Σf − x̄². Type the values and the frequencies into the two boxes.

What happens to the standard deviation if I add a constant to every value?

Nothing: the spread is the same. Multiplying every value by k multiplies the standard deviation by |k| and the variance by k².

More maths tools