Population & Sample Variance Calculator

Enter your numbers to compute their sample and population variance.

Result

4.5714
4.0000
Mean 5.0000 over 8 values

How it is calculated

Type the values separated by commas, spaces or line breaks. The tool first finds the mean x̄ = Σx / n, then the sum of squared deviations SS = Σ(x − x̄)2. The population variance is σ2 = SS / n and the sample variance is s2 = SS / (n − 1). Use the population figure when your list is the whole group you care about and the sample figure when it is a sample drawn from a larger group. At least two numbers are required, and if any entry is not a number the tool returns no result. In a list separated by spaces or semicolons a comma between digits is a decimal comma, so "3,5 4" is 3.5 and 4. Variance is in the square of the data's unit, so for lengths in cm it is in cm2; take the square root for the standard deviation. Results are shown to four decimals.

Worked example

Take the eight values 2, 4, 4, 4, 5, 5, 7, 9. Mean: 40 / 8 = 5. Deviations from 5 are −3, −1, −1, −1, 0, 0, 2, 4; their squares are 9, 1, 1, 1, 0, 0, 4, 16, which sum to SS = 32. Population variance: 32 / 8 = 4.0000. Sample variance: 32 / 7 = 4.5714. The tool also reports "Mean 5.0000 over 8 values". The sample figure is larger because dividing by n − 1 corrects for estimating the mean from the same data.

Try this example →

Common mistakes

  • Using the population variance for data that is only a sample, which understates the spread; most real data sets are samples.
  • Typing a decimal comma such as 3,5: in a comma-only list 3,5 is read as the two values 3 and 5. A decimal comma works only when entries are separated by spaces or semicolons; a point always works.
  • Entering a single value: variance needs at least two numbers, and one value returns no result.
  • Reading the variance in the original unit: it is in squared units, so compare the standard deviation with the data instead.
  • Including a stray non-numeric item such as a unit or a label, which makes the whole calculation return no result.

About this calculator

Population variance divides the sum of squared deviations from the mean by N: σ² = Σ(x−μ)²/N. Sample variance instead divides by n−1 — s² = Σ(x−x̄)²/(n−1), known as Bessel's correction — which corrects the downward bias that would otherwise result when estimating a population's variance from a limited sample.

This calculator returns both figures along with the mean and count, since which one applies depends entirely on whether your numbers are the entire group of interest or just a sample of it. It's used throughout statistics coursework, quality-control process monitoring, financial return-volatility analysis, and any research setting where the spread of the data — not just its average — needs to be reported correctly.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    The gap between the two figures depends on how many values you have. For 10 and 14 the sample variance is 8.0000 and the population variance is 4.0000, a factor of two, while for the default list 4, 8, 15, 16, 23, 42 they are 182.0000 and 151.6667. With a handful of values the choice matters a lot; with hundreds it barely does. Take the square root for a standard deviation. Do you usually work with samples or whole groups?

Popular calculators

All Calculators