Excel Productivity Guide
Useful Excel Tips | Keyboard Shortcuts | VBA Codes
Download this Free E-Book to take your excel skills to a whole next level using some smart Excel tactics.
Worth $20, Absolutely Free
An average is the best way to get an insight of the data as a whole. But sometimes average gives you biased value.
In those [almost every time] situations, the best way is to calculate the weighted average. And,
But, I have found the best way is to use a formula by combining SUMPRODUCT and SUM functions.
This method is simple and easy to apply.
So today, in this post, I’d like to share with you how to calculate a weighted average in Excel using SUMPRODUCT and SUM.
Let’s get started.
In the below example, we have 1658 as a normal average and 1445 as a weighted average.
Let me clarify this difference with two points.
If you multiply 1658 (average) with 68 (quantity) you will get 112742 which not equals to the totals amount.
But, if you multiply 1445 (weighted average) with 68 (quantity) you will get 98289 which equals to the total amount.
Product-1 has the lowest price and highest quantity whereas Product-4 has the highest price and lowest quantity.
While calculating normal average you are not considering quantity and if there is a change in quantity there will be no effect on the average price.
And, in the weighted average, you can take quantity as a weight.
To calculate weighted average we are using the same data table which I have shown you in the above example.
You can download it from here to follow along.
Now, follow these two simple steps.
Now, you have 1445 as a weighted average of price and product.
As I said, sumproduct is an easy way to calculate the weighted average or weighted mean in Excel.
The best part about sumproduct is it can multiple and sum array in a single cell.
We need to break down this formula to understand it.
First of all, sumproduct will calculate the product of price and quantity for the all the products return the sum of all those.
After that, sum function will give you the sum of quantity.
And, in the end, you will get the weighted average by dividing values from both of the function.
Check this out ==> SUMPRODUCTIF
Let’s come one step further. Let’s move in data analysis part.
By using the same formula you can calculate weighted moving average as well. Download this data table from here to follow along.
Here are the steps:
If you check above snapshot in cell D4 you have the moving average for Jan, Feb, and Mar.
And, in cell D5 you have the moving average for Feb, Mar, and Apr.
So, the thing is every time when you move to a new month you will get the moving average including current month and last two months.
You just need to make your cell references are relative when you drag down your formula.
Download sample file from here to follow along.