Weighted final grade with SUMPRODUCT

Medium Math
Description
Hints 0/4
Solutions 2
–
Test case
1
2
3
Reset
Submit
fx
A
B
C
D
E
F
G
1
2
3
4
5
6
7
8
9
10
Loading interactive spreadsheet...
Preparing grid cells and formula calculation engine
○ Ready Enter formula in highlighted cells, then click Submit.

The problem

Problem statement

Your course grade is not a plain average — the final exam counts for more than the homework. The grading sheet in A2:C5 lists each component's score and its weight (weights sum to 1). Compute the final grade in the Final grade cell E2 by pairing each score with its weight in one formula.

Use one formula that multiplies each score by its weight and adds the results — don't compute each product in a helper cell.

Problem data

Show the sheet as a table (selectable, copyable)
The exercise data, as a table
ABCD
1 ComponentScoreWeightFinal grade
2 Homework880.2
3 Midterm760.3
4 Final exam920.4
5 Project850.1

Notes

SUMPRODUCT(array1, array2) multiplies the pairs row by row and adds everything up in one step: score × weight for every row, then the total. When the weights sum to 1 the result is the weighted average. A plain AVERAGE would pretend the 10% project counts as much as the 40% final — a classic interview trap.

How to approach

Your answer goes in E2. On submit we re-run your formula against 3 different sets of input, so a hardcoded number will fail — the formula has to follow the cells.

  1. Target cell is E2
  2. The scores live in B2:B5 and the weights in C2:C5
  3. SUMPRODUCT pairs the two ranges and adds the products
  4. Pattern: =SUMPRODUCT(scores, weights)

Official solutions

Show 2 solutions — try it yourself first

Approach 1: SUMPRODUCT with two ranges

=SUMPRODUCT(B2:B5, C2:C5)

SUMPRODUCT multiplies B2×C2, B3×C3, B4×C4, B5×C5 and sums the four products — exactly the weighted-average definition when weights sum to 1.

Approach 2: SUMPRODUCT ÷ SUM of weights

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

The safer habit: dividing by SUM of weights keeps working even when they don't add up to exactly 1 (for example 20/30/40/10 points out of 110).

Function guide

Related practice

FAQ

How do I calculate a weighted average in Excel?

Use =SUMPRODUCT(scores, weights) when the weights add up to 1. For example =SUMPRODUCT(B2:B5, C2:C5) multiplies each score by its weight and sums the results in one step.

Why not just use AVERAGE?

AVERAGE treats every component equally. If the final exam is worth 40% and homework 20%, the plain average hides that difference and reports the wrong grade. Weighted averages pair each value with its importance.

What if my weights don't add up to 1?

Divide by their sum: =SUMPRODUCT(B2:B5, C2:C5) / SUM(C2:C5). This normalizes the weights, so the formula keeps working whether they total 100%, 110%, or points.

Does SUMPRODUCT work in Google Sheets?

Yes — SUMPRODUCT behaves identically in Excel and Google Sheets, which is why it's the standard answer for weighted-average interview questions on both platforms.