🏆 US-Registered Digital Marketing Agency Trusted by 200+ brands · USA · UK · Canada · AUS
Advertisement
Advertisement
STATISTICS

Variance Calculator — sample and population variance

Calculate variance, standard deviation, and the sum of squares from any list of numbers, with the sample and population versions side by side.

Separate values with commas, spaces, or new lines. A column pasted from a spreadsheet works as it is.
Choose sample if your numbers are drawn from a larger group, population if they are the entire group.
Variance
0
 
0
Standard deviation
0
Mean
0
Sum of squares
0
Count (n)
Tip: variance is measured in squared units, so a variance of 4.57 on data measured in seconds is 4.57 square seconds. That is why the standard deviation, its square root, is what gets reported.
Advertisement

Variance measures how far a set of numbers spreads out from its own average. It is the foundation under almost every other statistic — standard deviation is its square root, regression works by partitioning it, and every significance test is ultimately a comparison of one variance against another.

This calculator from Arb Digital computes both versions from the same data and shows them together, because the choice between dividing by n and dividing by n − 1 is the single most common error in elementary statistics. You also get the mean, the sum of squares, and the coefficient of variation, so you can trace every step of the calculation rather than accepting one number on trust.

What This Variance Calculator Does

Paste any list of numbers and the tool returns the variance for your chosen data type as the headline figure, with the standard deviation, mean, sum of squared deviations, and count alongside it. The result subtitle reports both the sample and population variance together, so you can see immediately how much the choice matters for your data.

The parser accepts commas, spaces, tabs, and line breaks, along with negative numbers, decimals, and scientific notation. Non-numeric text is ignored rather than silently converted to zero, which prevents a stray column header from quietly dragging your mean down.

How to Use It

  1. Paste or type your data. Any common separator works, so a column copied straight out of a spreadsheet needs no cleaning.
  2. Check the count. If n does not match what you expected, a value was not recognised as a number — usually a currency symbol, a thousands separator, or a stray letter.
  3. Choose sample or population. Sample is correct in nearly every real analysis; population applies only when your list is the entire group you are describing.
  4. Read the sum of squares if you are checking work by hand — it is the intermediate quantity that both variance formulas share.
  5. Set the decimal places to a precision your measurements can genuinely support.

The Formula and a Worked Example You Can Check

Population variance is σ² = Σ(x − μ)² ÷ N. Sample variance is s² = Σ(x − x̄)² ÷ (n − 1). The numerator, the sum of squared deviations from the mean, is identical in both. Only the divisor changes.

Work through the default data: 2, 4, 4, 4, 5, 5, 7, 9. The sum is 40 and n is 8, so the mean is 5. The deviations from the mean are −3, −1, −1, −1, 0, 0, 2 and 4, and their squares are 9, 1, 1, 1, 0, 0, 4 and 16. The sum of squares is 32.

Divide by n = 8 and the population variance is 4.0, with a population standard deviation of exactly 2.0. Divide by n − 1 = 7 and the sample variance is 32 ÷ 7 = 4.5714, with a sample standard deviation of 2.1381. The same eight numbers, two legitimate answers, and a 14% difference between them — which is precisely why the tool shows both. The definitions used here follow the measures of scale set out in the NIST/SEMATECH e-Handbook of Statistical Methods.

Advertisement

Why n − 1 Instead of n

When you calculate variance from a sample, you do not know the population mean, so you use the sample mean instead. The sample mean is by construction the point that minimises the sum of squared deviations for that specific data — no other value could produce a smaller total. Every sample mean is therefore slightly closer to its own data than the true population mean would be, and dividing by n gives a number that is systematically too small.

Dividing by n − 1, known as Bessel's correction, removes that bias exactly. The intuitive account is that one degree of freedom is spent estimating the mean: once you know the mean and any seven of the eight values, the eighth is fixed, so only seven of the deviations carry independent information. The correction matters most when n is small. At n = 5 the two variances differ by 25%; at n = 100 by about 1%; at n = 1,000 it is invisible. Penn State's STAT 500 course notes derive the correction step by step. Use the population formula only when your data really is the complete group — every employee, every transaction in a closed period, every unit produced in a batch.

Why Squared Deviations at All

A natural first attempt at measuring spread is to average the deviations from the mean. That fails immediately: those deviations always sum to exactly zero, by definition of the mean. The two obvious repairs are to take absolute values or to square them.

Squaring won historically for two reasons. It is differentiable everywhere, which makes least-squares methods and analytical results tractable, and squared quantities add cleanly — the variance of a sum of independent variables is the sum of their variances, a property absolute deviations do not share. The price is sensitivity to extreme values: a single observation twice as far from the mean contributes four times as much to the variance. That is a real drawback on data with occasional wild values, where the mean absolute deviation or the interquartile range from the percentile calculator gives a more representative picture of typical spread.

