← All calculatorsStatistics & Probability

Variance Calculator

Computes variance and standard deviation with a toggle between the sample formula, which divides by n − 1, and the population formula, which divides by n.

Variance
5.8095
s² — Bessel corrected
Standard deviation
2.4103
s
Mean
14.1429
7 values
Sum of squares
34.8571
Coefficient of variation
17.04%

How to use the Variance Calculator

  1. Enter your data separated by commas, spaces or line breaks.
  2. Choose 'Sample' if the numbers are a subset drawn from a larger group, which is the usual case.
  3. Choose 'Population' only when the list is genuinely every member of the group being described.
  4. Read the variance, then the standard deviation, which is its square root and shares the units of your data.
  5. Use the coefficient of variation to compare spread across data sets measured in different units.

How the calculation works

Variance is the mean squared deviation from the mean. Squaring serves two purposes: it stops positive and negative deviations cancelling, and it penalises large departures far more heavily than small ones. The cost is that variance carries squared units — square dollars, square seconds — which is why the standard deviation is nearly always the number actually reported.

The n − 1 denominator, Bessel's correction, exists because a sample's own mean is closer to the sample than the true population mean is. Deviations measured from the sample mean are therefore systematically too small, and dividing by n − 1 instead of n corrects that bias exactly. The correction matters enormously at n = 5, where it inflates the estimate by 25%, and is nearly irrelevant at n = 500.

The coefficient of variation, standard deviation over the mean, makes spread dimensionless and comparable. A standard deviation of 3 is huge for a process centred on 10 and trivial for one centred on 10,000. Note that it becomes meaningless when the mean is near zero or when the data can go negative, because the denominator collapses.

Formula
s² = Σ(xᵢ − x̄)² / (n − 1) for a sample; σ² = Σ(xᵢ − μ)² / N for a population; s = √s²

Source: Fisher, 'On the Mathematical Foundations of Theoretical Statistics', Phil. Trans. R. Soc. A (1922); NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.6.

Worked example

Seven daily order counts: 12, 15, 11, 18, 14, 16, 13. Find the sample variance.

  1. Mean = 99 ÷ 7 = 14.1429.
  2. Squared deviations: 4.59, 0.73, 9.88, 14.88, 0.02, 3.45, 1.31.
  3. Sum of squares = 34.857.
  4. Divide by n − 1 = 6: variance = 5.8095.
  5. Standard deviation = √5.8095 = 2.4103 orders.

Sample variance 5.81, standard deviation 2.41 orders. Using the population divisor instead would give 4.98 — a 14% understatement of the spread.

Frequently asked questions

Sample or population — how do I decide?+

Ask whether you could in principle collect more data of the same kind. If yes, it is a sample and you want n − 1. Only a genuinely complete census uses n.

Why square the deviations rather than take absolute values?+

Squared deviations are differentiable, decompose additively across independent sources, and connect directly to the normal distribution. Mean absolute deviation is a valid alternative but does not have those properties.

Can variance be negative?+

Never. It is a sum of squares divided by a positive number, so the minimum is zero, reached only when every value is identical.

How does variance relate to standard deviation?+

Standard deviation is the square root of variance. Variance adds cleanly across independent variables; standard deviation is the one you can read in the original units.

Last reviewed September 1, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.

Related

More in Statistics & Probability