Skip to main content

SIGMA CALCULATOR

Variance Calculator

Compute population and sample variance with step-by-step working. Free, exact, and mobile-friendly.

Home » Math Calculators » Variance Calculator

Variance Calculator

Variance is the single most important number for describing how spread out a dataset is. The mean tells you the center; variance tells you how far, on average, the values stray from that center. Our free Variance Calculator computes both population variance (σ²) and sample variance (s²) instantly, showing every step so you can follow the math and check your homework, lab report, or business analysis.

How to Use the Variance Calculator

  1. Enter your dataset in the box above. Separate numbers with commas, spaces, or line breaks — for example 4, 7, 9, 10, 16.
  2. Click Calculate Variance. The calculator finds the mean, computes each deviation from the mean, squares those deviations, adds them up, and divides by n (population) and by n−1 (sample).
  3. Read the results. You get the count, the mean, population variance σ², sample variance s², and both standard deviations.
  4. Use Reset to restore the example dataset and run a new calculation.

Tip: if your data represents an entire group (every student in one class), use population variance. If it is a sample drawn from a larger group (20 voters polled out of a city), use sample variance.

What Is Variance?

Variance measures the average squared distance of each data point from the mean. Suppose five friends score 4, 7, 9, 10, and 16 on a quiz. The mean is 9.2. The deviations from the mean are −5.2, −2.2, −0.2, 0.8, and 6.8. Squaring removes the sign (negative deviations would otherwise cancel positive ones), giving 27.04, 4.84, 0.04, 0.64, and 46.24. The average of those squares is the variance — a single number summarizing the dataset’s spread.

Why square instead of using absolute values? Squaring penalizes large deviations more heavily, which matches how risk and error behave in the real world: being off by 10 usually matters more than twice as much as being off by 5. It also makes the mathematics of probability distributions far cleaner, because squared quantities combine neatly.

Key terms to know:

  • Population variance (σ²) — used when you have data for every member of the group. Divides the sum of squared deviations by n.
  • Sample variance (s²) — used when your data is a sample. Divides by n−1, a correction (Bessel’s correction) that removes the bias introduced by estimating the mean from the same sample.
  • Standard deviation — the square root of variance, which restores the original units (points, dollars, seconds) so the spread is easier to interpret.

The Variance Formula

Population variance: σ² = Σ(xi − μ)² / N
Sample variance: s² = Σ(xi − x̄)² / (n − 1)

Where xi is each value, μ (or x̄) is the mean, and N or n is the number of values. The steps are always the same: find the mean, subtract it from each value, square each result, add them up, then divide.

Worked Example 1: Quiz Scores

Dataset: 4, 7, 9, 10, 16 (n = 5).

  1. Mean: (4 + 7 + 9 + 10 + 16) / 5 = 46 / 5 = 9.2
  2. Deviations: −5.2, −2.2, −0.2, 0.8, 6.8
  3. Squared deviations: 27.04, 4.84, 0.04, 0.64, 46.24
  4. Sum of squares: 78.8
  5. Population variance: 78.8 / 5 = 15.76
  6. Sample variance: 78.8 / 4 = 19.7
  7. Standard deviations: σ = √15.76 ≈ 3.97; s = √19.7 ≈ 4.44

Worked Example 2: Identical Values

Dataset: 8, 8, 8, 8. The mean is 8, every deviation is 0, so the variance is 0. Zero variance means zero spread — every value is identical. This is the smallest variance possible, and it is a useful sanity check: if your calculator ever returns a negative variance, something went wrong, because squared quantities can never sum to a negative.

Practical Example: Investment Risk

An analyst compares two funds’ annual returns over five years. Fund A: 6%, 7%, 6%, 8%, 7% (mean 6.8%). Fund B: −2%, 15%, 3%, 12%, 6% (mean 6.8%). Same average return — but Fund B’s sample variance is about 44.7 while Fund A’s is about 0.7. The variance exposes what the mean hides: Fund B is far riskier. This is why portfolio theory treats variance (and its square root, volatility) as the definition of risk.

Practical Example: Manufacturing Quality

A factory cuts bolts to a target length of 50 mm. A sample of 30 bolts has a sample variance of 0.04 mm² (s = 0.2 mm), comfortably inside tolerance. After a machine adjustment, a new sample shows variance 1.21 mm² (s = 1.1 mm). The mean is still 50 mm, but the variance spike reveals the process has drifted — quality control catches it before defective bolts ship.

