How to Calculate Variance: A Step-by-Step Manual Guide

Variance measures how spread out your data is. If you need a quick calculation, use our Variance Calculator. But understanding the manual steps builds intuition. Here is how to calculate variance by hand.

You'll Need

  • A set of numerical data (at least 5–10 values)
  • Paper and pencil (or a simple calculator for arithmetic)
  • Basic math skills: addition, subtraction, squaring, division

Step-by-Step Instructions

  1. Find the mean (average). Add all the numbers, then divide by the count of numbers. The mean is the center point of your data.
  2. Calculate each deviation. Subtract the mean from every data point. This tells you how far each value is from the average.
  3. Square each deviation. Multiply each deviation by itself. Squaring makes all values positive and gives more weight to larger differences.
  4. Sum the squared deviations. Add up all the squared deviation values. This total is the sum of squares.
  5. Divide by the appropriate denominator.
    • If you have data for the entire population, divide by n (the number of values). The result is the population variance (σ²).
    • If you have a sample (which is more common), divide by n - 1. This gives you the sample variance (), which better estimates the population variance.
  6. (Optional) Take the square root to get the standard deviation. Standard deviation is easier to interpret because it is in the same units as the original data.

For a deeper explanation of the formulas, see our Variance Formula page.

Worked Example 1: Population Variance

Suppose you have the following scores from a small class of 5 students (the whole population): 85, 92, 78, 89, 96.

  1. Mean: (85 + 92 + 78 + 89 + 96) / 5 = 440 / 5 = 88
  2. Deviations: 85 - 88 = -3, 92 - 88 = 4, 78 - 88 = -10, 89 - 88 = 1, 96 - 88 = 8
  3. Squared deviations: (-3)² = 9, 4² = 16, (-10)² = 100, 1² = 1, 8² = 64
  4. Sum: 9 + 16 + 100 + 1 + 64 = 190
  5. Population variance: 190 / 5 = 38

The variance is 38 points². The standard deviation is √38 ≈ 6.16.

Worked Example 2: Sample Variance

Now imagine you take a random sample of 6 days from January temperatures (°F): 32, 35, 28, 30, 33, 31.

  1. Mean: (32 + 35 + 28 + 30 + 33 + 31) / 6 = 189 / 6 = 31.5
  2. Deviations: 32 - 31.5 = 0.5, 35 - 31.5 = 3.5, 28 - 31.5 = -3.5, 30 - 31.5 = -1.5, 33 - 31.5 = 1.5, 31 - 31.5 = -0.5
  3. Squared deviations: 0.5² = 0.25, 3.5² = 12.25, (-3.5)² = 12.25, (-1.5)² = 2.25, 1.5² = 2.25, (-0.5)² = 0.25
  4. Sum: 0.25 + 12.25 + 12.25 + 2.25 + 2.25 + 0.25 = 29.5
  5. Sample variance: 29.5 / (6 - 1) = 29.5 / 5 = 5.9

The sample variance is 5.9 (°F)². The sample standard deviation is √5.9 ≈ 2.43 °F.

Common Pitfalls

  • Using the wrong denominator. Always ask: is this a population or a sample? Using n - 1 for a population overestimates variance; using n for a sample underestimates it. See our guide on Variance Interpretation for what high/low values mean.
  • Forgetting to square deviations. If you sum the raw deviations, you'll always get zero (because positives cancel negatives). Squaring avoids that.
  • Mixing up variance and standard deviation. Variance is in squared units; standard deviation is easier to understand. Many calculators (like ours) show both.
  • Using a sample that is too small. Variance estimates from tiny samples (n < 5) can be unreliable. If possible, collect more data.
  • Rounding too early. Keep at least 2–3 decimal places during calculations to avoid rounding error in the final result.

For common questions about variance, check our FAQ page.

Try the free Variance Calculator ⬆

Get your Variance is a statistical measure of the spread or dispersion of data points around the mean, calculated as the average squared deviation from the mean. result instantly — no signup, no clutter.

Open the Variance Calculator

Contact Us