How to Calculate Variance and Standard Deviation in Excel

Basics of Variance and Standard Deviation

Variance examines how distinct numerical values relate to one another within a data collection. It treats all values that have deviated from the mean equally, regardless of their direction. Standard Deviation overviews how the values are distributed over a given dataset.

There are two types of Variance statisticians usually take into account, and the corresponding formula can be described as follows:

  • Population variance

How to Calculate Variance and Standard Deviation in Excel

  • Sample variance

Formula of Sample variance to calculate variance and standard deviation in Excel

  • X= Value of each data point,
  • μ= Mean value,
  • N= Sample Size.

The formula of Standard Deviation is nearly identical to that of the Variance. When you square root each Variance, you get the corresponding Standard Deviation.


Methods to Calculate the Variance and Standard Deviation in Excel

We have a dataset for Student Height in Grade 7.

How to Calculate Variance and Standard Deviation in Excel


Part 1 – Calculating Variance


Method 1.1 – Using an Arithmetic Formula

Steps:

  • Enter the following formula in cell C13.
=AVERAGE(C5:C10)
 

  • Hit Enter.

Using arithmetic formula to Calculate Variance and Standard Deviation in Excel

  • Use the following formula in cell D5.
  =C5-$C$13 

C5 and C13 cells refer to the student’s Height and the Average values, respectively.

Using Arithmetic Formula to Calculate Variance in Excel

Using Arithmetic Formula to Calculate Variance in Excel

  • To get the squared value of Deviation, use the following formula in cell E5.
=D5^2 

D5 refers to the Deviation.

Using Arithmetic Formula to Calculate Variance in Excel

  • Drag the Fill Handle tool from E5 to E10.

Drag the fill handle tool

  • Use the following formula in cell E11 to calculate the sum of the squared deviation value.

=SUM(E5:E10) 

Using Arithmetic Formula to Calculate Variance in Excel

  • To calculate the Sample Variance, enter the following formula in cell C14.

=E11/(COUNTA(C5:C10)-1) 

Formula Breakdown

  • COUNTA(C5:C10) → The COUNTA function counts the number of cells in a range that are not empty. Here, the C5:C10 is the value1 argument that refers to the Height.
    • Output → 5

Using Arithmetic Formula to Calculate Variance in Excel

  • Use the following formula in cell C15 to calculate the Population Variance.
=E11/COUNTA(C5:C10) 

Using Arithmetic Formula to Calculate Variance in Excel


Method 1.2 – Using the VAR Function

Steps:

  • Use the following formula in cell C12.
=VAR.S(C5:C10) 

Using VAR function to Calculate Variance in Excel

  • Enter the following formula in cell C13 to calculate Population Variance.
=VAR.P(C5:C10) 

Using VAR function to Calculate Variance in Excel


Method 1.3 – Applying the VARA Function

Steps:

  • Use the following formula in cell C12.
=VARA(C5:C10) 

Input the VARA Function in formula editor

  • Enter the following formula in cell C13.
=VARPA(C5:C10) 

Input the VARA Function in formula editor

Read More: How to Calculate Quartile Deviation in Excel


Part 2 – Calculating Standard Deviation


Method 2.1 – Utilizing an Arithmetic Formula

Steps:

  • Enter the following formula in cell C13.
  =AVERAGE(C5:C10) 
  • Press the Enter button to see the output.

Utilizing Arithmetic Formula to calculate standard deviation

  • Use the following formula in cell D5.
=C5-$C$13 

Utilizing Arithmetic Formula to calculate standard deviation

  • Drag the Fill Handle tool to get the other values.

Utilizing Arithmetic Formula to calculate standard deviation

  • Use the following formula in cell E5.
=D5^2 

Utilizing Arithmetic Formula to calculate standard deviation

  • Drag the Fill Handle tool down.

Utilizing Arithmetic Formula to calculate standard deviation

=SUM(E5:E10) 

Utilizing Arithmetic Formula to calculate standard deviation

  • To calculate the Sample Standard Deviation, enter the following formula in cell C14.
=SQRT(E11/(COUNTA(C5:C10)-1)) 

Formula Breakdown

  • COUNTA(C5:C10) → Here the COUNTA function counts the number of cells in a range that are not empty. Here, the C5:C10 is the value1 argument that refers to the Height.
    • Output → 6
  • SQRT(E11/(COUNTA(C5:C10)-1)) →The given SQRT function divides the E11 cell value to COUNTA(C5:C10)-1 and returns the square root output to cell C14.
    • Output → 3.98

Utilizing Arithmetic Formula to calculate standard deviation

  • Use the following formula in cell C15 to calculate the Population Standard Deviation.
=E11/COUNTA(C5:C10) 

Utilizing Arithmetic Formula to calculate standard deviation


Method 2.2 – Applying the STDEV Function

Steps:

  • Use the following formula in cell C12.
=STDEV.S(C5:C10) 

Input the STDEV Function in formula editor

  • Use the following formula to get the Population Standard Deviation.
  =STDEV.P(C5:C10) 

Input the STDEV Function in formula editor


Method 2.3 – Using the STDEVPA Function

Steps:

  • Input the following formula in cell C12.
=STDEVA(C5:C10) 

type the STDEVPA Function in formula editor

  • Copy and paste the following formula in cell C13.
=STDEVPA(C5:C10)

Employing STDEVPA Function


Practice Section

We have provided a Practice section on the right side of each sheet where you can test these methods.

do it yourself


Download the Practice Workbook


Related Articles


<< Go Back to Deviation in Excel | Excel for Statistics | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mohammad Shah Miran
Mohammad Shah Miran

Mohammad Shah Miran has a professional background spanning over a year at Softeko. Initially starting as an Excel and VBA writer, he authored more than 50 articles for the ExcelDemy project. Currently, Miran is engaged in the LinuxSimply project as a Linux content developer, completed over 40 articles. His analytical approach extends across various domains, including Excel, VBA, Bash scripting, Linux, data analysis, and Python programming. In his leisure time, Miran enjoys watching movies and series or listening... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo