The question of how to get a weighted average or weighted mean in Excel arises frequently among new investors. This is largely due to the importance of weighted averages in answering many of the new investor’s questions such as the overall yield of a portfolio.
The investor will of course turn to his most handy and reliable tool in analyzing his portfolio namely Excel. Upon discovering that there is not a single function to calculate the value needed, many end up taking a circuitous route to arrive at the answer needed. While Excel does not have a weighted average function per se it does indeed have the components needed to render the process quite simple. Below we will walk through the process step by step. I often find when searching for simpler methods of accomplishing tasks that it is helpful to start with an answer derived the long way and then that answer can be used to prove out the new method. I will proceed in that manner here by first providing an example with long hand solution and then demonstrating how to simplify the steps via Excel.
| To solve the same example in Excel enter the values into a group of cells as shown here. | |
| Excel provides the SumProduct function which will be used to take the sums of the products of market value and current yield. This solves the top line of our formula. Note the arguments to the function will be 2 seperate arrays and not one. Observe the next image | |
| As previously stated the sum product of the two rows gives us the top line of the equation and all that remains is to divide by the sum of the weights. In this case the sum of the market values. The total formula then becomes =sumproduct(b2:b4,c2:c4)/sum(b2:b4) as in image to right. |
Hit enter and note that value 3.1 is the result.
That’s it, all there is to doing a weighted average in Excel. Just take the sumproduct of the weights and values and divide by the sum of the weights. While this example is incredibly simple there isn’t much to add to it other than just increasing the number of values being used which is meaningless in terms of how to solve. Enjoy.
Cleaned up the post some and used table structures to align the images and corresponding text. Some browsers were rending the inline images all over the place.