Variance Calculator
Enter a list of numbers to calculate the sample variance (s²) and population variance (σ²), plus the mean, sum of squares, and standard deviation — with every step shown.
- 01Calculate sample variance (÷ n − 1) and population variance (÷ n) instantly.
- 02Get the mean, sum of squares, and standard deviation in one click.
- 03See step-by-step calculations using the variance formula.
- 04Paste numbers separated by commas, spaces, or new lines.
- 05100% free and private — every calculation runs in your browser.
Variance Calculator
Try an example data set
Sample Variance (s²)
3.5
Divided by n − 1 — use for a sample
Population Variance (σ²)
2.916667
Divided by n — use for a full population
Mean (x̄)
5.5
Count (n)
6
Sum (Σx)
33
Sum of Squares (SS)
17.5
Sample Std Dev (s)
1.870829
Population Std Dev (σ)
1.707825
Step-by-step calculation
- 01Mean x̄ = Σx ÷ n = 33 ÷ 6 = 5.5
- 02Sum of squared deviations Σ(x − x̄)² = 17.5
- 03Population variance σ² = Σ(x − x̄)² ÷ n = 17.5 ÷ 6 = 2.916667
- 04Sample variance s² = Σ(x − x̄)² ÷ (n − 1) = 17.5 ÷ 5 = 3.5
- 05Population standard deviation σ = √σ² = √2.916667 = 1.707825
- 06Sample standard deviation s = √s² = √3.5 = 1.870829
Show deviation table (x − x̄)
| Value (x) | Deviation (x − x̄) | Squared (x − x̄)² |
|---|---|---|
| 4 | -1.5 | 2.25 |
| 8 | 2.5 | 6.25 |
| 6 | 0.5 | 0.25 |
| 5 | -0.5 | 0.25 |
| 3 | -2.5 | 6.25 |
| 7 | 1.5 | 2.25 |
Why Use This Variance Calculator
Sample and Population Variance
Get both the sample variance (dividing by n − 1) and the population variance (dividing by n) at the same time, so you always have the right value for your statistics problem — whether you are working with a sample or an entire population.
Step-by-Step Working
See exactly how the variance is calculated: the mean, every deviation from the mean, the squared deviations, the sum of squares, and the final division by n or n − 1. Perfect for homework, exam revision, and checking your own work.
Variance and Standard Deviation
Beyond variance, the calculator reports the sample and population standard deviation — the square root of each variance — so you can read your spread in the same units as your data without a second tool.
Flexible Data Input
Paste numbers separated by commas, spaces, tabs, or new lines. Decimals and negative numbers are supported, so you can drop in data straight from a spreadsheet column without reformatting.
Instant and Private
Everything runs entirely in your browser with no server round-trips. Your data never leaves your device, results appear instantly, and there is no signup or installation required.
Free with No Limits
Calculate the variance for as many data sets as you need — no daily limits, no account, and no paywall. The full variance and standard deviation calculator is completely free.
What Is Variance?
Variance is a measure of how spread out a set of numbers is around their mean (average). It is the average of the squared deviations from the mean: a low variance means the values cluster close to the mean, while a high variance means they are spread over a wider range. Variance is one of the most fundamental measures of variability in statistics, finance, science, and quality control.
Whether you are a student learning statistics, a researcher analysing data, or an analyst measuring risk, this variance calculator gives instant, step-by-step results for any data set.
- Sample vs Population Variance
- Population variance (σ²) divides the sum of squared deviations by n and is used when your data covers the entire population. Sample variance (s²) divides by n − 1 (Bessel's correction) and is used when your data is a sample drawn from a larger population. This variance calculator shows both.
- How Variance Relates to Standard Deviation
- Standard deviation is simply the square root of the variance. Variance is expressed in squared units, while standard deviation is expressed in the same units as the original data. Both describe the same spread — this calculator gives you variance and standard deviation together.
- The Variance Formula
- To calculate variance: find the mean, subtract the mean from each value to get the deviations, square each deviation, add them up to get the sum of squares, then divide by n (population variance) or n − 1 (sample variance).
- Why Variance Matters
- Variance quantifies how much individual values typically differ from the mean. It underpins standard deviation, confidence intervals, the normal distribution, the analysis of variance (ANOVA), portfolio risk in finance, and process control in manufacturing.
How to Use the Variance Calculator
- 01
Enter your numbers
Type or paste your data set into the input box. Separate values with commas, spaces, or new lines — for example 4, 8, 6, 5, 3, 7. Decimals and negative numbers are supported.
- 02
Click Calculate
Press the Calculate button. The tool parses your numbers and computes the mean, sum of squares, and both sample and population variance instantly in your browser.
- 03
Read the results
The headline cards show the sample variance (s²) and population variance (σ²). Below them you get the mean, count, sum of squares, and the matching sample and population standard deviation for a full picture of your data.
- 04
Review the steps
Open the step-by-step section and the deviation table to see how each value contributes — the deviation from the mean, the squared deviation, the sum of squares, and the final division. Great for learning and for checking homework.
Tips for Calculating Variance
Choose Sample or Population
Use the sample variance (n − 1) when your data is a subset drawn from a larger group, and the population variance (n) when it includes every member of the group. Picking the wrong divisor is the most common mistake in calculating variance.
Mind the Units
Variance is in squared units of your data, which can be hard to interpret directly. When you need spread in the original units, take the square root to get the standard deviation, which this calculator reports alongside the variance.
Watch for Outliers
Variance is very sensitive to extreme values because deviations are squared before being summed. A single outlier can inflate it dramatically, so inspect your data and consider whether outliers are genuine before drawing conclusions.
Keep the Mean Precise
Variance depends on the mean, so avoid rounding the mean or the intermediate deviations too early. Rounding before the final step can introduce noticeable errors — round only the final variance for reporting.
Compare With Standard Deviation
When communicating spread to a general audience, standard deviation is often clearer than variance because it shares the units of the data. Report variance for calculations and standard deviation for interpretation.
Check the Sum of Squares
The sum of squared deviations (SS) is the building block of variance. Verifying SS against the deviation table is a quick way to confirm your variance result is correct.
Variance Formulas and Definitions
Definition of variance
Variance measures how far each value in a data set lies from the mean, on average. It is the mean of the squared deviations from the mean and is reported in squared units of the data. Standard deviation is its square root.
What variance tells you
- How tightly values cluster around the mean (lower = more consistent).
- The squared spread that underlies standard deviation.
- The basis for the normal distribution, ANOVA, and confidence intervals.
- A measure of risk or volatility in finance and quality control.
Sample vs population — which to use
Use the sample variance (÷ n − 1) when your data is a sample of a larger group, and the population variance (÷ n) when it represents the entire population.
Key Variance Formulas
Mean
x̄ = Σx ÷ n
Example: (2 + 4 + 6) ÷ 3 = 4.
Sum of squares
SS = Σ(x − x̄)²
Add up the squared deviations from the mean.
Population variance
σ² = Σ(x − x̄)² ÷ n
Average of the squared deviations from the mean.
Sample variance
s² = Σ(x − x̄)² ÷ (n − 1)
Uses n − 1 (Bessel's correction) for an unbiased estimate.
Population standard deviation
σ = √σ²
Square root of the population variance.
Sample standard deviation
s = √s²
Square root of the sample variance.
Variance Calculator FAQ
Q01How do I calculate variance?
Find the mean of your data, subtract the mean from each value to get the deviations, square each deviation, add them up to get the sum of squares, then divide by n for a population or n − 1 for a sample. The result is the variance. This calculator does all of these steps for you and shows the working.
Q02What is the difference between sample and population variance?
Population variance (σ²) divides the sum of squared deviations by n and is used when your data includes the whole population. Sample variance (s²) divides by n − 1 (Bessel's correction) and is used when your data is a sample from a larger population. The calculator reports both so you can use whichever fits your problem.
Q03What is the variance formula?
Population variance: σ² = Σ(x − x̄)² ÷ n. Sample variance: s² = Σ(x − x̄)² ÷ (n − 1). In both, x̄ is the mean, x is each value, and n is the number of values. The variance is the average of the squared deviations from the mean.
Q04How is variance related to standard deviation?
Standard deviation is the square root of the variance. Variance is in squared units, while standard deviation is in the same units as your original data, which makes it easier to interpret. This variance and standard deviation calculator reports both at once.
Q05Why does sample variance divide by n − 1?
Dividing by n − 1 instead of n is called Bessel's correction. It corrects the bias that arises because a sample mean is closer to the sample's own values than the true population mean would be. Using n − 1 gives an unbiased estimate of the population variance from a sample.
Q06Can I enter decimals and negative numbers?
Yes. You can enter integers, decimals, and negative numbers separated by commas, spaces, or new lines. The calculator parses all of them and ignores extra spacing, so you can paste a column straight from a spreadsheet.
Q07Is my data sent to a server?
No. The variance calculator runs entirely in your browser using JavaScript. Your numbers are never uploaded or stored anywhere, so it is safe to use with private or sensitive data.
Q08Is this variance calculator free?
Yes, it is completely free with no limits, no signup, and no premium tier. Calculate the sample variance, population variance, and standard deviation for as many data sets as you like.