How to calculate a weighted average
weighted average = Σ (value × weight) ÷ Σ weights
- Multiply each value by its weight.
- Add up those results.
- Add up the weights.
- Divide the first total by the second.
Example: 80 with weight 2, 90 with weight 3, 70 with weight 1 gives (160 + 270 + 70) ÷ 6 = 83.33. The plain average of the three values is 80, but 90 counts three times as much as 70, so the weighted average is higher.
Example: a class grade
Most class grades are weighted averages, with each category worth a share of the final grade:
| Category | Weight | Score | Score × weight |
|---|---|---|---|
| Homework | 20% | 92% | 1,840 |
| Quizzes | 30% | 78% | 2,340 |
| Final exam | 50% | 85% | 4,250 |
| Total | 100% | 8,430 |
8,430 ÷ 100 = 84.3%. Before the final exam, only homework and quizzes have scores, so divide by the weight completed so far (50), not by 100: the grade so far is 83.6%. Dividing by 100 would wrongly give 41.8%. The grade calculator does this for you, and the final grade calculator shows what you need on the final.
Example: average price paid
If you buy 100 at 10 each and then 50 at 16 each, the average price isn't (10 + 16) ÷ 2 = 13. You bought twice as many at the lower price, so weight each price by the quantity: (100 × 10 + 50 × 16) ÷ 150 = 12. The same method gives the average cost of shares bought at different prices, or the average rate across loans of different sizes.
The most common mistake: averaging averages
Class A has 20 students with an average of 70; Class B has 30 students averaging 80. The average across all 50 students isn't 75, it's 76, because Class B has more students. Whenever you combine averages, percentages or rates from groups of different sizes, weight each one by its group size.
Where weighted averages come up
- Grades: categories worth different shares of a class. Try the grade calculator.
- GPA: grades weighted by credits. See the GPA calculator.
- Prices and costs: the average price paid across purchases of different sizes.
- Ratings: a product's star rating is the average of each star level weighted by how many reviews gave it.
- Surveys and statistics: combining results from groups of different sizes.
If every weight is the same, the weighted average equals the ordinary mean. For a plain average, median and mode, use the mean, median and mode calculator.