Math Solver Free

Variance Calculator

Population and sample variance for any data set — with the deviation table that shows where the number comes from.

Published 26 November 2026

Variance (population) σ²
5.2
divide by n = 10
Variance (sample) s²
5.77778
divide by n − 1 = 9
Count (n)10
Mean (x̄)6
Sum of squared differences Σ(x − x̄)²52
Standard deviation (population)2.28035
Standard deviation (sample)2.4037

Step by step

Step 1 — the mean: the values add to 60, and 60 ÷ 10 = 6.

Step 2 — square every distance from the mean: the squared differences add to Σ(x − x̄)² = 52 (each one is listed in the table below).

Step 3 — average them: population variance = 52 ÷ 10 = 5.2; sample variance = 52 ÷ 9 = 5.77778.

Deviation table — every value's distance from the mean

xx − x̄(x − x̄)²
2-416
3-39
4-24
5-11
600
711
824
824
824
939
Σ52

How This Variance Calculator Works

Variance measures spread: how far, on average (in squared units), the values in a data set sit from their mean. Two classes can share the same average mark and still be completely different groups — one bunched tightly, one stretched from fail to perfect — and variance is the number that says so. This variance calculator computes both versions side by side (population, dividing by n; sample, dividing by n − 1) and prints the full deviation table, because the table is the method: mean first, then every distance from it, squared and summed.

The Variance Formula

Population variance is σ² = Σ(x − x̄)² ÷ n; sample variance is s² = Σ(x − x̄)² ÷ (n − 1). The only difference is the denominator, but it decides which number your course expects. Take the square root of either and you have the matching standard deviation — the standard deviation calculator covers that measure on its own, and the statistics calculator reports variance inside a full summary.

Worked Example: Ten Quiz Scores

For the scores 4, 8, 6, 5, 3, 8, 9, 2, 7, 8 the mean is 60 ÷ 10 = 6. The squared differences from 6, computed value by value, are (4−6)² = 4, (8−6)² = 4, (6−6)² = 0, (5−6)² = 1, (3−6)² = 9, (8−6)² = 4, (9−6)² = 9, (2−6)² = 16, (7−6)² = 1, (8−6)² = 4, adding to 52. The population variance is 52 ÷ 10 = 5.2; the sample variance is 52 ÷ 9 ≈ 5.78. Their square roots, ≈ 2.28 and ≈ 2.40, are the two standard deviations — the typical distance of a score from 6, back in marks.

Population or Sample: Which Variance Do You Need?

The two numbers answer two different questions, and choosing wrongly is the most common variance error of all. Use the population variance (÷ n) when your data is the whole group you care about: every score in the class, every day of last month, every machine on the line. Use the sample variance (÷ n − 1) when your data is a sample drawn to say something about a bigger group you cannot measure in full: 50 voters polled about an electorate, 30 parts tested from a production run, a week of trading days standing in for the year. Because a sample is computed against its own mean rather than the population's true mean, its squared differences run slightly small; dividing by n − 1 instead of n inflates the result just enough to correct that bias (Bessel's correction). This calculator always prints both, labelled — if a course, exam board or report expects one specific version, it will say “sample” or “population” in so many words.

Worked Example 2: A Five-Number Data Set, Entirely by Hand

For the values 2, 3, 4, 5, 6 the mean is 20 ÷ 5 = 4. The differences from the mean are −2, −1, 0, 1, 2, and squaring them gives 4, 1, 0, 1, 4, which sum to 10. The population variance is 10 ÷ 5 = 2, and the sample variance is 10 ÷ 4 = 2.5. Their square roots — the standard deviations — are ≈ 1.41 and ≈ 1.58: a typical value in this set sits about one and a half units from 4. Small sets like this one are the right way to learn the method, because every step can be checked mentally; paste the same five numbers into the calculator above and its deviation table reproduces each row.

Why Square the Differences?

