Skip to content

How to calculate a weighted average in Excel in Excel

Work out a weighted average with SUMPRODUCT divided by the sum of the weights, including a weighted average for one category.

A plain average treats every value the same. A weighted average lets some values count more: course grades weighted by credit hours, prices weighted by quantity, scores weighted by importance.

The recipe is the same every time: multiply each value by its weight, add up those products, and divide by the total weight.

=SUMPRODUCT(B2:B7, C2:C7) / SUM(C2:C7)

SUMPRODUCT with two ranges multiplies them row by row and adds the results in one step, so there is no helper column. Dividing by the sum of the weights keeps the answer on the same scale as the values. If the weights already add to 100% (or 1), the division changes nothing, but leaving it in makes the formula correct when they do not.

A common slip is AVERAGE, which ignores the weights. Another is dividing by the sum of the values rather than the sum of the weights.

To weight within a category, such as only the East region, add the condition inside SUMPRODUCT as a TRUE/FALSE test that multiplies the rows you want by 1 and the rest by 0:

=SUMPRODUCT((H2:H7="East") * F2:F7 * G2:G7) / SUMIFS(F2:F7, H2:H7, "East")

The denominator is the total weight for the same rows, from SUMIFS. Both parts must use the same condition or the result is meaningless.

For a quick check, the weighted average always sits between the smallest and largest value. If it does not, a range is the wrong size or a weight is missing. The Analysis track works with SUMPRODUCT in depth.

2 ways to do it

1SUMPRODUCT divided by the total weight

=SUMPRODUCT(B2:B7,C2:C7)/SUM(C2:C7)

  1. Put values in one column and weights in the next.
  2. Type =SUMPRODUCT(B2:B7,C2:C7)/SUM(C2:C7).
  3. Check the result sits between the smallest and largest value.

2Weighted average for one category

=SUMPRODUCT((H2:H7="East")*F2:F7*G2:G7)/SUMIFS(F2:F7,H2:H7,"East")

  1. Multiply the rows you want by a TRUE/FALSE test inside SUMPRODUCT.
  2. Divide by the total weight for the same category using SUMIFS.

Try it yourself

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In B9, calculate the average grade points in B2:B7, weighted by the credits in C2:C7.

Answer in B9.

B9
A
B
C
D
E
F
G
H
I
J
1
Course
Grade points
Credits
Batch
Units
Unit cost
Region
2
Statistics
3.7
4
B-101
200
4.50
East
3
Accounting
3.3
3
B-102
150
4.80
West
4
Economics
4.0
3
B-103
400
4.20
East
5
Law
2.7
2
B-104
100
5.10
West
6
Strategy
3.0
4
B-105
250
4.40
East
7
Ethics
3.7
1
B-106
300
4.90
West
8
9
Weighted GPA
Region
East
10
Weighted cost

Learn it properly, one graded sheet at a time.

Excel foundations covers this in lesson 5, SUM and ranges.