Variance Calculator

Calculate the sample or population variance of any dataset instantly — just paste your numbers. This free calculator shows every step from the mean to the final result, plus the standard deviation, sum of squares, and a live distribution chart.

Textbook-accurate formulas · Reviewed July 2026 · Sample variance uses Bessel’s correction (n − 1)

Enter Your Data

Your numbers0 values

Works with commas, spaces, tabs, or line breaks. Decimals and negatives are fine.

Data type

Use Sample when your data is a subset of a larger group (most common). Use Population only when you have every member of the group.

Your Result

Sample Variance (s²)
Enter numbers to see your result
Std deviation
Mean
Count
Sum of squares

Distribution & Spread

Your values, with the mean and ±1 SD band

  • Value frequency
  • Mean
  • ±1 SD range

What Is Variance?

Variance is a measure of how spread out a set of numbers is. It tells you, on average, how far each value sits from the mean — but because it works with squared distances, larger deviations count much more heavily than small ones. A small variance means your data clusters tightly around the average; a large variance means the values are scattered widely. Variance is one of the most fundamental ideas in statistics, and it’s the foundation the standard deviation is built on: the standard deviation is simply the square root of the variance.

The one quirk of variance is its units. Because it squares the deviations, variance is expressed in squared units — if your data is in dollars, the variance is in “dollars squared,” which isn’t very intuitive. That’s exactly why the standard deviation exists: taking the square root brings the measure back into the original units. Even so, variance is indispensable, because it’s the quantity that adds up cleanly in more advanced methods like ANOVA, regression, and portfolio theory.

The Variance Formula

There are two versions of the variance formula, and the only difference is the denominator. For a sample — a subset of a larger group — the formula is:

s² = Σ(xᵢ − x̄)² / (n − 1)

For a population — where you have every member of the group — it’s:

σ² = Σ(xᵢ − μ)² / N

Here x̄ (or μ) is the mean, n (or N) is the number of values, and Σ(xᵢ − x̄)² is the “sum of squares” — the total of every squared deviation from the mean. The calculator above lets you switch between the two forms with one tap and shows precisely which numbers go where.

How to calculate variance step by step

  1. Find the mean. Add up all your values and divide by how many there are.
  2. Find each deviation. Subtract the mean from every value.
  3. Square each deviation. This removes negative signs and emphasizes larger gaps.
  4. Add up the squared deviations to get the sum of squares.
  5. Divide by n − 1 for a sample, or by N for a population. The result is the variance.

Sample vs. Population Variance: Which Should You Use?

This is the question that trips up most students. If your data represents every single member of the group you care about — every employee in one specific office, every item in a finished batch — use the population formula and divide by N. If your data is a sample standing in for a larger group you can’t fully measure — 500 survey respondents representing millions, 30 test subjects in a trial — use the sample formula and divide by n − 1. In practice, sample variance is what you’ll use most of the time.

 Sample Variance (s²)Population Variance (σ²)
When to useData is a subset of a larger groupData includes the entire group
Denominatorn − 1 (Bessel’s correction)N (total count)
Symbolσ² (sigma squared)
Mean symbolx̄ (x-bar)μ (mu)
Most common?Yes — used most of the timeLess common in practice

Why sample variance divides by n − 1

Dividing by n − 1 instead of n is called Bessel’s correction. The intuition: your sample values naturally sit a little closer to the sample mean than to the true population mean, because the sample mean is calculated from those very values. That makes the raw spread come out slightly too small. Dividing by the smaller number, n − 1, nudges the estimate upward just enough to correct that bias, giving an unbiased estimate of the population variance. The effect is large for tiny samples and negligible once you reach the hundreds.

Variance vs. Standard Deviation

Variance and standard deviation measure the same thing — spread — and are directly linked: the standard deviation is the square root of the variance, and the variance is the standard deviation squared. The practical difference is units. Variance is in squared units, which makes it awkward to interpret on its own but ideal for the math inside statistical models. Standard deviation is in the original units, which makes it easy to read and report. Most of the time you’ll present the standard deviation and use variance under the hood.

 VarianceStandard Deviation
DefinitionAverage of squared deviationsSquare root of the variance
UnitsSquared units of the dataSame units as the data
Best forMath inside models (ANOVA, regression)Interpreting and reporting spread
Symbols² or σ²s or σ

To work directly with the standard deviation, use our Standard Deviation Calculator. For a complete breakdown of a dataset — mean, median, quartiles, and more — try the Descriptive Statistics Calculator.

Where Variance Is Used

  • Finance: variance measures the volatility and risk of investment returns and underpins modern portfolio theory.
  • ANOVA & experiments: analysis of variance compares the variance between groups to the variance within them.
  • Quality control: tracking variance flags when a process is drifting out of tolerance.
  • Machine learning: the bias–variance tradeoff is central to model performance.
  • Research: variance quantifies the reliability and consistency of measurements.

Frequently Asked Questions

Variance is a number that describes how spread out a dataset is. It’s the average of the squared distances between each value and the mean. A small variance means the values are close to the average; a large variance means they’re widely scattered. Because it uses squared distances, variance is always non-negative, and it’s the basis for the standard deviation, which is simply its square root.

The only difference is the denominator. Population variance divides the sum of squared deviations by N, the total number of values, and is used when your data covers the entire group. Sample variance divides by n − 1 instead, which corrects for the bias that arises when estimating a population’s spread from a sample. Use sample variance when your data is a subset of a larger population — this is the most common case.

They’re two sides of the same coin. The standard deviation is the square root of the variance, and the variance is the standard deviation squared. Variance is expressed in squared units, while standard deviation is in the original units of the data, which makes it easier to interpret. If you know one, you can always find the other, and this calculator reports both.

No. Variance can never be negative, because it’s calculated from squared deviations, and squaring any real number produces a non-negative result. The smallest possible variance is zero, which happens only when every value in the dataset is identical — meaning there’s no spread at all. If you ever get a negative variance, there’s a calculation error somewhere.

Because the formula squares each deviation from the mean before averaging. Squaring removes negative signs so deviations don’t cancel out, but it also changes the units — if your data is in kilograms, the variance is in kilograms squared. That’s not intuitive to interpret, which is exactly why the standard deviation, the square root of the variance, is often reported instead: it brings the measure back into the original units.

The sum of squares is the total of all the squared deviations from the mean — the numerator in the variance formula, written Σ(xᵢ − x̄)². You calculate it by subtracting the mean from each value, squaring the result, and adding those squares together. Dividing the sum of squares by n − 1 (sample) or N (population) gives the variance. This calculator shows the sum of squares explicitly in its results.

Methodology & formulas used

This calculator uses standard textbook formulas, reviewed July 2026. All computation runs locally in your browser; your data is never uploaded.

  • Mean: x̄ = Σxᵢ / n
  • Sum of squares: SS = Σ(xᵢ − x̄)²
  • Sample variance: s² = SS / (n − 1)
  • Population variance: σ² = SS / N
  • Standard deviation: the square root of the variance

Sample mode applies Bessel’s correction (n − 1) to give an unbiased estimate of the population variance. Results are rounded for display but computed at full precision. Sample variance requires at least two values so that n − 1 is not zero.

References

  1. NIST/SEMATECH. Standard Deviation and Variance — e-Handbook of Statistical Methods. itl.nist.gov
  2. Bessel’s Correction — the n − 1 basis for unbiased sample variance. en.wikipedia.org
  3. Variance — definition and properties. en.wikipedia.org