How to Calculate Variance in Excel

Photo of author

By Victor Ashiedu

Published

Variance measures the spread between numbers in a data set. You can calculate variance in Excel using the VAR, VAR.S, VARP or VAR.P.

VAR.S and VAR.P are the newer versions of the VAR and VARP functions. For this guide, VAR.S and VAR.P functions will be used in the demo.

Option 1: Calculate Variance with Sample of a Population

The image below column A contains a data set.

To calculate variance in Excel using the sample data shown above, use the VAR.S function.

The syntax of VAR.S function is

VAR.S(number1,[number2],...) 

Number1 (required) – represents the first number in a sample of a population
Number2 (optional) – represents a number between 2 to 254 in a sample of a population

Important Notes

  1. Use the VAR.S function if your data set represents a sample of the population. If your data represents the entire population, use VAR.P to compute your variance instead.
  2. Number1, Number2 etc can either be numbers or names, arrays, or references that contain numbers.
  3. If the input of VAR.S is an array or reference, only numbers in that array or reference are counted.
  4. To include logical values and text representations of numbers in a reference to your calculation, use the VARA function.
  5. VAR.S uses the formula below:
Excel Variance Formula
from Microsoft.com

In the formula above, x is the Mean of the sample. The Mean is calculated using AVERAGE(number1,number2,…). n is the sample size.

Later in this guide I will use the formula in no 5 above to calculate variance from Mean.

Using the data shown in the previous image, to calculate the variance, use the formula below:

=VAR.S(A2:A11)

Here is the result in Excel

How to Calculate sample Variance in Excel with VAR.S function

Option 2: Calculate Variance with Entire Population

In the last section I showed how to calculate variance using sample of a data set. If you want to use the entire population you need to use the VAR.P function.

The syntax of the VAR.P is similar to VAR.S.

To calculate the variance of the entire population shown in the previous image, use this formula:

=VARP(A2:A11)

The result is shown below:

How to Calculate Variance in Excel with VAR.P function

As you can see from the result, the result is different from the the result for VAR.S function.

Option 3: Calculate Variance from Mean

So far I have shown how to calculate variance in Excel using the VAR.S and VAR.P functions.

In this section, I will show how to calculate variance in Excel using the Mean of a sample population.

The worksheet in the image below will be referenced in this demo.

calculate-variance-from-Mean

The next steps show how to use the formula below to calculate variance:

Excel Variance Formula

Here are the steps:

  • Calculate the Mean (Average) of the sample using the formula:
=AVERAGE(A2:A11)

The result is shown in cell C13 (See the image above).

  • Next, calculate the dispersion of each of the sample from their Mean. To do this, subtract each sample data from the Mean. The results are in cells B2 to B11.
  • Then square the dispersion from the Mean. Cells C2 to C11 contains the squared values.
  • Next, sum the squared values. The result of the sum is 6788.4. See cell C14.
  • The next step is to count the total sample and subtract 1 from it. Here is the formula used (C15).
=COUNT(A2:A11)-1
  • Finally, to calculate the variance divide C14 by C15. The formula is in cell C16
=C14/C15

The result is 754.2667. The same value we got with VAR.S function.

This last section will be useful for college students. If you are required to calculate variance but show the steps, use the steps in this section.

Conclusion

Variance calculation using Excel is very straight forward. In this guide I showed various ways you can calculate variance in Excel.

In the last section you saw how to perform variance calculation from the Mean of a sample. Use this if you need to show steps to calculate variance.

If you were able to calculate Variance in Excel by following the steps in this guide, kindly spare 1 minute to let us know by responding to the “Was this page helpful?” question below.

Alternatively, you can share your experience with our community using the comment (“Leave a Reply”) form at the bottom of this page.

About the Author

Photo of author

Victor Ashiedu

Victor is the founder of InfoPress Media, publishers of Ilifeguides and Itechguides. With 20+ years of experience in IT infrastructure, his expertise spans Windows, Linux, and DevOps. Explore his contributions on Itechguides.com for insightful how-to guides and product reviews.

Related Articles

Get in Touch

We're committed to writing accurate content that informs and educates. To learn more, read our Content Writing Policy, Content Review Policy, Anti-plagiarism Policy, and About Us.

However, if this content does not meet your expectations, kindly reach out to us through one of the following means:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment

Send this to a friend