How to calculate weighted average in Excel?
For example, you have a shopping list with prices, weights, and amounts. You can easily calculate average price with the AVERAGE function in Excel. But what if weighted average price? In this article, I will introduce a method to calculate the weighted average, as well as a method to calculate weighted average if meeting specific criteria in Excel.
Supposing your shopping list is as below screenshot shown. You can easily calculate the weighted average price with combining the SUMPRODUCT function and SUM function in Excel, and you can get it done as follows:
Step 1: Select a blank cell, says Cell F2, enter the formula =SUMPRODUCT(C2:C18,D2:D18)/SUM(C2:C18) into it, and press the Enter key.
Note: In the formula =SUMPRODUCT(C2:C18,D2:D18)/SUM(C2:C18), C2:C18 is the Weight column, D2:D18 is the Price column, and you can change both based on your needs.
Step 2: The weighted average price may include too many decimal places. To change the decimal places, you can select the cell, and then click the Increase Decimal button or Decrease Decimal button on the Home tab.
The formula we introduced above will calculate the weighted average price of all fruits. But sometimes you may want to calculate the weighted average if meeting given criteria, such as the weighted average price of Apple, and you can try this way.
Step 1: Select a blank cell, for example Cell F8, enter the formula =SUMPRODUCT((B2:B18="Apple")*C2:C18*D2:D18)/SUMIF(B2:B18,"Apple",C2:C18) into it, and press the Enter key.
|Formula is too complicated to remember? Save the formula as an Auto Text entry for reusing with only one click in future!
Read more… Free trial
Note: In the formula of =SUMPRODUCT((B2:B18="Apple")*C2:C18*D2:D18)/SUMIF(B2:B18,"Apple",C2:C18), B2:B18 is the Fruit column, C2:C18 is the Weight column, D2:D18 is the Price column, "Apple" is the specific criteria you want to calculate weighted average by, and you can change them based on your needs.
Step 2: Select the cell with this formula, and then click the Increase Decimal button or Decrease Decimal button on the Home tab to change the decimal places of weighted average price of apple.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!