Comparing Spread Across Different Scales

Variance is expressed in the square of your original units, which makes it impossible to compare across variables measured differently. The standard deviation fixes the units problem but not the scale problem: a standard deviation of 15 means something entirely different for exam scores out of 100 than for annual salaries.

The coefficient of variation — standard deviation divided by the mean, expressed as a percentage — solves this by making spread relative. For the default data it is 2.1381 ÷ 5 = 42.8%, telling you the typical deviation is about 43% of the average value. A CV under roughly 15% indicates fairly consistent data; above 50% the average is a poor summary of individual values. Two important caveats: the CV is meaningless when the mean is at or near zero, and it should never be applied to scales where zero is arbitrary, such as temperature in Celsius.

Where Variance Does Real Work

Variance is not just descriptive. Analysis of variance compares group means by splitting total variance into a between-groups component and a within-groups component, and asking whether the first is large relative to the second. Regression works the same way, reporting r-squared as the proportion of variance explained by the fitted line, which you can see in action in the linear regression calculator.

In quality control, variance rather than the mean is usually the target: a process that produces the right average with unacceptable spread will still fail specification on a large share of units. And in sample-size planning, variance is the input that drives everything — the number of observations you need scales directly with it, which is why a pilot study to estimate variance almost always precedes a full one. That relationship is the mechanism behind the sample size calculator.

Two Practical Traps

The first is grouped or pre-averaged data. Computing variance from daily averages gives the variance of those averages, not the variance of the underlying observations, and the two differ by a factor of the group size. Reporting the first as if it were the second understates real variability dramatically, and it is a common error in dashboards built on rolled-up tables.

The second is the naive computational shortcut Σx² ÷ n − (Σx ÷ n)². It is algebraically correct and numerically dangerous: with large values that cluster tightly, it subtracts two nearly equal large numbers and can lose most of the significant digits, occasionally even returning a negative variance. This calculator uses the two-pass method — compute the mean first, then sum the squared deviations — which is slower and far more accurate. Check the standard deviation of your result against the standard deviation calculator and the centre against the mean, median and mode calculator whenever a figure looks implausible.

Need more free statistics tools?

Arb Digital publishes a growing library of free calculators for statistics, maths, and analysis — no sign-up, no limits, and every formula documented on the page.

Browse All Free Tools Contact Arb Digital

Common Mistakes to Avoid

  • Using the population formula on sample data — dividing by n understates the spread, and the error is largest exactly when samples are small.
  • Comparing variances measured in different units — use the coefficient of variation, since variance carries squared units.
  • Reporting variance instead of standard deviation — the squared units make it hard to interpret next to the original data.
  • Calculating variance from averages — the variance of daily means is far smaller than the variance of the underlying observations.
  • Letting one outlier define the spread — squaring gives extreme values disproportionate weight, so check whether a single point is driving the result.

Related Free Tools From Arb Digital

Take the square root with the standard deviation calculator, find the centre with the mean, median and mode calculator, and measure spread robustly using the interquartile range in the percentile calculator. Standardise a single value with the z-score calculator, feed the variance into the sample size calculator for planning, and see variance partitioned in the linear regression calculator. Everything else lives in the free online tools hub.

Frequently Asked Questions

What is the difference between sample and population variance?

Population variance divides the sum of squared deviations by n, sample variance divides by n − 1. The sample version corrects for the fact that using the sample mean makes the deviations slightly too small, so it produces a larger and unbiased estimate.

Which one should I use?

Use sample variance unless your data covers every member of the group you are describing. Almost all real analysis works from samples, so the sample formula is the correct default in most situations.

Can variance be negative?

No. It is an average of squared quantities, so it is always zero or positive. A variance of exactly zero means every value in the set is identical. A negative result from a spreadsheet indicates a rounding failure in the computational shortcut, not a real value.

How is variance related to standard deviation?

The standard deviation is the square root of the variance. Variance is easier to work with mathematically, while standard deviation is easier to interpret because it shares the units of the original data.

What is the sum of squares?

It is the total of the squared deviations from the mean, before any division takes place. Both variance formulas start from it, so it is the natural place to check a hand calculation against this tool.

What does a high variance mean?

It means individual values sit far from the average, so the mean is a weak summary of any single observation. Whether that is a problem depends on context: high variance in a manufacturing tolerance is a defect, while in a portfolio it is simply risk.

This tool is provided for education and general analysis. Results depend on the quality of the data you enter, and it is not a substitute for professional statistical advice on a specific study.

Advertisement
Advertisement
Arb Digital assistant

👋 Hey! Want to grow your business? Ask me anything — a free marketing proposal is on the table!