Variance Calculator: Describe the Spread of a Sample or Population

Written by:
PK

Below is a variance calculator, which will calculate the variance from a list of your numbers. Enter any numbers (including negative numbers or decimals) and the tool will return the variance.

The variance calculator can work either as a sample variance calculator or a population variance calculator.

Need a different tool? Try another:

Variance Calculator

What is the Variance of a Set of Numbers?

The variance of a set of numbers is a number representing the 'spread' of the set. Formally, it is the squared deviation of a variable in a set from the set's mean and is the square of the standard deviation.

There are two "types" of variance:

  • Sample variance – the variance from a sample which does not cover the entire possible sample (e.g. a random sample of people). Usually this is the one you should use!
  • Population variance - the variance as measured from an entire population (e.g. all people)

Variance Formula

As there are two variances, there are also slightly different variance formulas. For both, first compute or estimate or otherwise find the mean or average.

Population Variance Formula

The formula for population variance is:

\delta^2=\frac{1}{N}\sum_{i=1}^N (x_i-\mu)^2

Where:

  • δ2 = population variance
  • N = number in the population
  • xi = observation in the population
  • μ = the mean in the population

Sample Variance Formula

The formula for sample variance is:

s^2=\frac{1}{n-1}\sum_{i=1}^n (x_i-m)^2

Where:

  • s2 = sample variance
  • n = number of observations in the sample
  • xi = observation in the sample
  • m = the mean of the sample

Examples of Finding a Variance

Usually time, money, and practicality limit us from looking at an entire population. In that case, we usually take a sample of a whole – let's walk through computing sample variance for a small sample of human weights.

Let's say you measure 5 adult men and find they weigh: 140, 170, 200, 210, and 320 pounds. The average of those numbers is 208 lbs.

Find the difference for each one:

140-208=-68\\170-208=-38\\200-208=-8\\210-208=2\\320-208=112

Now, square each number:

-68^2=4624\\-38^2=1444\\-8^2=64\\2^2=4\\112^2=12544

Now, add the numbers up and divide by 4 (because we have 5 samples, minus 1 – for a population, you don't correct and divide by 5):

\frac{4624+1444+64+4+12544}{5} =\\\frac{18680}{4}=4670

At this point, you could find the standard deviation (an easier number to reason with in your head!) by taking the square root of the variance of 4670 – 68.3 lbs.

Using the Variance Calculator

To use the variance calculator, enter all your numbers in the box. The input is quite forgiving – separate numbers with non-numbers and it should work. (Try commas, spaces, new lines, tabs, and the like.) In the Type pull-down, devide if you want the variance of a Population or Sample.

When you're done, hit the Compute Variance button and we'll show you the median of the list. To check we understood, look at the list length in the Number of Values Input box.

Enjoyed it? Visit our other calculators and tools.

      

PK

PK started DQYDJ in 2009 to research and discuss finance and investing and help answer financial questions. He's expanded DQYDJ to build visualizations, calculators, and interactive tools.

PK lives in New Hampshire with his wife, kids, and dog.

Don't Quit Your Day Job...

DQYDJ may be compensated by our partners if you make purchases through links. See our disclosures page. As an Amazon Associate we earn from qualifying purchases.
Sign Up For Emails
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram