How do you calculate a weighted average?

Short answer. Multiply each value by its weight, add up those products, then divide by the sum of the weights. Scores of 90, 78 and 85 counting for 20%, 30% and 50% give 18 + 23.4 + 42.5 = 83.9, not the plain average of 84.3333. Weights that already total 1 make the last division trivial.

A weighted average is what you use when the numbers you are averaging are not equally important. The final exam counts more than the quiz. The 4 credit course counts more than the 2 credit one. The $6,000 holding counts more than the $1,000 one. The plain average pretends otherwise, which is why it so often lands on a number that describes nothing.

The formula

          (value × weight) added up
  x̄w  =  ────────────────────────────
              weights added up

Note the denominator. It is the total weight, not the number of values. That single detail is what separates this from the ordinary average, which divides by the count. In fact the ordinary average is this formula with every weight set to 1: the weights total 5 for five values, and you are back to sum over count.

Worked example: a course grade

Homework 90, counting 20%. Midterm 78, counting 30%. Final 85, counting 50%.

step 1  multiply each score by its weight
        0.20 × 90 = 18.0
        0.30 × 78 = 23.4
        0.50 × 85 = 42.5

step 2  add the products
        18.0 + 23.4 = 41.4
        41.4 + 42.5 = 83.9

step 3  divide by the total weight
        0.20 + 0.30 + 0.50 = 1
        83.9 ÷ 1 = 83.9

The plain average of 90, 78 and 85 is 253 ÷ 3 = 84.3333, which is higher. The weighting pulled the result down because the heaviest slice of the grade, half of it, sat on 85 rather than on the 90.

Check it the same way you check any average: the answer has to land between the smallest and largest value. 83.9 sits between 78 and 90. If your answer escapes that range, you have divided by the count instead of the total weight, which is the classic slip.

When the weights do not add to 1

Percentages of a grade are convenient because they total 1 and step 3 does nothing. Most real weights are just counts, and then the division matters. Values 8, 5 and 2 with weights 3, 1 and 1:

3 × 8 = 24
1 × 5 =  5
1 × 2 =  2
        ──
        31   over   3 + 1 + 1 = 5

31 ÷ 5 = 6.2

plain average of 8, 5, 2  =  15 ÷ 3  =  5

The weighted answer, 6.2, is higher because the 8 was counted three times. Skipping the division by 5 would have handed you 31, which is not an average of anything.

Grade point average, weighted by credits

GPA is the weighted average everyone calculates and nobody calls one. The weights are credit hours, and the products have a name: quality points.

CourseCreditsGrade pointsQuality points
Biology44.0 A16.0
History33.0 B9.0
Calculus33.7 A minus11.1
Spanish22.7 B minus5.4
Total1241.5
GPA  =  41.5 ÷ 12  =  3.4583333...   (3.46 rounded)

plain average of 4.0, 3.0, 3.7, 2.7
     =  13.4 ÷ 4  =  3.35

The weighted GPA is the higher number here because the best grade came in the biggest course. Had the A been the 2 credit Spanish class and the B minus the 4 credit biology, the same four letters would have produced a worse GPA. That is the whole point of weighting, and it is why "I got mostly As" is not a GPA.

Portfolio returns, weighted by money

Percentage returns are the trap. Three holdings: $6,000 up 8%, $3,000 up 3%, $1,000 down 10%.

plain average of the percentages
        (8 + 3 − 10) ÷ 3  =  1 ÷ 3  =  0.3333%      wrong

weighted by the money actually invested
        6,000 × 0.08 =  480
        3,000 × 0.03 =   90
        1,000 × −0.10 = −100
                        ─────
                          470   on   10,000 invested

        470 ÷ 10,000  =  0.047  =  4.7%

More than fourteen times the plain answer. The weight form gets there too: the holdings are 0.6, 0.3 and 0.1 of the portfolio, so 0.6 × 8 + 0.3 × 3 + 0.1 × (−10) = 4.8 + 0.9 − 1 = 4.7. Any time you are averaging something measured "per" something else, percentages, rates, prices per unit, the denominators are the weights and ignoring them gives a number with no meaning.

Averaging averages is weighting in disguise

Two classes sit the same exam. Class A: 20 students averaging 80. Class B: 5 students averaging 90.

naive     (80 + 90) ÷ 2  =  85       wrong

weighted  20 × 80 = 1,600
           5 × 90 =   450
                    ─────
                    2,050   over   25 students

          2,050 ÷ 25  =  82

Averaging the two averages gives 5 students the same voice as 20. The weights were the group sizes all along, and they only cancel when the groups are the same size. Any time you see an average of averages, ask what the group sizes were.

Working backwards: what do I need on the final?

The formula runs in reverse. Homework 88 counting 20%, midterm 79 counting 30%, final worth 50%, and you want 85 overall.

banked so far
        0.20 × 88 = 17.6
        0.30 × 79 = 23.7
                    ────
                    41.3

still needed
        85 − 41.3 = 43.7

from a final worth 0.50
        43.7 ÷ 0.50 = 87.4

check:  0.2×88 + 0.3×79 + 0.5×87.4  =  17.6 + 23.7 + 43.7  =  85

If that last division returns something above 100, the target is out of reach and the arithmetic has just saved you a week of hoping. The same reversal works on anything: subtract what is banked, divide by the weight that remains.

Where the rounding bites

Weighted averages multiply before they divide, so a rounding error early gets amplified rather than absorbed. Three equal weights written as 0.333 do not total 1, they total 0.999, and every result computed with them is quietly 0.1% light. Kept as thirds, they total exactly 1.

Binary floating point adds its own layer, which is why 0.1 + 0.2 comes back as 0.30000000000000004 on most machines. Prism does exact rational arithmetic instead, so 41.5 ÷ 12 stays 3.4583333... with the repetition intact rather than a stored approximation, weights of a third stay a third, and 0.1 + 0.2 is 0.3 on the nose. It rounds when it shows you the answer, not while it is still working.

Prism Calculator icon

Multiply, add, divide once, check your work

Prism keeps every entry in a searchable history, so you can run each value times its weight, scroll back to confirm the products, and total them without retyping. The percentage key and the history are free forever, no subscription. See the app.