SpreadsheetFormulas
intermediateSUMPRODUCTSUM

Calculate a Weighted Average

A plain average treats every row equally — but selling 1 unit at $189 and 100 units at $4.50 shouldn't average to $96.75. You need each value weighted by how much it matters.

Quick formula
=SUMPRODUCT(B2:B4,C2:C4)/SUM(C2:C4)
Sample input
1ProductPriceUnits
2Notebook101
3Stapler203
4Monitor306
Result
1MetricResult
2Weighted avg price25
3Plain AVERAGE (wrong here)20

Excel & Google Sheets

=SUMPRODUCT(B2:B4,C2:C4)/SUM(C2:C4)

This formula works in both Excel and Google Sheets.

How it works

SUMPRODUCT multiplies each value by its weight and adds the results — price × units for every row, summed. Dividing by the total of the weights turns that back into an average where heavy rows pull harder. With prices 10, 20, 30 and units 1, 3, 6, the weighted average is (10 + 60 + 180) ÷ 10 = 25 — versus a plain AVERAGE of 20, which pretends one unit of each was sold.

SUMPRODUCT(B2:B4,C2:C4)
Multiplies each value by its weight, then sums: value₁×weight₁ + value₂×weight₂ + …
/SUM(C2:C4)
Divides by the total weight, converting the weighted sum into an average.

When to use it

Use it whenever rows differ in importance: average selling price weighted by units, blended interest rates weighted by balance, assessment scores weighted by credit, cost per unit across warehouses.

Common mistakes

  • Using plain AVERAGE on per-row rates.

    AVERAGE ignores volume, so small rows distort the result. If each row has a quantity, you almost always want the weighted version.

  • Value and weight ranges are different sizes.

    SUMPRODUCT(B2:B4,C2:C9) returns #VALUE!. Both ranges must cover exactly the same rows.

  • Weights that sum to zero.

    An empty weight column gives #DIV/0!. Guard it: =IF(SUM(C2:C4)=0,"",SUMPRODUCT(B2:B4,C2:C4)/SUM(C2:C4)).

Did this formula help?

Engine-verified against the sample data aboveLast reviewed 2026-07-08