Skip to content
    Statistics

    How to Calculate Variance (Step-by-Step)

    Two seedling trays have the same average height, but one looks neat and the other looks messy. How do you measure messy? With variance. This guide shows you how to calculate it step by step, and the difference between population and sample variance.

    Math Solver Academic Editorial Board4 min read

    Key takeaways

    • Population variance: σ² = Σ(x − μ)² ÷ n. This calculator divides by n.
    • Sample variance divides by n − 1 and gives a slightly larger answer.
    • Always square the differences, or they cancel out to 0.
    • Variance is in squared units. Its square root is the standard deviation.
    In this guide
    1. 01What is variance?
    2. 02Why does variance matter?
    3. 03The formula
    4. 04How to calculate variance step by step
    5. 05Common mistakes to avoid
    6. 06Tips and tricks
    7. 07Where you'll use it in real life
    8. 08Quick summary
    9. 09Worked example
    10. 10Frequently asked questions

    What is variance?

    If everyone in a group scores exactly 7 on a quiz, there is no spread and the variance is 0. If scores are 3, 5, 7, 9 and 11, they are spread out, and the variance is bigger. Variance turns 'how spread out' into one number.

    It is the average of the squared distances from the mean.

    Why does variance matter?

    Variance measures consistency. A factory wants low variance in bottle sizes. A farmer wants low variance in crop yields. An investor looks at variance to judge risk.

    It is also the foundation of more advanced statistics, from the standard deviation to tests used in science and machine learning.

    Why square the distances? Values below the mean give negative differences and values above give positive ones. Added up, they always cancel to exactly 0.

    The formula

    This calculator finds the population variance, dividing by n:

    σ² = Σ(x − μ)² ÷ n
    SymbolWhat it meansExample
    σ²The variance8
    xEach value in your list3, 5, 7, 9, 11
    μThe mean of the list7
    ΣAdd up over all values16 + 4 + 0 + 4 + 16
    nHow many values5

    The sample variance, written s², divides by n − 1 instead. Use it when your numbers are a sample from a bigger group. Variance is in squared units: if the data is in cm, the variance is in cm².

    How to calculate variance step by step

    1. 1Find the mean. Add the values and divide by n.
    2. 2Subtract the mean from every value. Some answers will be negative.
    3. 3Square each difference. Now all are positive.
    4. 4Add the squares. This is the sum of squares.
    5. 5Divide by n. That is the population variance.

    Paste your own list into the calculator below to see every step.

    Try it yourself

    Pre-filled with the example — change any value.

    🧮
    Statistics
    High School

    Variance Calculator

    Calculate the variance of a data set

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

    μ = 068.2% (±1σ)
    μ: 0 | σ: 1

    💡 Example

    Reference
    Inputs:numbers=2, 4, 4, 4, 5, 5, 7, 9
    Result:4
    Open the full Variance Calculator calculator

    Common mistakes to avoid

    • Forgetting to square. Plain differences always add up to 0.
    • Squaring the total instead of each difference. Square first, then add.
    • Reporting the wrong unit. Variance is in squared units. Take the square root to get the standard deviation in normal units.

    Tips and tricks

    • Sample from population: multiply the population variance by n ÷ (n − 1). Here 8 × 5 ÷ 4 = 10.
    • Adding a constant to every value does not change the variance. Multiplying every value by k multiplies the variance by k².
    • Quick but rough spread? The range calculator needs only one subtraction.

    Where you'll use it in real life

    • Finance: how much an investment's returns jump around.
    • Science: how consistent repeated measurements are.
    • Sport: how steady a player's scores are from game to game.
    • Data science: many machine learning methods try to reduce variance in their errors.

    Quick summary

    Variance is the average squared distance from the mean: find the mean, square each difference, add and divide by n. This calculator gives the population variance. Use it above to get the answer with every step shown.

    Worked example

    A gardener measured five seedlings after one week. They were 3, 5, 7, 9 and 11 cm tall. She wants to know how much the heights vary.

    1. 01Data set: 3, 5, 7, 9, 11
    2. 02Mean (μ) = 3 + 5 + 7 + 9 + 11 ÷ 5 = 7
    3. 03Σ(x - μ)² = 40
    4. 04Variance σ² = 40 ÷ 5 = 8

    These numbers are pre-filled in the calculator above.

    Frequently asked questions

    Does this calculator give population or sample variance?

    Population variance, which divides by n. For sample variance, take the sum of squared differences and divide by n − 1 instead.

    Why do we square the differences?

    Values below the mean give negative differences and values above give positive ones. Without squaring they cancel out to 0. Squaring makes every distance positive.

    How are variance and standard deviation related?

    Standard deviation is the square root of variance. A variance of 8 means a standard deviation of √8 ≈ 2.83.

    Can variance be negative?

    No. It is an average of squared numbers, so it is always 0 or positive. It is 0 only when every value is the same.

    #Statistics#High School#Variance Calculator
    Updated

    Sponsored ToolsAd

    More tools on Ytools →
    Calcu.click — 25+ Free Smart Calculators preview

    Calcu.click — 25+ Free Smart Calculators

    Brand new calculation platform with 0ms reactive math, 100% client-side privacy, and dedicated subdomains. Fast calculators for EMI, SIP, Mortgage, Income Tax, BMI, Age, Percentage, and more.

    25+ CalculatorsFinanceHealth0ms Real-TimeFree
    Keyboard Arena preview

    Keyboard Arena

    Master touch typing with real-time WPM speed tests, mechanical switch audio, A-Z finger biomechanics drills, 40+ structured lessons, and competitive arcade games.

    Typing TestWPMTouch Typing
    Flutter Log Explorer preview

    Flutter Log Explorer

    Real-time structured log viewer and search explorer for Flutter & Dart. Zero-config capture from Debug Adapter (DAP) & Dart VM Service with smart classification and filters.

    FlutterDartVS Code ExtensionOpen VSX