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.
Common Use Cases
Probability Theory
Analysis of Variance
Risk & Spread
How to Calculate Variance
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.
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.
Show the Steps
Click Show Steps to see the mean, each squared difference, and how they are summed and divided by the chosen denominator.
Review the Summary
Check the Summary panel for related statistics — mean, median, standard deviation, quartiles, range, and more.
The Variance Formulas
| Dataset | Population (σ²) | Sample (s²) |
|---|---|---|
2, 4, 4, 4, 5, 5, 7, 9 | σ² = 4 | s² ≈ 4.57 |
10, 20, 30 | σ² ≈ 66.67 | s² = 100 |
5, 5, 5, 5 | σ² = 0 | s² = 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.
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.
No comments yet. Be the first to comment!