Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
Variance Calculator

Variance Calculator

Calculate sample and population variance from any dataset, with step-by-step solutions and a full statistics summary.

Measure How Far Your Data Spreads

This variance calculator measures the average squared deviation of your data from the mean — a single number for how far the values spread out. It computes both sample variance (s²) and population variance (σ²) at once, with step-by-step solutions, entirely in your browser.

Variance is the square of the standard deviation: take the square root of variance and you get the standard deviation back, in the same units as your data.

Common Use Cases

Probability Theory

Variance is fundamental in probability and the study of random variables.

Analysis of Variance

ANOVA and many statistical tests rely on variance to compare groups.

Risk & Spread

A larger variance signals more variability — more spread around the average.

How to Calculate Variance

1

Enter Your Numbers

Type or paste your values into the input field, separated by commas, spaces, semicolons, or new lines. A live count shows how many numbers were parsed.

2

Choose Sample or Population

Select Sample (n − 1) when your data is a subset of a larger group, or Population (n) when you have every data point. The toggle starts on Sample.

3

Show the Steps

Click Show Steps to see the mean, each squared difference, and how they are summed and divided by the chosen denominator.

4

Review the Summary

Check the Summary panel for related statistics — mean, median, standard deviation, quartiles, range, and more.

The Variance Formulas

Population: σ² = Σ(xᵢ − x̄)² / n  •  Sample: s² = Σ(xᵢ − x̄)² / (n − 1). The sample formula divides by n − 1 (Bessel's correction) for an unbiased estimate.
DatasetPopulation (σ²)Sample (s²)
2, 4, 4, 4, 5, 5, 7, 9σ² = 4s² ≈ 4.57
10, 20, 30σ² ≈ 66.67s² = 100
5, 5, 5, 5σ² = 0s² = 0

Features

Sample & Population

Toggle between sample variance (s², ÷ n − 1) and population variance (σ², ÷ n).

Step-by-Step Solution

Shows the mean, each squared difference, the sum, and the final division.

Flexible Input

Accepts numbers separated by commas, spaces, semicolons, tabs, or new lines.

Adjustable Precision

Choose 2, 4, 6, or 8 decimal places for the results (default is 4).

Complete Summary

Mean, median, mode, standard deviation, quartiles, range, and more — all at once.

Private by Design

All math runs in your browser — your data never leaves your device.

Always non-negative: variance is a sum of squares, and squares are never negative — so variance can never be less than zero.

Frequently Asked Questions

What is the difference between variance and standard deviation?

Variance is the average of the squared differences from the mean. Standard deviation is the square root of variance, expressed in the same units as the original data, which makes it easier to interpret.

How do you calculate variance step by step?

Find the mean, subtract it from each value, square each difference, add the squared differences together, then divide the sum by n − 1 (sample) or n (population). Click Show Steps to watch each stage on your own data.

When should I use sample vs population variance?

Use sample variance (n − 1) when your data is a subset of a larger group, and population variance (n) when you have the complete dataset. The sample version applies Bessel's correction, which divides by n − 1 for an unbiased estimate of the true variance.

Can variance be negative?

No. Variance is a sum of squared values, and squares are never negative. The smallest possible variance is 0, which happens only when every value in the dataset is identical.

Why does sample variance divide by n − 1?

Dividing by n − 1 instead of n is Bessel's correction. Using a sample tends to underestimate the true spread, so shrinking the denominator slightly enlarges the estimate and removes that bias.

When is variance more useful than standard deviation?

Variance is convenient in mathematical work — especially probability theory and analysis of variance (ANOVA) — because its additive properties simplify the math. Standard deviation is preferred when you want a value in the original data units.

Enter Data
Data Type
Decimals
Arithmetic Mean
-
x̄ = (Σxᵢ) / n
Median
-
Middle value of sorted data
Mode
-
Most frequent value(s)
Sample Standard Deviation
-
s = √[Σ(xᵢ - x̄)² / (n - 1)]
Sample Variance
-
s² = Σ(xᵢ - x̄)² / (n - 1)
Summary Statistics
Count -
Sum -
Min -
Max -
Range -
Mean -
Median -
Mode -
Std Dev (S) -
Std Dev (P) -
Variance (S) -
Variance (P) -
Q1 -
Q2 -
Q3 -
IQR -
Variance is the square of the standard deviation: σ² = (std dev)²
Sample variance (s²) divides by n - 1; population variance (σ²) divides by n
The Sample/Population toggle starts on Sample — switch it to match your data
All calculations run locally in your browser
Want to learn more? Read documentation →
1/5
Start typing to search...
Searching...
No results found
Try searching with different keywords