Variance Calculator
Paste your data to get sample or population variance and standard deviation, with a table of deviations and squared deviations showing every step.
Calculate variance, standard deviation, and other statistical measures for a dataset. Variance measures how spread out data points are from the mean, helping you understand data distribution and variability.
Data Input
Variance Calculator: Get Your Answer Now
Most people who land on a variance calculator have the wrong idea about the number they are about to get. They expect a single, interpretable figure in the same units as their data, like a length in metres or a price in dollars. That number does not exist as variance. What you are about to compute from your dataset is an average of squared differences from the mean, and that result is in squared units: dollars squared, metres squared, test-points squared. The tool gives you the raw variance, its square root (the standard deviation, which is in the original units), and the full work to copy, so you can see exactly where every number comes from.
How to Enter Data
Paste your numbers into the input field separated by commas, spaces, tabs, or new lines. A spreadsheet column pastes directly, one value per line. The calculator strips whitespace and rejects any entry that is not a plain number, no currency symbols, no percentage signs, no trailing text like "3abc". If your dataset contains a non-numeric entry, the tool throws an error with the exact invalid value so you can fix it before recalculating.
Enter at least one value for a population variance calculation. For a sample variance you need at least two values, because the denominator n − 1 would be zero with a single data point, making the result undefined. The calculator checks this and returns a clear error message, not a division-by-zero crash.
Sample Or Population? A 10-Second Rule
This is the fastest way to decide which button to click. If your dataset contains every single member of the group you care about, every student in a class of 25, every defective unit produced on one shift, every country's GDP in 2025, use Population Variance (n). Almost nobody outside a census bureau has this luxury.
If your dataset is a subset, even a large one, use Sample Variance (n − 1). The n − 1 divisor, called Bessel's correction, adjusts for the fact that you are estimating the population mean from your sample, which slightly underestimates the true spread. The correction makes the sample variance an unbiased estimator of the population variance. If you are an AP Stats student, an Excel analyst choosing between VAR.S and VAR.P, or a CFA candidate, this is the button you hit more than 90% of the time.
Worked Example: 85, 92, 78, 89, 96
Run these five scores through the calculator with Sample Variance (n − 1) selected and decimal places set to 4. Watch the steps panel as it builds the answer row by row.
Step 1: The Mean
Sum = 85 + 92 + 78 + 89 + 96 = 440. Mean (x̄) = 440 ÷ 5 = 88.0000.
Step 2: Deviations
For each score, subtract 88: (85 − 88) = −3, (92 − 88) = 4, (78 − 88) = −10, (89 − 88) = 1, (96 − 88) = 8. The deviation column in the output is labelled (x − x̄) even in sample mode, because the formula uses the sample mean, not the population mean.
Step 3: Squared Deviations
Square each deviation: (−3)² = 9, (4)² = 16, (−10)² = 100, (1)² = 1, (8)² = 64. The squared deviation column is labelled (x − x̄)².
Step 4: Sum of Squared Deviations
9 + 16 + 100 + 1 + 64 = 190. This is the sum of squares (SS), the raw numerator before dividing by n or n − 1.
Step 5: Sample Variance
s² = 190 ÷ (5 − 1) = 190 ÷ 4 = 47.5000. The calculator also shows the population variance (190 ÷ 5 = 38.0000) in the results panel so you can compare.
Step 6: Sample Standard Deviation
This is the number that is in the original units (test points).
Reading the Output: Variance, Standard Deviation, Sum of Squares
The results panel shows three related numbers that beginners frequently confuse. The variance (sample s² or population σ²) is the average of the squared deviations. It tells you the average squared distance from the mean, but because the squares are in squared units, the number is not directly interpretable. A variance of 47.5 test-points² means nothing to a teacher. The standard deviation (s or σ) is the square root of variance, putting it back into original units, about 6.9 test points in our example. The sum of squares (SS) is the total of the squared deviations before dividing by anything. It grows with sample size, so you cannot compare SS across datasets, but it is the building block for variance and for other statistics like the coefficient of variation.
The calculator also displays the mean, count, minimum, maximum, range, and a full data table with each point's value, deviation, and squared deviation. You can copy these steps directly into a homework assignment or a lab report. The accompanying chart plots data points against the mean and the mean ± 1 standard deviation lines, so you see the spread visually.
What Variance Tells You (And Why It Is In Squared Units)
Variance measures how spread out data points are around the mean. A low variance means most values sit near the average, consistent, predictable. A high variance means values are scattered widely, volatile, risky. The units of variance are always the square of the original unit, which is why the standard deviation exists. If you are comparing spread across datasets with different scales, say the variance of test scores in points² and the variance of income in dollars², you cannot compare the raw variances directly. That is where the coefficient of variation (CV = σ ÷ μ) comes in, a unitless ratio that lets you compare relative variability. But the CV is only valid for ratio-scale data with a positive mean; applying it to interval data or a mean near zero produces a meaningless number.
In finance, portfolio variance for two assets includes a covariance term, which means diversification can actually reduce total risk. In quality control, variance tracks manufacturing consistency. In education, it shows the spread of student performance. OpenStax Introductory Statistics 2e section 2.7 covers variance as a measure of spread, and NIST/SEMATECH e-Handbook of Statistical Methods 1.3.5.6 treats it as a measure of scale. Both sources agree on the central fact: variance is the average squared distance from the mean, and you interpret it through its square root.
Sample Variance Calculator vs Population Variance Calculator
These two calculators differ by exactly one denominator. The sample variance calculator divides the sum of squared deviations by n − 1. The population variance calculator divides by n. The difference matters because the sample version is an unbiased estimator of the true population variance, if you drew many samples and computed the sample variance for each, their average would equal the population variance. The population version on a sample would be biased low, consistently underestimating the true spread.
If you are working in Excel, VAR.S computes sample variance and VAR.P computes population variance. On a TI-84, the 1-Var Stats command outputs both σx (population standard deviation) and Sx (sample standard deviation). Choose σx when you have the entire population, Sx when you have a sample. A common mistake is picking σx because it appears first in the output, underestimating the spread of the sample's underlying population.
Standard Deviation And Variance Calculator: Why Two Numbers
A standard deviation and variance calculator is a single tool that solves both problems, because the two are a pair. Variance is the square of standard deviation, and standard deviation is the square root of variance. If you have one, you have the other. The reason you need both is interpretability: variance is mathematically convenient (it adds for independent random variables) but is in squared units; standard deviation puts the spread back in the original units. When a textbook says the variance of a sum of independent variables is Var(X) + Var(Y), that property only holds for variance, not for standard deviation. When a finance report says an investment's risk is a 5% standard deviation, it reports the square root, not the squared percentage.
Do not confuse the two. A dataset with variance 25 has a standard deviation of 5, not 25. Reporting variance as if it were standard deviation, or vice versa, is the single most common error in introductory statistics assignments. The calculator outputs both clearly labelled so you can avoid that error.
How to Calculate Variance By Hand (And When to Stop)
The manual method is: find the mean, subtract the mean from each value, square each difference, sum the squares, divide by n (population) or n − 1 (sample). The calculator automates this for datasets longer than about five numbers, but if you only have a handful of values, doing it by hand once builds the intuition for what variance actually measures. OpenStax Introductory Statistics 2e section 2.7 shows the formula with a worked example. For anything beyond a quiz, use the calculator. The steps panel shows every intermediate number, so you still get the learning benefit without the arithmetic risk.
| Metric | Sample (n − 1) | Population (n) |
|---|---|---|
| Sum of Squared Deviations (SS) | 190 | 190 |
| Variance | 47.5000 | 38.0000 |
| Standard Deviation | 6.8922 | 6.1644 |
| Mean | 88.0000 | 88.0000 |
| Count | 5 | 5 |
What Variance Tells You (And Why It Is In Squared Units)
Variance measures how spread out data points are around the mean. A low variance means most values sit near the average, consistent, predictable. A high variance means values are scattered widely, volatile, risky. The units of variance are always the square of the original unit, which is why the standard deviation exists. If you are comparing spread across datasets with different scales, say the variance of test scores in points² and the variance of income in dollars², you cannot compare the raw variances directly. That is where the coefficient of variation (CV = σ ÷ μ) comes in, a unitless ratio that lets you compare relative variability. But the CV is only valid for ratio-scale data with a positive mean; applying it to interval data or a mean near zero produces a meaningless number.
In finance, portfolio variance for two assets includes a covariance term, which means diversification can actually reduce total risk. In quality control, variance tracks manufacturing consistency. In education, it shows the spread of student performance. OpenStax Introductory Statistics 2e section 2.7 covers variance as a measure of spread, and NIST/SEMATECH e-Handbook of Statistical Methods 1.3.5.6 treats it as a measure of scale. Both sources agree on the central fact: variance is the average squared distance from the mean, and you interpret it through its square root.
Common Questions
Can variance be negative?
No. Variance averages squared deviations, and squaring always gives a non-negative number. A variance of zero means all data points are identical. If you get a negative variance, you made a calculation error, most often forgetting to square the deviations before summing them.
Why is variance in squared units, and what does that mean?
Variance is in squared units because each deviation is squared before averaging. If your data is in metres, variance is in metres². That number has no physical interpretation, you cannot say the spread is 25 square metres. That is why standard deviation, the square root of variance, is the number you report: it is back in the original units.
Why do we divide by n − 1 for a sample?
This is Bessel's correction. When you calculate the sample mean from a sample, you use up one degree of freedom because the deviations must sum to zero. Dividing by n − 1 instead of n gives an unbiased estimate of the population variance. If you divided by n on a sample, you would consistently underestimate the true population variance, especially with small samples.
What does a variance of zero mean?
A variance of zero means every value in the dataset is identical. There is no spread at all. This can happen in a sample where all measurements are the same, or in a population where the characteristic being measured does not vary. It does not mean the data is wrong, it means there is no variability to measure.
When should I recalculate variance?
Recalculate whenever your dataset changes. This includes adding new data points, removing outliers, or if the process generating the data shifts, for example, after a new quality control procedure is implemented in manufacturing, or after a portfolio rebalancing in finance. In practice, variance is often recalculated monthly or quarterly for tracking volatility.