How to work out a weighted average with SUMPRODUCT
A plain average treats every row the same. A weighted average lets some rows count for more, here marks weighted by their credits.
The formula
=SUMPRODUCT(B:B,C:C)/SUM(C:C) in column E
What each part does
SUMPRODUCT(B:B,C:C)Multiplies each value by its weight and adds them all up.
SUM(C:C)Total of the weights.
How it works, and what to watch for
SUMPRODUCT multiplies each mark by its credits and adds them all in one step. Dividing by the total credits turns that into the weighted average.
Both ranges must line up row for row. If one is longer than the other, SUMPRODUCT returns #VALUE!.
This is the standard way to average grades, prices, or scores when the rows do not carry equal weight.
Questions
How is this different from a normal average?
A normal average adds the values and divides by how many there are. A weighted one lets each value pull harder or softer, according to its weight.
Why the #VALUE! error?
The two ranges are different lengths. SUMPRODUCT needs them to cover exactly the same rows.
The example sheet
Module
Mark
Credits
Weighted mark
Math
72
30
History
65
15
Physics
80
45
If this helped, these are close by
When this formula goes wrong
More on SUMPRODUCT , and every walkthrough that uses it.
Formula List
Formula Fixer
Formula List
Settings: separator, Excel version
Argument separator
Set by your computer's language, not by the file. A frequent cause of a correct-looking formula being rejected.
Comma =SUM(A1,B1)
Semicolon =SUM(A1;B1)
Excel version
XLOOKUP, IFS, TEXTBEFORE and TEXTJOIN need Microsoft 365 or 2021; older versions return #NAME? instead. Choosing the older one switches every walkthrough to a formula that works there.
Microsoft 365 or 2021
2019 or earlier
Is a formula returning an error?
Paste it below for a line-by-line check.
Check the formula
Clear
or press Enter
Try one of these
© Formula Steps — formulasteps.com
Bookmark
Share