Variance Calculator

Paste your numbers and pick sample or population. You get the variance, the standard deviation and every step in between.

Separate numbers with commas, spaces or new lines. You can paste a column from a spreadsheet.

5 numbers read

Your data is a:

Sample variance of 5 values

Sample variance (s²)

2.5

Sample standard deviation (s)
1.5811
Mean (x̄)
7
Count (n)
5
Sum of squares (SS)
10
Population variance
2
if you divide by n instead
Standard error (s/√n)
0.7071

Showing the sample variance (divides by n − 1). Results are rounded to 4 decimal places.

How the variance was calculated

  1. Find the mean. Add the 5 values and divide by 5.x̄ = (5 + 6 + 7 + 8 + 9) ÷ 5 = 35 ÷ 5 = 7
  2. Subtract the mean from each value, then square the result. For the first value:(5 − 7)² = (−2)² = 4The table below does this for every value.
  3. Add the squared differences to get the sum of squares, SS.SS = 4 + 1 + 0 + 1 + 4 = 10
  4. Divide by n − 1 to get the sample variance. Dividing by one less than the count (Bessel’s correction) stops a sample from understating the spread of the whole population.s² = 10 ÷ (5 − 1) = 10 ÷ 4 = 2.5
  5. Take the square root of the variance to get the standard deviation, which is back in the same units as your data.s = √2.5 = 1.5811

Deviations table

Each value, its difference from the mean and that difference squared
xx − x̄(x − x̄)²
5-24
6-11
700
811
924
Sum010

The differences from the mean always add up to 0 (allowing for rounding), which is why they are squared before adding.

Variance formulas

Sample variance

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

Population variance

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

The top line, Σ(x − x̄)², is the sum of squares (SS). Both versions use the same sum of squares; they only divide it by different numbers.

Worked example: five quiz scores

A student scored 5, 6, 7, 8, 9 on five quizzes out of 10.

Score xx − 7(x − 7)²
5-24
6-11
700
811
924
Sum 35010
  1. Mean: 35 ÷ 5 = 7.
  2. Sum of squares: 4 + 1 + 0 + 1 + 4 = 10.
  3. Sample variance: 10 ÷ 4 = s² = 2.5 (standard deviation 1.5811).
  4. Population variance: 10 ÷ 5 = σ² = 2 (standard deviation 1.4142).

If these are five quizzes picked from a whole semester, the sample variance is the right one. If they are the only five quizzes there will ever be and you only want to describe them, use the population variance.

Related tools

The standard deviation calculator runs the same steps and leads with s or σ. To compare one score against the spread, use the z-score calculator; to see the shape of the data, draw it with the histogram maker.

Frequently Asked Questions

More statistics calculators