AbraCalc

Variance Calculator

Calculate sample and population variance from a list of numbers.

Embed this tool on your site

How to use this tool

  1. Enter numbers (comma-separated) in the fields above.
  2. Results update instantly as you type — or click Calculate.
  3. Read your sample variance (s²) and the full breakdown beneath it.

Calculate sample variance (s²) and population variance (σ²) from a comma-separated list of numbers.

Formula

Sample variance: s2 = Σ(xi − x̅)2 / (n − 1)

Population variance: σ2 = Σ(xi − x̅)2 / n

How it works

Variance measures the average squared deviation of each value from the mean, expressing the overall spread of a dataset in squared units of the original data. The calculator parses a comma-separated list, computes the mean, accumulates the sum of squared deviations, and then divides by n − 1 for the sample estimate or n for the population value. Standard deviation is simply the square root of variance.

Worked example

Worked example

  1. Data: 2, 4, 4, 4, 5, 5, 7, 9. Count n = 8; mean = 40/8 = 5.
  2. Squared deviations: (2−5)²=9, (4−5)²=1 (three times), (5−5)²=0 (twice), (7−5)²=4, (9−5)²=16. Sum = 32.
  3. Sample variance: s² = 32 / (8−1) = 32/7 ≈ 4.5714.
  4. Population variance: σ² = 32 / 8 = 4.0.

Sample variance = 4.5714; population variance = 4.0; count = 8.

Key terms

Variance
The average of the squared differences from the mean; it measures how far values are spread from the mean in squared units.
Sample variance (s²)
An unbiased estimate of the population variance computed from a sample, using n−1 in the denominator (Bessel's correction).
Population variance (σ²)
The true variance of an entire population, computed by dividing the sum of squared deviations by n.
Squared deviation
The square of the difference between an individual data point and the mean: (xᵢ − x̅)². Squaring ensures all contributions are positive.
Standard deviation vs. variance
Variance is in squared units, making it less intuitive; standard deviation is its square root and shares the same unit as the original data.

Frequently asked questions

What is variance?
Variance measures the average squared deviation from the mean. Sample variance uses n−1 in the denominator; population variance uses n. Standard deviation is the square root of variance.

References & sources