Calculating a Weighted Average

Written by Allen Wyatt (last updated March 28, 2026)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365


3

In the range G2:G26, Fran has a bunch of values. In the range H2:H26 she has weights assigned to each value. The weights are in the range of 0.5 to 2.0, representing 50 percent to 200 percent. Fran wonders what formula she should use to create a weighted average of the values in G2:G26.

An average is easy enough to figure out, using either the AVERAGE function or by summing a range and dividing by the number of items in the range. Things get a bit trickier with weighted averages, however. Consider the following formula:

= SUMPRODUCT(G2:G26*H2:H26)/COUNT(G2:G26)

This seems to fulfill the requirement of summing the weighted values and then dividing by the number of items in the range. This doesn't work, however, because it treats each item in the denominator as equal in importance. They are not equally important, though, and their relative importance must be taken into account.

A weighted average is properly defined as the sum of all the weighted values divided by the sum of all the weights. Thus, the following formula will provide Fran with the correct result:

=SUMPRODUCT(G2:G26,H2:H26)/SUM(H2:H26)

The SUMPRODUCT function sums each of the weighted values—derived by multiplying each value in G2:G26 by its weight in H2:H26—and the SUM function sums all the weights. The division provides the final weighted average.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13970) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Copying Paragraph Formatting with the Mouse

When you get one paragraph formatted just the way you want, you might want to copy that formatting so it can be applied ...

Discover More

Getting Rid of Choppiness in Justified Text

Justified text doesn't always produce the best-looking results. Here's how to avoid some of the choppiness that can occur.

Discover More

Protecting Macros in a Corporate Environment

When you use a computer at work, that computer may be subject to periodic updating or replacement. If you want to protect ...

Discover More

Program Successfully in Excel! This guide will provide you with all the information you need to automate any task in Excel and save time and effort. Learn how to extend Excel's functionality with VBA to create solutions not possible with the standard features. Includes latest information for Excel 2024 and Microsoft 365. Check out Mastering Excel VBA Programming today!

More ExcelTips (ribbon)

Calculating an IRR with Varying Interest Rates

You might wonder how you can calculate an IRR (internal rate of return) when the person repaying the loan pays different ...

Discover More

Incrementing Numeric Portions of Serial Numbers

If you use serial numbers that include both letters and numbers, you might wonder how you can increment the numeric ...

Discover More

Removing the Last Digit in a Number

If you have a long numeric value in a cell, you may have a need to remove the last digit of that value. You can do so ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 5?

2026-03-31 07:37:32

David Watssman

Also worth noting, if using your raw data in a pivot table, you'll need to include a weighted result for each line in its own column of the source data. This allows you to add a calculated field of the weighted result/weight to give you weighted average for all lines, subtotals and totals.


2026-03-28 23:46:22

Gary Stockton

I am not nearly so knowledgeable in Excel as you, but I use sumproduct to apply a weighted average most heavily on my prior year's expenditure in a certain category, with the weight tending more to the current year's expenditure as the year winds down as follows: =IF(YEAR(NOW())='Income & Expense Summary'!$A$1, SUMPRODUCT((NOW()-DATE('Income & Expense Summary'!$A$1,1,1))/366 * 'Current Avg Monthly Expenses'!$B$4) + (1-(NOW()-DATE('Income & Expense Summary'!$A$1,1,1))/366)*'Prior Avg Monthly Expenses'!$B$4, 'Current Avg Monthly Expenses'!$B$4)

(with $A$1 being the current year)


2026-03-28 10:12:17

J. Woolley

This formula also works
    =SUM(G2:G26*H2:H26)/SUM(H2:H26)
but it requires support for dynamic arrays (Excel 2021+); otherwise, you can press Ctrl+Shift+Enter to enter it as a CSE array formula.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.