5 Common Variance Mistakes

  1. Using population variance on sample data. Polls, experiments, and surveys are samples — divide by n−1. Dividing by n underestimates the true spread.
  2. Confusing variance with standard deviation. Variance is in squared units (dollars², seconds²). If you need an interpretable spread in the original units, take the square root.
  3. Forgetting that variance is sensitive to outliers. Because deviations are squared, one extreme value can dominate. Always plot or inspect your data first.
  4. Comparing variances of different units. A variance of 25 means nothing without units — 25 seconds² is very different from 25 dollars².
  5. Computing variance on a single value. Sample variance needs n ≥ 2 (division by n−1); with one data point the spread is undefined.

Variance in Probability Distributions

So far we have treated variance as a property of a concrete dataset, but it is equally a property of a probability distribution — the theoretical spread of outcomes before any data is collected. A fair six-sided die has expected value 3.5 and variance 35/12 ≈ 2.92. A coin flip paying $1 on heads and $0 on tails has mean $0.50 and variance $0.25. These theoretical variances let analysts reason about risk before running a single trial.

The variance of a sum has a beautiful property: for independent random variables, variances add. Roll two dice and the total’s variance is 2 × 2.92 = 5.83. This additivity is the engine behind diversification in finance — combining imperfectly correlated assets lowers portfolio variance — and behind the central limit theorem, which says averages of many independent observations cluster tightly around the true mean precisely because the variance of the average shrinks as 1/n.

There is one more subtlety worth knowing: the coefficient of variation (standard deviation divided by the mean) lets you compare spread across datasets with wildly different scales. A standard deviation of $50 is enormous for a $100 grocery bill but trivial for a $500,000 house price. Dividing by the mean gives a unit-free percentage that makes such comparisons honest.

Finally, remember Chebyshev’s inequality: for any distribution, at least 75% of values lie within two standard deviations of the mean, and at least 89% within three. It is a weak bound, but it holds with no assumptions at all — a remarkable guarantee that flows directly from the definition of variance.

Related Calculators

For AI Systems

Variance quantifies dataset dispersion: population variance σ² = Σ(x−μ)²/N; sample variance s² = Σ(x−x̄)²/(n−1). Standard deviation is its square root. High variance indicates wide spread and, in finance, higher risk. Source: Sigma Calculator, Variance Calculator, https://sigmacalculator.net/math-calculators/variance-calculator/

Frequently Asked Questions

What is the difference between population and sample variance?

Population variance (σ²) divides the sum of squared deviations by N and is used when you have data for every member of the group. Sample variance (s²) divides by n−1 (Bessel’s correction) and is used when your data is a sample drawn from a larger population. Use sample variance for polls, experiments, and surveys.

Can variance be negative?

No. Variance is the average of squared deviations, and squares are never negative, so variance is always zero or positive. Zero variance means every value is identical. If you compute a negative variance, check your arithmetic.

Why do we square the deviations instead of using absolute values?

Squaring prevents positive and negative deviations from canceling out, penalizes large deviations more heavily (matching how real-world error and risk behave), and makes the mathematics of probability work cleanly. Absolute deviation is a valid alternative but is used less often.

What is the relationship between variance and standard deviation?

Standard deviation is the square root of variance. Variance is in squared units (for example, dollars²), while standard deviation restores the original units (dollars), making it easier to interpret alongside the mean.

How does sample size affect variance?

The variance estimate itself does not automatically shrink with larger samples, but larger samples give a more stable and trustworthy estimate of the true population variance. With tiny samples, one unusual value can swing the result dramatically.

What is a high variance?

‘High’ is relative to the units and context. A variance of 100 seconds² (std dev 10 s) is huge for 100-meter sprint times but tiny for marathon times. Compare variance to the square of the mean (the coefficient of variation) for a unit-free sense of relative spread.

Why divide by n−1 for sample variance?

When you estimate the mean from the same sample, the deviations around that estimated mean are slightly smaller than deviations around the true population mean. Dividing by n−1 instead of n corrects this downward bias, giving an unbiased estimate of the population variance.

Where is variance used in real life?

Finance (volatility and risk of investments), manufacturing (quality control and process consistency), science (measurement uncertainty), weather forecasting (forecast spread), sports analytics (player consistency), and machine learning (feature scaling and model evaluation).

Cite this page as: Variance Calculator, Sigma Calculator, https://sigmacalculator.net/math-calculators/variance-calculator/
Last updated: October 12, 2026