Math & Statistics

Statistics calculator

Variance Calculator

Calculate population and sample variance from summary statistics (n, Σx, Σx²). See standard deviation for both population and sample.

Updated 3 June 2026No sign-in requiredMath & Statistics calculator

Enter Your Numbers

Number of data points.

Sum of all data points.

Sum of each value squared.

Sample Variance (s²)

12.500000

Population Variance (σ²)

10.000000

Sample Std Dev (s)

3.535534

Population Std Dev (σ)

3.162278

Report an issue

Summary of Computed Statistics

Variance and standard deviation recomputed from the count, sum, and sum of squares you entered.

StatisticValue
Sample size (n)5
Mean (μ)10
Sample variance (s²)12.5
Population variance (σ²)10
Sample standard deviation (s)3.535534
Population standard deviation (σ)3.162278

How It Works

Population variance divides by n.

σ² = Σx²/n − μ² | s² = (Σx² − (Σx)²/n) / (n−1)
  • Sample variance divides by (n−1) using Bessel’s correction.
  • Standard deviation = √variance.

Worked Example

Dataset: 8, 10, 12, 9, 11 (n=5, Σx=50, Σx²=510).

Mean

10

Population Var

2.0

Sample Var

2.5

Pop Std Dev

1.414

Sample Std Dev

1.581

Sample variance (2.5) is slightly larger because it uses n−1 to correct for sampling bias.

Variance: Measuring Spread With Squared Distances

Average squared distance from the mean

This tool computes variance — the average squared distance of values from their mean — along with the matching standard deviation, for both the population and sample cases. It works from three summary totals: the count n, the sum of values Σx, and the sum of squares Σx².

Variance is a foundation of statistics. It underlies standard deviation, the basis of confidence intervals, regression, and risk measures in finance, so understanding it pays off across many topics.

The formulas and the method

Population variance is σ² = Σx²/n − μ², where μ = Σx/n is the mean. Sample variance is s² = (Σx² − (Σx)²/n) / (n − 1). Both forms compare the sum of squares to what the mean alone would predict; the difference is only the divisor.

Squaring the distances is the key idea. It removes negative signs so deviations do not cancel, and it gives extra weight to values far from the mean — which is also why a single outlier can inflate the variance sharply.

Population versus sample

Choose the population version when your data is the complete group, with nothing left out. Choose the sample version when the data is a subset meant to represent a larger whole, which is the common situation.

The sample formula divides by n − 1 rather than n, so the sample variance comes out slightly larger. That correction offsets the natural tendency of a small sample to understate the true spread of the full population.

Why variance lives in squared units

Variance is reported in squared units, so it is most useful for comparison rather than direct interpretation — a larger variance means more spread. To get back to the original units, take the square root, which is the standard deviation also shown here.

If the population and sample figures are close, your sample is large; the n versus n − 1 distinction fades as n grows. With small samples the gap is more noticeable.

A worked example

Take the dataset 8, 10, 12, 9, 11, which has n = 5, Σx = 50, and Σx² = 510. The mean is 50 / 5 = 10. Population variance is 510/5 − 10² = 102 − 100 = 2.0, giving σ ≈ 1.414. Sample variance is (510 − 50²/5) / (5 − 1) = (510 − 500) / 4 = 2.5, giving s ≈ 1.581 — slightly larger, exactly as the n − 1 divisor predicts.

Needing the sums, and the n = 1 case

This calculator needs the pre-computed sums Σx and Σx²; if you only have raw values, total them first or use the standard deviation calculator. The sum of squares must be consistent with the data, or the variance can come out distorted or even slightly negative before clamping.

Sample variance requires at least two values, since dividing by n − 1 is undefined for n = 1. Variance is also sensitive to outliers, so for heavily skewed data the interquartile range may describe spread more robustly.

Assumptions & Best Uses

  • Numerical data.

Limitations

  • Requires pre-calculated Σx and Σx²; for raw data use the standard deviation calculator.

Frequently Asked Questions

When do I use population vs sample variance?

Use population variance (÷n) when your data includes every member of the group you care about. Use sample variance (÷n−1) when your data is a sample drawn from a larger population — the usual case in research.

What is the difference between variance and standard deviation?

Variance is the average squared distance from the mean, so its units are squared. Standard deviation is the square root of the variance, which brings the spread back into the original units and is easier to interpret.

Why does sample variance divide by n−1 instead of n?

A sample tends to underestimate the true spread of the whole population. Dividing by n−1 instead of n (Bessel’s correction) nudges the estimate upward to compensate, making it unbiased.

What are Σx and Σx²?

Σx is the sum of all your data values. Σx² is the sum of each value squared (square first, then add). Both are summary totals this calculator uses so you do not have to enter every raw number.

Can variance be negative?

No. Variance is an average of squared distances, and squares are never negative, so variance is always zero or positive. A variance of zero means every value is identical.

I only have raw data, not the sums — what do I do?

Add up all your values to get Σx, then square each value and add those to get Σx². Alternatively, use the standard deviation calculator, which accepts a list of raw values directly.

Sources & References

Figures on this page are checked against primary, authoritative sources. Links open in a new tab.

Related Calculators

Note

This calculator is an educational tool. For graded coursework, exams, or professional work, double-check the method and rounding against your own requirements.

Built and maintained by Calculator Matters, an independent calculator project. Method checked against published formulas and primary sources · Last reviewed 3 June 2026 · How we calculate · Found an error? corrections@calculatormatters.com