Weighted Average Formula

A weighted average multiplies each value by its weight, adds the results, and divides by the total of the weights. In Excel and Google Sheets that is SUMPRODUCT divided by SUM. Describe your values and weights below and get the formula.

Free, no sign-up required · 5 free generations a day

Last updated

Describe your task, get the formula

Type what you need in plain English, or pick an example below. You get the formula, a step-by-step explanation, and a worked example.

Weighted average formula

Syntax
=SUMPRODUCT(B2:B10,C2:C10)/SUM(C2:C10)

B2:B10 holds the values and C2:C10 the weights. SUMPRODUCT multiplies each pair and adds them up; dividing by the sum of the weights means the weights do not have to total 1 or 100%.

Examples

Final grade from weighted assignments

=SUMPRODUCT(B2:B6,C2:C6)/SUM(C2:C6)

Scores are in column B and each assignment's weight is in column C. An exam weighted 40 counts four times as much as a quiz weighted 10.

Average price weighted by quantity

=SUMPRODUCT(B2:B100,C2:C100)/SUM(C2:C100)

With prices in column B and quantities in column C, this is total revenue divided by total units: the real average price paid per unit.

Weighted average with a condition

=SUMPRODUCT((A2:A100="East")*B2:B100*C2:C100)/SUMIF(A2:A100,"East",C2:C100)

Only rows where column A is East are included in both the weighted total and the sum of the weights.

Common mistakes and how to fix them

Using AVERAGE on the values

AVERAGE treats every row equally. If one price applied to 1,000 units and another to 10, the plain average is misleading — use the SUMPRODUCT formula.

#VALUE! from SUMPRODUCT

The two ranges are different sizes, or a cell contains text. Make sure both ranges cover exactly the same rows and hold only numbers.

#DIV/0! when the weights are empty

The weights add up to zero. Guard the division: =IF(SUM(C2:C10)=0,"",SUMPRODUCT(B2:B10,C2:C10)/SUM(C2:C10)).

Frequently asked questions

Do the weights have to add up to 100%?

No. Dividing by SUM of the weights normalizes them, so weights of 1, 2 and 3 work as well as 16.7%, 33.3% and 50%.

Is there a built-in weighted average function?

Excel has none. Google Sheets has =AVERAGE.WEIGHTED(B2:B10,C2:C10), which gives the same result as the SUMPRODUCT formula.

What happens if a value is blank?

A blank value counts as 0 while its weight is still included, which pulls the average down. Leave the weight blank as well, or filter those rows out with a condition.

Don't want to write it by hand?

Describe what you need in plain English and get a ready-to-use formula in seconds.

Try the formula generator