Variance Calculator

Compute the variance of a dataset — sample or population — along with the corresponding standard deviation and mean. Variance measures how spread out values are around the mean, expressed in squared units of the original data.

Enter your data

Separate numbers with commas, spaces or new lines.
Variance type

Enter at least two numbers and press Calculate.

Variance formulas

Sample variance

s² = Σ(xᵢ − x̄)² / (n − 1)

Population variance

σ² = Σ(xᵢ − μ)² / n

Variance is the mean of the squared deviations from the mean. It is expressed in squared units — if your data is in metres, variance is in square metres — which is why standard deviation (the square root of variance) is often easier to interpret.

Worked examples

Example 1 — Small dataset

Values: 2, 4, 4, 4, 5, 5, 7, 9

Mean = 5. Deviations squared sum = 32. Population variance = 32/8 = 4. Sample variance = 32/7 ≈ 4.571.

Population variance = 4 · Sample variance ≈ 4.571

Example 2 — Repeated value

Values: 3, 3, 3, 3

Every deviation is 0. Variance is 0.

Variance = 0

Frequently asked questions

Standard deviation is the square root of variance. SD is expressed in the same units as the original data, making it easier to interpret; variance is in squared units but is mathematically more convenient for some analyses.

No. Variance is an average of squared deviations, and squares are always non-negative.

Variance appears directly in many statistical formulas, including ANOVA, regression analysis, portfolio risk, quality control and hypothesis testing. It quantifies the "spread" of a distribution.