Variance Calculator
Enter your values below (comma, space, or new line separated), then choose whether you want population variance or sample variance.
What is variance in statistics?
Variance is a measure of spread. It tells you how far numbers in a dataset tend to be from the mean (average). If values are tightly clustered around the mean, variance is small. If they are spread far apart, variance is large.
In practical terms, variance helps you answer questions like:
- Are test scores fairly consistent or highly scattered?
- Are daily stock returns stable or volatile?
- Do manufacturing measurements stay close to the target value?
The formula for variance
Population variance
Use this when your data includes every value in the entire population:
- σ² = population variance
- xᵢ = each data value
- μ = population mean
- N = number of population values
Sample variance
Use this when your data is a sample from a larger population:
- s² = sample variance
- x̄ = sample mean
- n = sample size
- You divide by n - 1 (Bessel’s correction), not n.
How to calculate variance step by step
Suppose your data is: 4, 8, 6, 5, 3, 9.
- Find the mean: (4 + 8 + 6 + 5 + 3 + 9) / 6 = 35 / 6 = 5.8333
- Subtract mean from each value: xᵢ - mean
- Square each difference: (xᵢ - mean)²
- Add squared differences: Σ(xᵢ - mean)² = 22.8333
- Divide:
- Population variance = 22.8333 / 6 = 3.8056
- Sample variance = 22.8333 / 5 = 4.5667
Notice sample variance is larger because dividing by n - 1 corrects for bias when estimating population spread from a sample.
Why do we square the differences?
If you only summed raw deviations from the mean, positives and negatives would cancel out. Squaring solves that issue and gives greater weight to larger deviations. This makes variance sensitive to outliers, which can be useful when large deviations matter.
Variance vs standard deviation
Standard deviation is simply the square root of variance:
Because variance is in squared units (e.g., dollars², points²), standard deviation is often easier to interpret since it returns to the original units.
When to use population vs sample variance
- Population variance: You measured every member of the group of interest.
- Sample variance: You measured only a subset and want to infer the full population.
If you are unsure, in most real-world analysis you are using a sample, so sample variance is typically the safer default.
Common mistakes to avoid
- Using n instead of n - 1 for sample variance.
- Forgetting to square each deviation before summing.
- Using a rounded mean too early, which can slightly distort results.
- Confusing variance with standard deviation.
- Ignoring outliers that can dramatically increase variance.
Quick interpretation guide
Low variance
Data points are close to the mean. This usually indicates consistency or stability.
High variance
Data points are far from the mean. This indicates greater variability or unpredictability.
Final takeaway
To calculate variance in statistics, compute the mean, find each squared deviation from that mean, sum them, and divide by either n (population) or n - 1 (sample). Use the calculator above to check your work instantly and see each step in the process.