Sample Variance Calculator

Enter a data set to find the mean, sample variance and population variance, with standard deviations.

โ€”

Variance measures how spread out data is โ€” the average of the squared distances from the mean. Sample variance divides that sum of squares by n โˆ’ 1 (one less than the count) to estimate a population from a sample; population variance divides by n. The standard deviation is the square root of the variance.

Advertisement

How to Use This Calculator

Enter your data as a comma-separated list. The calculator returns the mean, the sample variance (dividing by n โˆ’ 1) and the population variance (dividing by n), along with both standard deviations.

Use the sample version when your data is a sample from a larger group you want to estimate, and the population version when your data is the entire group. The sample version is the more common default in statistics.

How the Calculation Works

First the mean is found. Then each value's distance from the mean is squared, so positives and negatives don't cancel, and these squared distances are summed.

Dividing that sum by n gives the population variance. Dividing by n โˆ’ 1 gives the sample variance โ€” the slightly larger figure known as Bessel's correction, which compensates for the fact that a sample tends to underestimate the true spread. The standard deviation is simply the square root.

variance = ฮฃ(x โˆ’ mean)ยฒ รท (n โˆ’ 1 for sample, n for population)

Worked Example

For the data 2, 4, 4, 4, 5, 5, 7, 9: the mean is 40 รท 8 = 5, and the squared deviations sum to 32.

The population variance is 32 รท 8 = 4 (standard deviation 2), and the sample variance is 32 รท 7 = 4.571 (standard deviation about 2.14).

Assumptions and Limitations

  • Sample variance uses n โˆ’ 1; population variance uses n
  • Enter numeric values separated by commas; other entries are ignored
  • Standard deviation is the square root of variance
  • Variance is sensitive to outliers because deviations are squared

Who Uses a Variance Calculator

Statistics students and researchers use this to find the sample and population variance and standard deviation from a data set. Run it to measure spread, complete an assignment, or prepare data for further analysis. Paste your numbers to get both versions plus the mean.

Frequently Asked Questions

What is the difference between sample and population variance?

Population variance divides the sum of squared deviations by n; sample variance divides by n โˆ’ 1. The n โˆ’ 1 correction makes the sample variance an unbiased estimate of the population's variance.

Why divide by n โˆ’ 1 for a sample?

Because a sample tends to cluster slightly closer to its own mean than to the true population mean, underestimating spread. Dividing by n โˆ’ 1 (Bessel's correction) compensates for that bias.

How is variance related to standard deviation?

Standard deviation is the square root of variance. Variance is in squared units, while standard deviation is in the original units, which makes it easier to interpret.

How do you calculate variance?

Find the mean, square each value's distance from it, sum those squares, then divide by n โˆ’ 1 for a sample or n for a population.

Which one should I use?

Use sample variance when your data is a sample meant to represent a larger population, which is most common. Use population variance only when your data is the complete population.

Looking for a different calculator?

CalculatorPlus has free tools across finance, construction, math, health and more โ€” each one showing the formula and a worked example.