Variance Calculator

Enter a set of numbers to get population variance, sample variance, standard deviation, mean, and coefficient of variation instantly — with full step-by-step calculation showing every squared deviation.

Enter your values above to see the results.

Tips & Notes

  • Variance is always in squared units. If your data is in meters, variance is in m². Standard deviation converts back to the original units — use SD for reporting and variance for calculations.
  • Adding the same constant to every value does not change variance. Multiplying every value by k multiplies variance by k². Data [2,4,6] and [12,14,16] have identical variance.
  • A single extreme outlier can dramatically inflate variance. Data [1,2,3,4,100] has variance of 1560 — massively distorted by the one outlier at 100.
  • For two datasets with different means, the coefficient of variation (CV = s/x̄ × 100%) compares relative spread more fairly than raw variance or standard deviation.
  • Always specify whether you are reporting population or sample variance. In scientific papers and reports, this distinction is required — sample variance is far more common in practice.

Common Mistakes

  • Dividing by n instead of n−1 for sample data. This underestimates the true population variance and is systematically biased. Always use n−1 when working with a sample. Excel's VAR() function uses n−1; VARP() uses N.
  • Forgetting to square the deviations. The formula requires (xᵢ−x̄)², not |xᵢ−x̄|. Squaring ensures all deviations are positive and gives more weight to values far from the mean.
  • Confusing variance with standard deviation. Variance = SD². They measure the same thing but variance is in squared units. Data with SD = 5 has variance = 25, not 5.
  • Averaging the deviations without squaring first. Σ(xᵢ−x̄) always equals exactly zero — the positive and negative deviations cancel. This is why squaring is essential before summing.
  • Comparing variances across datasets with different units or scales. Comparing the variance of salaries (in thousands) with heights (in inches) is meaningless. Use coefficient of variation for cross-scale comparisons.

Variance Calculator Overview

Variance measures how spread out a dataset is — the average of the squared distances from the mean. A variance of 0 means every value is identical. A large variance means values are widely scattered. Understanding variance is essential for comparing data sets, building confidence intervals, running hypothesis tests, and measuring risk in finance and engineering. This calculator computes both population and sample variance, along with standard deviation and related spread statistics.

Population variance — when you have all data points:

σ² = Σ(xᵢ − μ)² / N
EX: Data [2, 4, 4, 4, 5, 5, 7, 9] → N=8, μ=5.0 → Σ(xᵢ−5)² = 9+1+1+1+0+0+4+16 = 32 → σ² = 32/8 = 4.00
Sample variance — when your data is a sample from a larger population:
s² = Σ(xᵢ − x̄)² / (n − 1)
EX: Same data as sample → s² = 32 / (8−1) = 32/7 ≈ 4.571 | Note: dividing by n−1 gives a larger, unbiased estimate
Standard deviation — square root of variance, in original units:
σ = √σ² (population) | s = √s² (sample)
EX: Population SD = √4.00 = 2.00 | Sample SD = √4.571 ≈ 2.138
Coefficient of variation — relative spread as a percentage:
CV = (s / x̄) × 100%
EX: x̄ = 5.0, s = 2.138 → CV = (2.138/5.0) × 100 = 42.76% — useful for comparing spread across different scales
When to use population vs. sample variance:
SituationUseDenominatorSymbol
You have ALL data pointsPopulation varianceNσ²
You have a subset of dataSample variancen − 1
Estimating population from sampleSample variancen − 1
Entire census or complete recordsPopulation varianceNσ²
Sample variance uses n−1 (Bessel's correction) rather than n because dividing by n systematically underestimates the true population variance. The intuition: a sample's deviations are measured from the sample mean, which is itself estimated from the data — this introduces one constraint, leaving only n−1 truly free deviations. Dividing by n−1 corrects for this and produces an unbiased estimate of population variance.

Frequently Asked Questions

Population variance σ² divides by N (all data points) and is used when you have complete data — an entire class's grades, all products in a batch. Sample variance s² divides by n−1 and is used when your data is a subset drawn from a larger group. The n−1 denominator (Bessel's correction) makes the sample estimate unbiased. In practice, most real-world datasets are samples, so s² is more commonly reported.

Variance squares the deviations to eliminate negatives and emphasize large deviations. The result is in squared units — if data is in kg, variance is in kg². Standard deviation takes the square root of variance to return to the original units, making it directly comparable to the data values. Both measure spread; SD is more interpretable, while variance is mathematically easier to work with in formulas like ANOVA.

Dramatically. Variance squares deviations, so an outlier 10 units away contributes 100 to the sum — versus just 1 for a value 1 unit away. Data [5,5,5,5,5] has variance = 0. Adding one outlier to get [5,5,5,5,50] gives variance = (0+0+0+0+2025)/5 = 405 for population, or 506.25 for sample. One value changed variance from 0 to over 400.

Use standard deviation when communicating spread to a general audience — it is in the same units as your data and directly comparable to individual values. Use variance in statistical formulas and calculations: ANOVA, regression, combining variances from independent groups (variances add, SDs do not). Variance of combined independent groups = Var(A) + Var(B); SD of combined groups ≠ SD(A) + SD(B).

No. Variance is always zero or positive. Each squared deviation (xᵢ−x̄)² is always ≥ 0, so their sum is ≥ 0, and dividing by a positive number keeps it ≥ 0. Variance equals exactly 0 only when every value in the dataset is identical — there is zero spread. If a calculation produces a negative variance, an arithmetic error occurred.

CV = (s/x̄) × 100% expresses standard deviation as a percentage of the mean, enabling comparison across different scales. CV = 10% means the SD is 10% of the mean — relatively low spread. CV = 80% means high spread relative to the mean. Example: investments A and B have SD = $5, but A has mean = $10 (CV=50%) and B has mean = $100 (CV=5%). B is far more consistent despite identical SDs.