Variance Calculator

Find sample or population variance from a list of numbers.

Separate with spaces, new lines or semicolons. A comma or a dot can be a decimal.

Is this a sample or the whole population?

A sample divides by n − 1, a population by n. If in doubt, you have a sample.

Type or paste at least two numbers.

How this variance calculator works

Paste a list of numbers and this calculator reports sample or population variance. Sample (default) divides by n − 1; Population divides by n. The headline is variance — labelled s² or σ² — with up to six decimal places. Details always show standard deviation, mean, count, and sum.

One number is not enough — the widget shows Two numbers or more are needed and no result. Tokens that are not finite numbers are skipped and counted. At most 5,000 numbers are used. More statistics and the working is GPA-style: Show the deviation table is unused while the section is closed, even if it stays checked. Closing also hides smallest, largest, range, and sum of squared deviations.

How to use the variance calculator

  1. Paste or type your numbers under Your numbers. Separate them with spaces, new lines, or semicolons. A comma or a dot can be a decimal.
  2. Choose Sample (default) or Population. A sample divides by n − 1, a population by n. If in doubt, you have a sample.
  3. Read variance in the headline, plus standard deviation, mean, count, and sum. Those figures do not wait on More statistics and the working.
  4. Open More statistics and the working only if you want smallest, largest, range, and sum of squared deviations, or Show the deviation table. Closing hides those extras even if the checkbox stays checked.

More statistics and the working, and closing them

This section is GPA-style. Open, extra rows show smallest, largest, range, and sum of squared deviations. Open and Show the deviation table checked, the first 40 rows of value, x − mean, and (x − mean)² appear (lists longer than 40 note the truncation). Closed, those extras are unused even if the checkbox stays checked. Variance, standard deviation, mean, count, and sum stay visible.

Variance formulas

Variance is the average squared deviation from the mean. Sample uses n − 1 in the denominator; population uses n. Standard deviation is the square root, so it is in the same units as the data. Switching Sample / Population changes both figures.

Sample variance
s2=∑(x−x¯)2n−1
Population variance
σ2=∑(x−μ)2n

How a pasted list is read

The calculator splits on spaces, new lines, and semicolons — not on every comma — so a European 12,5 13,2 stays two values. A comma-separated integer list such as 12,15,18 still works, as does 12, 15, 18. US thousands (1,234.5) stay one number. Tokens that are not finite numbers are skipped and counted. At most 5,000 numbers are used.

Worked examples

Example: 2, 4, 4, 4, 5, 5, 7, 9 as a sample

There are 8 values. The mean is 5. Sum of squared deviations is 32. Sample variance = 32 ÷ 7 ≈ 4.571429, which is the headline (s²). Standard deviation is √(32/7) ≈ 2.1381. Count is 8. Sum is 40.

Example: the same list as a population

Switch to Population. Variance becomes 32 ÷ 8 = 4 (σ²). Standard deviation is 2. Closing More statistics and the working hides smallest, largest, range, sum of squared deviations, and the deviation table even if Show the deviation table stays checked.

Example: a single number

Paste 12 alone and there is no result. The widget reports Two numbers or more are needed. Empty paste shows Type or paste at least two numbers.

Things to keep in mind

Variance is in squared units; standard deviation is usually easier to read. Sample variance is slightly larger than population variance for the same list. Closing More statistics and the working does not clear your paste. Completed lists can be saved in this browser’s local history.

Variance calculator FAQ

How many numbers do I need?

At least two finite numbers. One value shows Two numbers or more are needed and no result. Empty paste shows no result. More statistics and the working is optional.

What happens when I close More statistics and the working?

Smallest, largest, range, sum of squared deviations, and the deviation table are unused even if Show the deviation table stays checked — the same GPA contract as other calculators on this site. Variance, standard deviation, mean, count, and sum stay visible.

When should I choose Sample vs Population?

Sample (default) divides by n − 1 and is the usual choice for a subset. Population divides by n when the list is the whole group. If in doubt, you have a sample. Switching changes both variance and standard deviation.

How is a pasted list parsed?

Split on spaces, new lines, and semicolons. A comma or a dot can be a decimal. Non-numeric tokens are skipped and counted. At most 5,000 numbers are used.

Why is variance in squared units?

Each deviation is squared before averaging, so the units are the data units squared. Standard deviation is the square root, back in the original units, and always sits in the details.

Does this variance calculator store my numbers?

Completed results can be saved in this browser’s local history so you can reopen them later. They stay on your device and are not sent to our servers or to analytics.