Free online variance calculator
Variance measures how far a set of numbers spreads out from their mean. This calculator gives population or sample variance, standard deviation, median, mode, and range.
Type
How to use
- Type or paste your numbers into the text box — commas, spaces, semicolons, and line breaks all work.
- Choose Sample (the default) or Population depending on your data.
- Variance, standard deviation, mean, median, mode, and range update instantly.
- Click “Share with my numbers” to copy a URL that restores your data.
Formulas
Population variance:
σ² = Σ(xᵢ − μ)² / n
Sample variance:
s² = Σ(xᵢ − x̄)² / (n − 1)
Standard deviation: square root of the variance.
Where:
- μ (or x̄) = mean
- n = count of values
- Σ(xᵢ − μ)² = sum of squared deviations from the mean
Worked example
Data: 2, 4, 4, 4, 5, 5, 7, 9 (n = 8)
- Mean = 40 / 8 = 5
- Squared deviations: (2−5)²=9, (4−5)²=1 × 3, (5−5)²=0 × 2, (7−5)²=4, (9−5)²=16
- Sum of squared deviations = 9 + 3 + 0 + 4 + 16 = 32
- Population variance σ² = 32 / 8 = 4 → σ = 2
- Sample variance s² = 32 / 7 ≈ 4.5714 → s ≈ 2.138
Notes
- Sample variance requires at least 2 values; population variance works with 1 or more.
- Mode shows all values tied for the highest frequency. If no value repeats, mode is listed as “None.”
- Results are rounded to 8 significant figures.
Frequently asked
What is variance?
Variance is the average of the squared differences from the mean. A high variance means values are spread widely; a low variance means they cluster near the mean.
What is the difference between population and sample variance?
Population variance divides the sum of squared differences by n. Sample variance divides by n − 1 (Bessel's correction) to give an unbiased estimate when working with a subset of data.
When should I use population vs. sample variance?
Use population variance when you have data for every member of the group. Use sample variance when your data is a sample drawn from a larger population.
What is standard deviation?
Standard deviation is the square root of variance. It expresses spread in the same units as the original data, making it easier to interpret.
Why does sample variance use n − 1?
Dividing by n − 1 corrects for the fact that a sample tends to underestimate the true population spread. This is called Bessel's correction.
How do I enter my numbers?
Type or paste values separated by commas, spaces, semicolons, or line breaks. Any mix of delimiters works.
Related calculators
- Standard deviation calculator
Population σ and sample s standard deviation, variance, and mean from a list of numbers.
- Average calculator
Mean, median, mode, range, min, max, and sum for any list of numbers.
- Range and IQR calculator
Min, max, range, quartiles Q1–Q3, IQR, and outliers for any data set.
- Percentage calculator
Find a percentage of a number, or work backwards to the whole.