Skip to content

How to Calculate a Weighted Average in Excel (SUMPRODUCT, With Criteria)

  • by

Quick answer: Use this formula, with your values in B2:B5 and weights in C2:C5:

=SUMPRODUCT(B2:B5,C2:C5)/SUM(C2:C5)

SUMPRODUCT multiplies each value by its weight and adds the results. Dividing by SUM of the weights makes it work for any weights: percentages, points or quantities.

Tested in Excel for Microsoft 365 on Windows 11, November 2026. Screenshots are from that test.


Example: weighted grade

A student scores 95 on homework (10%), 80 on a quiz (20%), 70 on the midterm (30%) and 90 on the final (40%).

Excel weighted average of grades with the SUMPRODUCT formula giving 82.5 compared with a simple average of 83.75

  • Weighted average: =SUMPRODUCT(B2:B5,C2:C5)/SUM(C2:C5) = 82.5
  • Simple average: =AVERAGE(B2:B5) = 83.75

The simple average is wrong here, because the low midterm counts for 30%, not 25%.

Why divide by SUM of the weights?

If your weights add up to exactly 100%, =SUMPRODUCT(B2:B5,C2:C5) alone gives the same answer. But weights often don’t:

  • Weights typed as 10, 20, 30, 40 (not percent) add up to 100, not 1.
  • Weights that are quantities, such as units sold, can add up to anything.
  • Some grading schemes add up to 90% or 110% by mistake.

Dividing by SUM(weights) handles all of these, so use it every time.

Method 2: helper column (easy to check)

If you want to see each step, or explain it to someone:

  1. In D2 type =B2*C2 and copy it down.
  2. In the result cell type =SUM(D2:D5)/SUM(C2:C5).
Helper column multiplying each score by its weight and the SUM divided by SUM of weights giving 82.5

You get the same 82.5. This is what SUMPRODUCT does in one step.

Weighted average with quantities (no percentages)

Weighted averages are not only for grades. Average price per unit is a weighted average where the units are the weights.

In the right-hand table of our example, five sales have different prices and units:

=SUMPRODUCT(F2:F6,G2:G6)/SUM(G2:G6)

That returns 11.6, the true average price per unit. A plain =AVERAGE(F2:F6) gives 11.2, because it treats a 50-unit sale the same as a 300-unit sale.

Weighted average with a condition (criteria)

To get the weighted average for East only, put “East” in a cell (E9 here) and use:

=SUMPRODUCT((E2:E6=E9)<em>F2:F6</em>G2:G6)/SUMIF(E2:E6,E9,G2:G6)

Weighted average for one region using SUMPRODUCT with a condition divided by SUMIF, returning 12.6

  • (E2:E6=E9) returns TRUE or FALSE for each row. Multiplying turns them into 1 and 0, so other regions drop out.
  • SUMIF adds the units for East only.
  • Result: 12.6.

More than one condition? Multiply another test into SUMPRODUCT and switch SUMIF to SUMIFS, for example:

=SUMPRODUCT((E2:E6="East")<em>(H2:H6="Q1")</em>F2:F6*G2:G6)/SUMIFS(G2:G6,E2:E6,"East",H2:H6,"Q1")

(H here is a hypothetical Quarter column; this two-condition version was not in our test sheet.)

Is there a weighted average function in Excel?

No. In our Excel for Microsoft 365, typing =AVERAGE lists AVERAGE, AVERAGEA, AVERAGEIF, AVERAGEIFS and DAVERAGE. None of them take weights.

Excel formula autocomplete for AVERAGE showing no weighted average function

Google Sheets has AVERAGE.WEIGHTED, but it doesn’t exist in Excel, so a file using it will show #NAME? in Excel. Use SUMPRODUCT/SUM instead.

Common errors and fixes

ProblemCauseFix
#VALUE!The two ranges have different sizesMake both ranges the same rows, e.g. B2:B5 and C2:C5
#DIV/0!All weights are 0 or blank, or no row matches the criteriaCheck the weights or the criteria cell
Result too big (e.g. 8,700)Forgot to divide by SUM(weights)Add /SUM(weights)
Wrong result after copying the formula downRanges movedLock them with F4: C2:C5
A row is ignoredIts weight is blank, which counts as 0Enter the weight
Weights typed as text (“20%” with a space or apostrophe)Text is treated as 0 in SUMPRODUCTRe-type as numbers; they align right in the cell

FAQ

What is the formula for weighted average in Excel?
=SUMPRODUCT(values,weights)/SUM(weights). For example =SUMPRODUCT(B2:B5,C2:C5)/SUM(C2:C5).

How do I calculate a weighted average in Excel with percentages?
Use the same formula. If the percentages add up to 100%, SUMPRODUCT alone also works, but dividing by SUM of the weights is safer.

How do I calculate a weighted average without percentages?
Use quantities, points or counts as the weights in the same formula. Dividing by SUM of the weights turns them into proportions for you.

How do I calculate a weighted average with criteria in Excel?
Use =SUMPRODUCT((criteria_range=criteria)valuesweights)/SUMIF(criteria_range,criteria,weights).

Does Excel have an AVERAGE.WEIGHTED function?
No. That function is in Google Sheets. In Excel, use SUMPRODUCT divided by SUM.

Why is my weighted average different from AVERAGE?
AVERAGE gives every value the same weight. A weighted average lets bigger weights count more, so the two differ unless all weights are equal.


Related tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *