How to Calculate a Weighted Average: Formula and Examples
To calculate a weighted average, multiply each value by its weight, add up those products, and divide by the sum of the weights. Say homework counts 20% and you scored 90, quizzes count 30% and you scored 80, and the final counts 50% and you scored 70. Your grade is 77, not the 80 you'd get from a plain average.
The difference matters because a plain average treats every number as equally important. A weighted average lets the bigger items count more. That could be a final exam worth half your grade, a 4-credit course, or the 5-pound bag of rice you bought alongside a 2-pound one.
This guide works through three everyday examples step by step: a class grade, a GPA, and a grocery unit price. It then covers the mistakes that most often lead to wrong answers, including averaging averages and averaging speeds.
The weighted average formula
In words, the formula is:
Weighted average = (value₁ × weight₁ + value₂ × weight₂ + …) ÷ (weight₁ + weight₂ + …)
In shorthand, that's Σ(w × x) ÷ Σw. The Greek letter Σ (sigma) means "add them all up," x is each value, and w is its weight.
A weight is any number that says how much a value should count. Weights come in different forms:
- Percentages, such as 20%, 30%, and 50% of a course grade
- Counts, such as credit hours, number of students, or number of items
- Amounts, such as pounds, gallons, or hours
When the weights are percentages that add up to exactly 100%, the bottom of the formula is 1, so you can skip the division, as long as you use the decimal form (0.20, 0.30, 0.50). If you multiply by 20, 30, and 50 instead, divide the total by 100. In every other case, divide by the total weight. Skipping that step causes one of the most common errors, covered below.
A plain average is just a weighted average where every weight is 1. That's why the two give the same answer when every item really is equally important.
How to calculate a weighted average grade
Here's the class grade example from the introduction laid out in full.
| Category | Score | Weight | Score × Weight |
|---|---|---|---|
| Homework | 90 | 20% (0.20) | 18 |
| Quizzes | 80 | 30% (0.30) | 24 |
| Final exam | 70 | 50% (0.50) | 35 |
| Total | 100% (1.00) | 77 |
The steps:
- Convert each weight to a decimal. 20% = 0.20, 30% = 0.30, 50% = 0.50.
- Multiply each score by its weight. 90 × 0.20 = 18; 80 × 0.30 = 24; 70 × 0.50 = 35.
- Add the products. 18 + 24 + 35 = 77.
- Divide by the sum of the weights. 0.20 + 0.30 + 0.50 = 1.00, so 77 ÷ 1 = 77.
- Sanity-check the result. It must fall between your lowest score (70) and your highest (90). 77 passes. If you get a number outside that range, something went wrong in the multiplication or the division.
If you need a refresher on converting percentages to decimals, the guide on how to calculate percentages walks through it.
Why the answer is 77 and not 80
The simple average is (90 + 80 + 70) ÷ 3 = 240 ÷ 3 = 80. That would only be correct if each category counted one-third. Here, though, the final exam carries half the weight, and it's also your lowest score. That pulls the result toward 70 and costs you 3 points compared with the simple average.
It can go the other way too. With this syllabus, if your best score were on the final, your weighted grade would come out higher than the simple average.
Don't expect a weighted average to land closest to the most heavily weighted score every time. That isn't a reliable test. With weights of 40%, 30%, and 30% on scores of 70, 90, and 90, the result is 28 + 27 + 27 = 82. That's closer to 90 than to 70, and it's correct. The only check you can always rely on is the lowest-to-highest range.
Working out the score you need on a final
You can also run the formula backward. Suppose you want an 80 in the course and you've already earned 90 on homework and 80 on quizzes. Those two categories contribute 18 + 24 = 42 points. The final, weighted 0.50, has to supply the rest:
- 42 + 0.50 × final = 80
- 0.50 × final = 38
- final = 38 ÷ 0.50 = 76
A 76 on the final gets you exactly 80. Check: 18 + 24 + (76 × 0.50) = 18 + 24 + 38 = 80.
Weighted average GPA using credit hours
Grade point average (GPA) is a weighted average where the weights are credit hours, the number of credits each course is worth. A 4-credit course affects your GPA more than a 3-credit one.
Suppose you earned an A in a 4-credit course and a B+ in a 3-credit course. On a common US 4.0 scale, an A is worth 4.0 grade points. Many schools set a B+ at 3.33, while some use 3.3. These values vary, so check your school's published scale.
- Multiply grade points by credits. A: 4.0 × 4 = 16.00. B+: 3.33 × 3 = 9.99.
- Add the quality points. 16.00 + 9.99 = 25.99. (Quality points are the grade-point-times-credit totals.)
- Add the credits. 4 + 3 = 7.
- Divide. 25.99 ÷ 7 ≈ 3.713, which rounds to 3.71.
If your school uses 3.3 for a B+, the result is (16 + 9.9) ÷ 7 = 25.9 ÷ 7 = 3.70. The simple average of 4.0 and 3.33 is 3.665, or about 3.67. That understates your GPA because it gives the 3-credit course the same pull as the 4-credit one.
Schools handle pass/fail courses, repeated courses, and transfer credits differently. Those rules decide which courses go into the calculation, but the formula itself doesn't change.
Weighted average price per unit at the grocery store
Weighted averages also come up when you buy the same item at different prices. Suppose you buy two bags of rice:
- A 5-lb bag for $6.00, which is $1.20 per pound
- A 2-lb bag for $5.00, which is $2.50 per pound
What did you pay per pound overall? Weight each unit price by the number of pounds:
- 5 × $1.20 = $6.00
- 2 × $2.50 = $5.00
- Total: $6.00 + $5.00 = $11.00
- Total pounds: 5 + 2 = 7
- $11.00 ÷ 7 ≈ $1.57 per pound
The simple average of the two unit prices is ($1.20 + $2.50) ÷ 2 = $1.85. That's wrong because you bought far more of the cheaper rice.
This example also gives you a shortcut: a weighted average unit price is simply total cost divided by total quantity. If you have the receipts, you often don't need the formula at all. For deals that combine more than one price cut, see how stacked discounts work.
Common weighted average mistakes
All of these errors have the same cause: treating numbers as equally important when they aren't.
Averaging averages
Say one class section of 10 students averaged 90 on a test and another section of 30 students averaged 70. The average of the two averages is (90 + 70) ÷ 2 = 80. The true average across all 40 students is lower:
- Total points: (10 × 90) + (30 × 70) = 900 + 2,100 = 3,000
- Total students: 10 + 30 = 40
- Average: 3,000 ÷ 40 = 75
Each average already summarizes a group, so it has to be weighted by the size of that group. The same trap shows up with average ratings across stores, average order values across months, and average scores across teams. Averaging averages only works when every group is the same size.
Weights that don't add up to 100%
If the weights don't add up to 100%, you have to divide by whatever they do add up to. This comes up mid-semester, before the final. Using the grade example with only homework and quizzes done:
- Products: (90 × 0.20) + (80 × 0.30) = 18 + 24 = 42
- Weights so far: 0.20 + 0.30 = 0.50
- Current grade: 42 ÷ 0.50 = 84
If you think your grade is 42, you forgot the division step. The same fix works when a syllabus has a typo, such as weights of 25%, 25%, and 40% that total only 90%. Dividing by 0.90 rescales them. Still, ask the instructor which numbers are correct instead of assuming.
Weights that add up to more than 100% get the same fix: divide by their actual sum.
Averaging speeds
You drive 60 miles to a town at 30 mph and 60 miles back at 60 mph. Your average speed is not (30 + 60) ÷ 2 = 45 mph.
Average speed is always total distance divided by total time:
- Outbound time: 60 ÷ 30 = 2 hours
- Return time: 60 ÷ 60 = 1 hour
- Total: 120 miles ÷ 3 hours = 40 mph
The plain average fails because you spent twice as long at the slower speed. Speeds should be weighted by time, not distance. When the distances are equal, the right tool is the harmonic mean: the number of values divided by the sum of their reciprocals. Here that's 2 ÷ (1/30 + 1/60) = 2 ÷ (3/60) = 2 ÷ 0.05 = 40 mph.
If you instead drove 1 hour at 30 mph and 1 hour at 60 mph, you'd cover 90 miles in 2 hours, an average of 45 mph. With equal times, the simple average works.
For any rate, the safe rule is the total of the top unit divided by the total of the bottom unit: miles ÷ gallons for fuel economy, minutes ÷ miles for running pace. That means fuel economy over equal distances needs the harmonic mean, just like speed. Pace works the other way around. Distance is already its denominator, so paces over equal distances average normally.
Which kind of average to use
| Situation | Use | Weight by |
|---|---|---|
| Every item counts equally | Simple average | (nothing, or all 1s) |
| Grade categories with percentages | Weighted average | Category percentage |
| GPA | Weighted average | Credit hours |
| Unit price across purchases | Weighted average, or total cost ÷ total quantity | Quantity bought |
| Combining group averages | Weighted average | Group size |
| Speeds over equal distances | Harmonic mean, or total distance ÷ total time | Time spent |
| Speeds over equal times | Simple average | (equal times) |
Calculating a weighted average in a spreadsheet or calculator
In Excel or Google Sheets, put the values in one column and the weights in the next, then use:
=SUMPRODUCT(B2:B4, C2:C4) / SUM(C2:C4)
SUMPRODUCT multiplies each pair and adds the results, which gives you the top of the formula. SUM gives you the bottom. Because you divide by SUM, the formula still works when the weights don't add up to 100%, or when they're credits or pounds instead of percentages.
For a quick one-off, type the whole expression with parentheses into the free online calculator, for example (90*0.2 + 80*0.3 + 70*0.5) / (0.2+0.3+0.5). The parentheses make sure the division happens last.
Weighted average quick reference
- Formula: Σ(value × weight) ÷ Σ(weight).
- Always divide by the total weight. You can skip this only when the weights are decimals that add up to exactly 1. Whole-number percentages (20, 30, 50) need dividing by 100.
- Percent weights: convert to decimals first (30% → 0.30).
- GPA: multiply grade points by credits, add them up, and divide by total credits. Check your school's grade-point scale.
- Unit prices: total cost ÷ total quantity gives the same answer.
- Group averages: weight each one by the size of its group. Never average averages from groups of different sizes.
- Speeds and rates: total of the top unit ÷ total of the bottom unit (total distance ÷ total time). Use the harmonic mean for speeds over equal distances.
- Sanity check: the result must fall between the smallest and largest values.
Frequently Asked Questions
Is a weighted average the same as a weighted mean?
Yes. Weighted average and weighted mean are two names for the same calculation: multiply each value by its weight, add the products, and divide by the total weight. In everyday use, "average" usually means the arithmetic mean, and the weighted version just lets some values count more than others.
How do I calculate a weighted grade when my syllabus uses points instead of percentages?
If every assignment is graded in points that feed into one total, divide total points earned by total points possible. That already weights each assignment by its point value, so a 200-point exam counts twice as much as a 100-point project. You only need percentage weights when the syllabus assigns category percentages separately from the points.
Can a weight be zero?
Yes. A weight of zero means that item doesn't count at all, which is the same as leaving it out. This is how dropped quizzes or ungraded practice work. In everyday uses like grades, credits, and quantities, weights should never be negative.
Can a weighted average be higher than the simple average?
Yes. When your highest values carry the largest weights, the weighted average comes out above the simple average. For example, scoring 70 on homework worth 20% and 90 on a final worth 80% gives (14 + 72) ÷ 1 = 86, while the simple average is 80.
How do I weight items when the weights are ratios like 2:1:1?
Use the ratio numbers directly as weights and divide by their sum. For values 90, 80, and 70 weighted 2:1:1, the calculation is (180 + 80 + 70) ÷ 4 = 330 ÷ 4 = 82.5. This is the same as using weights of 50%, 25%, and 25%.