 # Use ‘Sumproduct’ for weighted average

| Updated on September 23, 2012 bl24 emerge oldway.jpg bl24 emerge sumproduct.jpg

Here’s another important MS Excel tip, one that I got from one of our clients. It has made my life so much simpler. Thank you, Krishnan!

### Need for Weighted Average

Let us say there is a company that exported goods worth \$5 million and received payment at a dollar-rupee rate of 45.45 on August 17, 2011. It then exported goods worth \$1 million and received payment at a rate of 56 on May 23, 2012.

What is the average rate at which the exports have taken place? You will be surprised at the number of people who reply saying 50.7250, the simple average of 45.60 and 56. However, as you know, the correct answer is actually 47.21, since the larger amount of \$ 5 million was exported at the lower rate of 45.45 in August 2011, compared with the smaller amount of \$ 1 million which was exported at 56.00 in May 2012. The rate of 47.21, the weighted average rate calculated as (45.45 x 5 mln + 56.00 x 1 mln)/ 6 mln. Not only do the export/ imports/ forward contract/ option transactions take place at different exchange rates, the transaction amounts are also always different. Therefore, there is always a need to calculate the weighted average rate at which forex transactions have taken place. Since the transaction amounts are different, calculating simple average is simply wrong.

Thankfully, while a few people do erroneously make do with a simple average, most people calculate the Weighted Average Exchange Rate. Unfortunately, the way most people (I was one of them) do the calculation is quite cumbersome.

### Old Way of Calculating Weighted Average

The way I used to calculate weighted average earlier in Excel is as follows:

Calculate the rupee equivalent of the dollar amount

Sum the dollar amounts

Sum the rupee amounts

Divide the sum of rupee amounts by the sum of dollar amounts

### ‘Sumproduct’ Way of Calculating Weighted Average

Note the ‘Sumproduct’ function in the formula bar. The weighted average is now calculated as

‘Sumproduct’ (range with dollar amounts, range with export rates)/sum of dollar amounts.

Much simpler, isn’t it?

Thanks are due to Krishnan, my client at Marico Ltd, and to MS Excel. I hope this function will be as useful to you as it is to me!

(The author is Chief Currency Strategist at a kshitij.com. The views are personal. He can be reached at > vikram@kshitij.com)