Statisticsvariancepopulation variancesample variance

Variance Calculator

Compute population variance (dividing by N) and sample variance (dividing by N−1) side by side. Understanding the difference is critical for correctly analyzing sample data from a larger population.

Advertisement

Calculator

See your Variance Calculator results

Enter your email to unlock results — free forever.

or

No spam, ever. Unsubscribe at any time.

Advertisement

Formula

σ² = Σ(xᵢ − μ)² / N | s² = Σ(xᵢ − x̄)² / (N−1)

For both formulas, compute the mean, then calculate each value's squared deviation from the mean, and sum those squared deviations. For population variance (σ²), divide by N. For sample variance (s²), divide by N−1. The N−1 denominator (Bessel's correction) compensates for the fact that using a sample mean slightly underestimates the true population spread.

How to use the Variance Calculator

  1. 1

    Enter your value 1

  2. 2

    Enter your value 2

  3. 3

    Enter your value 3

  4. 4

    Enter your value 4

  5. 5

    Enter your value 5

  6. 6

    Read your results instantly

    Results update in real time as you type.

Advertisement

Variance as a measure of spread

Variance quantifies how far values are spread from the mean. A variance of 0 means all values are identical. Higher variance means greater spread. Because variance squares the deviations, it amplifies the effect of outliers — a value that is 3 units from the mean contributes 9 to the variance, while a value 1 unit away contributes only 1.

For the default dataset {2, 4, 4, 6, 8}, the mean is 4.8, the population variance is 3.76, and the sample variance is 4.7. These numbers are in squared units of the original data — taking the square root gives the standard deviation, which is in the original units.

Bessel's correction: why divide by N−1?

When you compute the mean from a sample, you use all the data to estimate that mean. This means the squared deviations you calculate are slightly too small — they are distances from the sample mean, not the true population mean. Dividing by N−1 instead of N inflates the result just enough to correct for this bias.

The correction is significant for small samples. With N=5, the sample variance is 25% larger than the population variance. With N=100, the difference is only 1%. For large samples, the distinction barely matters in practice.

Advertisement

When to use each formula

Use population variance (÷N) when you have complete data for the entire group of interest — for example, the salaries of every employee at a company, or the scores of every student in a class. Use sample variance (÷N−1) when your data is a sample drawn from a larger population and you want to estimate the population's true variance.

Most spreadsheet functions (Excel's VAR, Google Sheets' VAR) compute sample variance by default. Population variance uses separate functions (VAR.P in Excel, VARP in older versions).

Tips & Insights

Standard deviation is more interpretable

Variance is in squared units, which can be hard to relate to the original data. Taking the square root gives the standard deviation, which is in the same units and easier to interpret.

Variance adds, standard deviation does not

If two independent random variables have variances σ₁² and σ₂², the variance of their sum is σ₁² + σ₂². This additivity property is one reason variance is fundamental in probability theory.

Outliers affect variance more than IQR

Because variance squares deviations, a single extreme outlier can dramatically inflate variance. For skewed data with outliers, interquartile range (IQR) is a more robust measure of spread.

Worked Examples

Student quiz scores

Value 1: 60Value 2: 70Value 3: 75Value 4: 80Value 5: 90

Population variance: 97.0. Sample variance: 121.25. The spread is moderate — scores range 30 points but are fairly evenly distributed.

Manufacturing measurements (mm)

Value 1: 99.8Value 2: 100.1Value 3: 100.0Value 4: 99.9Value 5: 100.2

Population variance: 0.02. Sample variance: 0.025. Very low variance — the production process is highly consistent.

Advertisement

Frequently Asked Questions

What is variance in statistics?

Variance measures the average squared distance of each data point from the mean. It quantifies how spread out the data is. A variance of 0 means all values are identical.

What is the difference between population variance and sample variance?

Population variance divides by N (total data points) and is used when you have all the data. Sample variance divides by N−1 to correct for bias when estimating from a subset.

Why is variance squared?

Squaring eliminates negative signs (deviations above the mean are positive; below are negative), so they do not cancel out. It also weights larger deviations more heavily.

What is Bessel's correction?

Bessel's correction is the use of N−1 instead of N in the denominator of sample variance. It corrects for the systematic underestimation of population variance that occurs when using a sample mean.

How do I convert variance to standard deviation?

Take the square root of the variance. Standard deviation = √variance. This converts the result back to the original units of the data.

Advertisement

Related Calculators