How To Calculate Weighted Average In Google Sheets

How To Calculate Weighted Average In Google Sheets
Reading Time: 5 minutes

Here’s a quick guide on how to calculate weighted average in Google Sheets:
↠ Enter the function =WEIGHTED.AVERAGE
↠ Select the range of the values whose weighted average is to be calculated
↠ Add a comma after the value range and enter the weight range
↠ Press Enter to get the weighted average

The weighted average is an average of a set of numbers that takes into account the degrees of weight or importance of the numbers in the dataset. A weighted average gives a more accurate picture of the set of data than a simple average in which all the numbers in the dataset are assigned an identical weight.

The weighted average method has a large number of uses and is used in different areas and fields. It is widely used in classrooms to grade courses based on the weight each subject or test carries; in statistical analysis, such as index numbers, for example, in calculating stock indexes; and in accounting; among others.

In this article, we’ll learn how to calculate weighted average in Google Sheets using two simple methods.

You can make a copy of this spreadsheet and follow along with the tutorial. The data sample as well as the formulas are mentioned.

Method 1: Calculate weighted average in Google Sheets using the AVERAGE.WEIGHTED function

This is quite a straightforward method and it uses a very simple syntax to calculate the weighted average for a range of data. 

Formula for the AVERAGE.AVERAGE

The general syntax of the function is:

=AVERAGE.WEIGHTED(values, weights, additional values, additional weights)

A brief explanation of each of these arguments (or parameters) is given below:

  • The argument values refers to the data values whose weighted average is to be calculated and is entered in the form of an array. 
  • The weights parameter is used to enter the weights of the values. You can either enter the actual weights or an array of weights.
  • The next parameter additional values is used if you wish to calculate the weighted average of more than one continuous series of data. This is an optional parameter. 
  • The parameter additional weights is also an optional parameter. You will need it if you want to calculate the weighted average of more than one continuous series of data. 

Note: The values of the weights or additional weights cannot be negative. They can be 0, but one of the weights must be greater than 0. Each weight corresponds to a particular value, and each member of the values array must have a corresponding weight. 

Let us now learn how to calculate weighted average in Google Sheets using AVERAGE.WEIGHTED function.

Example 1: Calculating the weighted average of students in a course

We’ll take an example of a score of a particular high school student in a particular year, supposing the score for each subject along with its corresponding weight to be as given below:

Sample data to calculate weighted average in Google Sheets

To calculate weighted average in Google Sheets using the AVERAGE.WEIGHTED function, follow the steps given below.

  1. Choose an empty cell and enter the function to use, ie, =AVERAGE .WEIGHTED

Tip: You can press the Tab key to autocomplete the function, after Google Sheets has guessed the formula you’re typing in.

  1. Select the range of the values, which is the score in this case (C2:C9).
  2. Enter a comma and then select the values of the weight (D2:D9).
  3. Press Enter to complete the formula and display the result.
Weighted average in Google Sheets using AVERAGE.WEIGHTED function

Method 2: Calculate weighted average in Google Sheets using the SUMPRODUCT function

This is a more familiar method as it is often how the weighted average is calculated when doing it without a dedicated function, such as on a piece of paper or with a simple calculator.

But it involves a few more steps than the AVERAGE.WEIGHTED function.

To calculate weighted average in Google Sheets using the SUMPRODUCT method, we calculate the sum of the product of the values and the weight and divide the result by the sum of the weight.

Formula for the SUMPRODUCT function

The generic syntax for the SUMPRODUCT function is given below:

=SUMPRODUCT(array1, [array2, ...])

  • The array1 parameter includes the numbers of the first series. For calculating the weighted average, they will constitute the values whose weighted average needs to be calculated. 
  • The array2 parameter contains the numbers from the second series. In this context, they will consist of the weights corresponding to each value.

Note: Only the first argument in the syntax is mandatory. A number of arrays may be added however for complex calculations.

Let us try with another example, again.

Example 2: Calculating the weighted average of a share price

This time, we’ll calculate the weighted average of the share price paid for shares of a company over time. Consider the data set as shown below:

Sample data

Here, the number of shares is the value and the price of the shares is the weight.

The SUMPRODCT formula in this case is: 

=SUMPRODUCT(values, weights)

To find the weighted average, we divide this by the sum of the weights.

The steps given below show how we can calculate weighted average in Google Sheets using the SUMPRODUCT function.

  1. Choose an empty cell in which you want to display the result.
  2. Type in the equal symbol (=) to begin the calculation and enter the SUMPRODUCT function. Then enter the range values and the weights. Close the function with parenthesis.

In this case, the range containing the number of shares are the values whose weighted average is to be calculated, and the price column is the weight. So the first part of the formula will be as shown below:

=SUMPRODUCT(B2:B6, C2:C6)

  1. Enter the forward slash (/) to divide the function and type formula for the sum of the weights–SUM(C2:C6)
  2. Press Enter on completing the formula.

The result will be displayed in the formula cell, as shown below:

Weighted average using SUMPRODUCT function

Conclusion

Using the two methods discussed in this tutorial, we can find the weighted average for any number of applications, such as evaluating the performance of an employee where each task has a varying weight, ie, importance, or finding the weighted average of a list of goods with different qualities, to name just two.

Some commonly asked questions

What is a weighted average?

A weighted average or weighted mean is an average in which each value is given a specific weight, or importance, and based on the relative importance the average is calculated instead of treating all the individual items equally.

How is the weighted average different from the simple average?

In a simple average, all values have equal weight and thus their relative importance or significance is overlooked giving a distorted average. The weighted average avoids this by giving more weight or emphasis to those values that are more crucial giving a more accurate picture of the data set. A weighted mean also minimises the impact of outliers on the average which can drastically influence the average.

Why is the weighted average used?

A weighted average is used to assign different significance to different types of data. Treating each of the data alike, as in a simple average, can give a distorted average making it less useful. The weighted average is also used to mitigate the effect of outliers on the average.

See also

Using built-in functions to calculate weighted average in Google Sheets is one of the various things you can do to simplify and speed up your tasks. We have a number of such formulas and functions on our blog that you must know if you are looking for ways to minimise your time on tabulation and help you with data proficiency.

To check them out, click here.

Here are some articles you might find useful:

https://blog.tryamigo.com/averageifs-function-in-google-sheets-easy-guide/

https://blog.tryamigo.com/simple-moving-average-in-google-sheets/

https://blog.tryamigo.com/mean-median-and-mode-in-google-sheets/