Plain differences from the mean always add to zero — the positives cancel the negatives — so they cannot measure spread directly. Squaring fixes the cancellation and punishes large deviations more than small ones, which is usually what you want: one wild value should move the spread more than one mild value. The price is the squared units, which is why variance and standard deviation are almost always reported together. The NIST/SEMATECH e-Handbook of Statistical Methods is the standard reference for the definitions and for Bessel's correction.

Common Mistakes

  • Dividing by n for a sample: if the data was sampled from a larger group, the n − 1 row is the honest one.
  • Quoting variance in the original units: variance of heights in centimetres is in cm², not cm — convert to standard deviation before describing a “typical distance”.
  • Comparing variances across different scales: a variance of 5.2 in marks and 5.2 in milliseconds say nothing about each other. Standardise first, for example with the z-score calculator.

Variance vs Standard Deviation: Which Should You Report?

They are the same information at two stops on one calculation — variance is the average squared difference, standard deviation is its square root — but they are not interchangeable in a sentence. Report the one your audience can interpret:

 Variance (σ² / s²)Standard deviation (σ / s)
UnitsSquared units (cm², marks²)Original units (cm, marks)
Reads asAverage squared distance from the meanTypical distance from the mean
Used forFormulas: ANOVA, regression, portfolio risk, further algebraDescribing data to a reader: error bars, z-scores, the 68–95–99.7 rule
ExampleQuiz scores: variance 5.2Same scores: σ ≈ 2.28 marks from the mean of 6

Practice Problems

Work each one through by hand, then open the answer — or verify in the calculator above.

  1. Find the population variance of 5, 5, 5, 5.
    Show answer

    The mean is 5 and every difference from it is 0, so the variance is 0 — a data set with no spread at all.

  2. Find the population and sample variance of 1, 2, 3, 4.
    Show answer

    Mean = 2.5. Squared differences: 2.25, 0.25, 0.25, 2.25 — sum 5. Population variance = 5 ÷ 4 = 1.25; sample variance = 5 ÷ 3 ≈ 1.67.

  3. Two classes both average 70 on the same test. Class A has variance 4 and Class B has variance 100. Which class is more consistent, and what are the two standard deviations?
    Show answer

    Class A is far more consistent: its standard deviation is √4 = 2 marks, against Class B's √100 = 10 marks — the same average, five times the typical distance from it.

Frequently Asked Questions

How do you calculate variance?

Find the mean, subtract it from every value, square each difference, then average the squares. For 2, 3, 4, 5, 6 the mean is 4, the squared differences are 4, 1, 0, 1, 4 (sum 10), and the population variance is 10 ÷ 5 = 2. The calculator above prints every one of those steps for your own data.

What is the difference between population and sample variance?

Population variance divides the squared differences by n; sample variance divides by n − 1. The n − 1 version (Bessel's correction) compensates for the fact that a sample tends to sit slightly closer to its own mean than the full population does to its true mean, so dividing by n would understate the spread.

Why is variance measured in squared units?

Because each difference from the mean is squared, variance is in squared units — squared marks, squared seconds. That is exactly why the standard deviation exists: take the square root of the variance and you are back in the original units. Variance is still the quantity most formulas are built on, because squares behave better algebraically than absolute values.

Can variance be zero or negative?

Zero, yes — when every value is identical, every difference from the mean is 0 and so is the variance. Negative, never: squares are never negative, so an average of squares cannot be either. If a calculation produces a negative variance, an arithmetic slip has happened.

What is a good variance value?

There is no universal 'good' — variance is only meaningful next to the mean and the units. A variance of 5.2 in quiz marks out of 10 is wide; the same number for house prices would be impossibly narrow. Compare variances between data sets measured the same way, or convert to standard deviation and compare it against the mean.

Is this variance calculator free?

Yes — every tool on Math Solver Free is completely free, with no sign-up and no usage limits. Calculations run in your browser, so your data never leaves your device.

Related Tools & Guides

About the Math Solver Team

The Math Solver Team builds and maintains the calculators and step-by-step solvers on this site. Every tool is checked against worked textbook examples before it is published, and the method behind each solver is written out in full — in the worked examples on the page and in our guides — so you can see exactly how an answer is reached, not just the answer itself.

How we build and test our tools·More about the team