Calculate Weighted Average

Excel Tip #024

Calculate Weighted Average

Excel makes it extremely easy to calculate the average of data by using the AVERAGE function. But what if some of the values have more "weight" than others? For those cases, you'll need to calculate the Weighted Average.

Although Excel doesn't have a weighted average function, it does have a function that does most of the work for you: SUMPRODUCT.

In order to calculate the weighted average, we are having 2 columns of data. The first column contains the grades for each assignment and the second column contains the weights. A higher weight will cause the data (assignment) to have a greater effect on the final grade. The weights can also be greater than 100% but it would be meaningful if it is 100%

Below is the example data containing 5 assignments along with their marks and the weights.
Example - Weighted Average
Before going to the example, let us learn about SUMPRODUCT. This function multiplies the corresponding items in the arrays and returns the sum of the results.

Syntax:
     SUMPRODUCT(array1, [array2], [... array n])
where array1 is mandatory and the rest of the array are optional.

We are going to use SUM function along with SUMPRODUCT to calculate the weighted average. In our example,
     B2:B6 - Range of cells that contains the marks
     C2:C6 - Range of cells that contains the weights

The formula is,
     =SUMPRODUCT(B2:B6,C2:C6)/SUM(C2:C6)

We are defining the marks as Array1 and their corresponding weights as Array2. Finally the resultant is divided with the sum of the weights to get the Weighted Average.

Calculating Weighted Average
SUMPRODUCT is multiplying (finding the product of) each assignment's marks times its weight, then adding all of the products together. In other words, it finds the sum of the products, which is where it gets its name. So for Assignment 1 it multiplies 85 by 20, and for Assignment 1 it multiplies 92 by 15 etc.

The way the SUMPRODUCT function calculates is

=(B2*C2)+(B3*C3)+(B4*C4)+(B5*C5)+(B6*C6)

By itself, SUMPRODUCT will give us a huge number 8,925. This is where the second part of our formula comes in: /SUM(C2:C6). This part brings the value back down to a normal grade range, making the answer 89.25.

Remember that the weights don't need to add up to 100%, SUM part will take care of that.

Comments

Popular posts from this blog

VLOOKUP - Exact Match & Approximate Match

Row 1 Is Missing. How to unhide?

Search Backwards in Excel