Variance Calculator
Sample and population variance side by side, with the sum of squares and both deviations.
What this page computes
Paste one number per line. The page forms Σ(x − x̄)² once and divides it twice: by n − 1 for the sample variance s² and by n for the population variance σ². Both divisors are printed with their values, both square roots are printed, and the sum of squares and the mean come with them so the arithmetic can be checked by hand. Figures print to six significant figures.
Choosing between the two is a statement about what the column is: a sample drawn from something larger, or the whole population. The page does not choose for you and does not call either one the variance. A single value is refused, because the sample divisor would be zero; a non-numeric token is refused with its line number.
Nothing is sent anywhere. The same column always produces the same two variances.
The page computes the sum of squares Σ(x − x̄)² once and divides it twice: by n − 1 for the sample variance s² and by n for the population variance σ². The eight values 2, 4, 4, 4, 5, 5, 7, 9 give a sum of squares of 32, so s² = 4.57143 on 7 degrees of freedom and σ² = 4 on 8. Both lines name their divisor and the square roots are printed beside them, so the two conventions are never confused.
Get the sample and population variance from one column, with each divisor printed on its line.
How to use it
Paste your data with one value per line; a comma inside a line is refused because this page reads a column. Both variances and both standard deviations are printed together, each labelled with the divisor it used, so there is nothing to convert by hand between them.
n − 1 or n, and why both are printed
The sum of squares is identical for both answers — only the divisor differs — which is why the sample variance is always the larger of the two and the gap closes as n grows. The sample form with n − 1 is the unbiased estimator and is what a statistical test expects; the population form with n describes the data in hand as if it were the whole set. The page does not choose between them, because the right one depends on what the numbers are.
What to Expect
Best for
- Comparing the two variance conventions on the same data
What this tool keeps
- Nothing leaves this tab: the arithmetic runs in the page you are reading, and a reload discards both the input and the result.
Sample input
2 4 4 4 5 5 7 9
Sample output
sample variance s² = 4.57143 (divisor n − 1 = 7) population variance σ² = 4 (divisor n = 8) sample standard deviation s = 2.13809, population σ = 2 sum of squares Σ(x − x̄)² = 32, mean = 5 n = 8
Frequently asked questions
Which variance should I quote?
Both are printed with their divisor: n − 1 for a sample and n for a population. The choice depends on whether your values are a sample or the whole set, so the page does not make it for you.
Why is the sample variance larger?
Because both divide the same sum of squares and n − 1 is smaller than n. At n = 8 the same sum of 32 gives 4.57143 over 7 and 4 over 8.
Is my data uploaded?
No. The sum of squares, both variances and both standard deviations are computed in this page, and nothing is posted or stored.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.