Today we will learn how to calculate weighted average in Excel with percentages.
What is weighted average ?
Weighted average or weighted mean is defined as [from wikipedia],
The weighted mean is similar to an arithmetic mean …, where instead of each of the data points contributing equally to the final average, some data points contribute more than others.
…If all the weights are equal, then the weighted mean is the same as the arithmetic mean.
Why should you calculate weighted average?
Well, it is because, in some situations normal averages give in-correct picture. For eg. assume you are the CEO of ACME Widgets co.. Now you are looking annual salary report and being the numbers-gal you are, you wanted to find-out the average salary of your employees. You asked each department head to give you the average salary of that department to you. Here are the numbers,

Now, the average salary seems to be $ 330,000 [total all of all salaries by 5, (55000+65000+75000+120000+1200000)/5 ].
You are a happy boss to find that your employees are making $330k per year.
Except, you are wrong. You have not considered the number of employees in each department before calculating the average. So, the correct average would be $76k as shown above.
How to Calculate Weighted Average in Excel with Percentages

There is no built-in formula in Excel to calculate weighted averages. However, there is an easy fix to that. You can use SUMPRODUCT formula. By definition, SUMPRODUCT formula takes 2 or more lists of numbers and returns the sum of product of corresponding values. [related: Excel SUMPRODUCT Formula – what is it and how to use it?]
So, if you have values in B4:B8 and the corresponding weights in C4:C8, you can use SUMPRODUCT like this to get weighted average.
=SUMPRODUCT(B4:B8, C4:C8)
Caution: However, the above method works only if C4:C8 contains weights in percentages(%) totaling to 100%.
WAvg Formula Pattern (use this with your data)
=SUMPRODUCT(<your values>, <your weights>)
What if my percentage weights don’t add up to 100%?

May be your weights are more than 100 percent. Or may be they are less than 100 percent. In both cases, you can use the below formula variation.
=SUMPRODUCT(B15:B19, C15:C19) / SUM(C15:C19)
The idea is to divide the total of weights with the SUMPRODUCT result so that we can adjust Weighted Average as the weights don’t add up to 100 percent.
WAvg Formula Pattern when weights don’t add up to 100 percent
=SUMPRODUCT(<your values>, <your weights>) / SUM(<your weights>)
Weighted Average when you have counts instead of weights:

If you have count of observations instead of weights, you can still use the SUMPRODUCT formula to calculate weighted average in Excel.
Here is the formula for above example:
=SUMPRODUCT(B26:B30, C26:C30) / SUM(C26:C30)
Notice that this formula is same as the formula for weighted average with weights not adding up to 100 percent.
WAvg Formula Pattern when you have counts instead of weights
=SUMPRODUCT(<your values>, <your counts>) / SUM(<your counts>)
Weighted Average with Extra Conditions

Let’s say you have city wise observations and weights. And you want to calculate the weighted average, only for Boston values. In this case, you can use a variation of the formula like below:
=SUMPRODUCT((C5:C16)*(B5:B16=F5),D5:D16)/SUMIFS(D5:D16,B5:B16,F5)
How does this formula work?
- SUMPRODUCT calculates the total value for BOSTON by summing up C5:C16 (value column) where B5:B16 is Boston (highlighted portion of the formula) and multiplies that with the counts.
- So in the above example, this will just give us the total of Boston – ie 218,600
- We then divide this with the total count of Boston (using the SUMIFS formula) – ie 400
- This results in the weighted average for Boston values alone – ie 546.50
For more information on how the conditions work inside SUMPRODUCT formula, please read this article.
Download Weighted Average Calculation Example Workbook:
In this workbook, you can find 4 examples on how to to calculate weighted average in excel. Go ahead and download it to understand the formulas better.
Weighted Average in Excel – Formula Explained
Here is a video with Weighted Average formula explained. Please watch it below to learn more. Alternatively, head to my YouTube page to see the weighted averages in Excel video.
In Conclusion
Weighted averages are a great way to explain data and every data analyst should know how and when to use them with their data. Apart from Weighted Average, I suggest learning how to use moving average and average of top n values. These will help you explain the data and trends to your audience better.
Do you use Weighted Mean / Weighted Average?
What do you use it for? What kind of challenges you face? Do you apply any tweaks to weighted average calculations? Please share your ideas / tips using comments.
















One Response to “How to export YouTube video comments to Excel file? – Free template + Power Query case study”
And I asked myself when i saw your Accouncement Video for the Give away: "Seriously, will Chandoo go manualy thru all his Videos and pick the winners?!". Great connection to the give away with this tutorial 🙂 !