BUILDING & PLANNING · FIELD TOOL

Variance Calculator

Variance is the average squared distance from the mean. For 2, 4, 4, 4, 5, 5, 7 and 9 the mean is 5 and the squared deviations add up to 32. The population variance is 32 ÷ 8 = 4; the sample variance divides by n − 1 instead: 32 ÷ 7 = 4.57. The standard deviation is the square root: 2 or 2.14.

Inputs

Results update as you type.

Inputs
Spread around the meanSpread around the mean29mean 5myconstructioncalculator.com
Diagram updates as you type.

Results

Check the working before you order.

Variance (sample)
4.5714
Standard deviation2.1381
Mean5
Count8
Sum of squares Σ(x − mean)²32
Variance (population), for comparison4
Price This optional: add your own prices

Your prices are remembered on this device only.

Send Order WhatsApp, SMS or email to your supplier
Include
Working
  1. Mean = 40 ÷ 8 = 5
  2. Squared deviations: (2 − 5)² = 9; (4 − 5)² = 1; (4 − 5)² = 1; (4 − 5)² = 1; (5 − 5)² = 0; (5 − 5)² = 0; (7 − 5)² = 4; (9 − 5)² = 16
  3. Sum of squares = 32
  4. Variance = 32 ÷ (n − 1) = 32 ÷ 7 = 4.5714
  5. Standard deviation = √4.5714 = 2.1381

Results are estimates for planning and material ordering only. They are not a substitute for structural design or approval by a qualified engineer. Read the full disclaimer.

Formula

mean = Σx ÷ n
Sum of squares SS = Σ(x − mean)²
Population variance σ² = SS ÷ n
Sample variance s² = SS ÷ (n − 1)
Standard deviation = √variance

Worked Example

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

  1. Mean = 40 ÷ 8 = 5
  2. Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16; SS = 32
  3. Population variance = 32 ÷ 8 = 4; sample variance = 32 ÷ 7 = 4.571
  4. Standard deviations: 2 and 2.138

Sample or Population?

Your data Divide by Example
Part of a larger group n − 1 (sample) 6 test cubes from a pour of 80 m³
Every value there is n (population) The final level of every pile in a project

Frequently Asked Questions

How do you calculate variance?

Find the mean, subtract it from each value, square each result and add them up. Divide by n for the population variance or by n − 1 for the sample variance.

What is the difference between sample and population variance?

Population variance divides by n and is used when you have every value. Sample variance divides by n − 1, which corrects for estimating the spread of a larger group from part of it.

How are variance and standard deviation related?

Standard deviation is the square root of the variance. It is in the same units as the data, so it is easier to read: a variance of 4 MPa² is a standard deviation of 2 MPa.

Can variance be negative?

No. It is a sum of squares, so it is zero when all values are equal and positive otherwise.

Why square the deviations?

So that values above and below the mean do not cancel out, and so bigger deviations count for more.

Embed This Calculator on Your Website

Free for any website: contractors, suppliers, blogs and schools. Paste this code where you want the calculator to appear. It works in WordPress (Custom HTML block), Wix, Squarespace and plain HTML.

Preview
All Building & Planning Calculators