To calculate a weighted average, multiply each value by its weight, add those products together, then divide by the sum of the weights. Weighted averages are used whenever some values count more than others: course grades, investment returns, the average price paid for shares, or the average interest rate on several debts. This guide shows the formula, step-by-step examples and the most common mistakes.
How to calculate a weighted average: the formula
Weighted average = (value1 × weight1 + value2 × weight2 + … ) ÷ (weight1 + weight2 + …)
A regular (arithmetic) mean gives every value the same importance. A weighted average lets you say, for example, that a final exam worth 40% of the course should count four times as much as a quiz worth 10%. If all the weights are equal, the weighted average equals the regular mean, which you can check with our average calculator.
Step-by-step method
- List each value and its weight in two columns.
- Multiply each value by its weight.
- Add the products.
- Add the weights.
- Divide the sum of products by the sum of weights.
Weights can be percentages, credits, quantities, dollar amounts or any other measure of importance. They do not need to add up to 100, because step 5 divides by their total.
Example 1: course grade with weighted components
| Component | Your mark | Weight | Mark × weight |
|---|---|---|---|
| Assignments | 88% | 20 | 1,760 |
| Quizzes | 74% | 15 | 1,110 |
| Midterm | 69% | 25 | 1,725 |
| Final exam | 81% | 40 | 3,240 |
| Total | 100 | 7,835 |
Weighted average: 7,835 ÷ 100 = 78.35%. A simple average of the four marks would give 78.0%, slightly lower, because the strong final exam carries the most weight here.
If you are trying to work out what you need on an upcoming exam, use our final grade calculator, which runs this formula in reverse.
Example 2: GPA weighted by credits
A grade point average is a weighted average where the weights are course credits.
- Calculus, 4 credits, grade point 3.7: 14.8
- English, 3 credits, grade point 3.3: 9.9
- Chemistry, 4 credits, grade point 3.0: 12.0
- Elective, 2 credits, grade point 4.0: 8.0
Sum of products: 44.7. Sum of credits: 13. GPA: 44.7 ÷ 13 = 3.44. Canadian schools use different scales (4.0, 4.3, 9 or 12 points); our GPA calculator handles the common ones.
Example 3: average price paid for shares
You buy the same exchange-traded fund three times:
| Purchase | Units | Price per unit | Cost |
|---|---|---|---|
| January | 50 | $30.00 | $1,500 |
| May | 30 | $34.00 | $1,020 |
| October | 20 | $28.50 | $570 |
| Total | 100 | $3,090 |
Weighted average price: $3,090 ÷ 100 units = $30.90 per unit. The simple average of the three prices, $30.83, is wrong here because you bought different quantities each time. In Canada, this weighted figure is the basis of the adjusted cost base used to calculate capital gains, before adding commissions.
Example 4: average interest rate on several debts
To know the blended rate you pay across debts, weight each rate by its balance.
- Credit card: $4,000 at 19.99% gives 799.6
- Car loan: $15,000 at 7.49% gives 1,123.5
- Line of credit: $6,000 at 9.95% gives 597.0
Sum of products: 2,520.1. Total balance: $25,000. Weighted average rate: 2,520.1 ÷ 25,000 = about 10.08%. This number is useful when comparing a consolidation loan offer: a new loan above about 10% would not lower your average rate, even if it beats the credit card.
Example 5: average speed over a trip
Average speed is another weighted average, where time is the weight. If you drive 1 hour at 100 km/h on the highway and 2 hours at 50 km/h in traffic, the average speed is not (100 + 50) ÷ 2 = 75 km/h. It is total distance divided by total time: (100 × 1 + 50 × 2) ÷ (1 + 2) = 200 ÷ 3 = 66.7 km/h. The slower segment counts more because you spent more time in it.
Example 6: weighted average cost of inventory
Small businesses often value inventory with the weighted average cost method. If you hold 200 units bought at $4.00 and then buy 300 more at $4.50, the average cost per unit is (200 × 4.00 + 300 × 4.50) ÷ 500 = $4.30. Each unit sold is then recorded at $4.30 until the next purchase changes the average. This makes margins easier to track; our profit margin calculator can take that cost and show your margin at any selling price.
Weighted average versus median
A weighted average is still sensitive to extreme values. If one item has a huge weight and an unusual value, it can dominate the result. When outliers matter, look at the median as well, or check how much each item contributes to the total by dividing its product by the sum of products.
Common mistakes to avoid
- Dividing by the number of values instead of the sum of the weights.
- Mixing weight units, such as percentages for some items and points for others.
- Forgetting missing components: if a course component is not graded yet, either exclude its weight or plan for it explicitly.
- Averaging percentages from groups of different sizes without weighting by group size.
- Rounding too early: keep full precision until the final step.
Checking your answer quickly
A weighted average must always fall between the smallest and the largest value in your list. If your result is outside that range, there is an error in the products or in the total of the weights. A second quick test: the result should sit closer to the values with the biggest weights. In the course example, the final exam at 81% carries 40% of the weight, so a result near 78% to 79% makes sense, while a result of 72% would signal a mistake. Finally, if you change one weight to zero and the result does not move, check that the corresponding product was actually included in the sum.
Weighted average in a spreadsheet
In Excel, Google Sheets or LibreOffice, put the values in column A and the weights in column B, then use =SUMPRODUCT(A2:A10,B2:B10)/SUM(B2:B10). The SUMPRODUCT function multiplies each pair and adds the results in one step, which avoids manual errors on long lists. You can also convert the weights to percentages first with our percentage calculator to check that they add up to 100%.
FAQ
Do weights have to add up to 100?
No. Any positive weights work because the formula divides by their total. Percentages that add up to 100 simply make the division easy.
What is the difference between weighted average and mean?
The mean treats every value equally. A weighted average gives some values more influence according to their weight.
Can a weight be zero?
Yes. A value with zero weight has no effect on the result, which is the same as leaving it out.
How do I calculate a weighted average percentage?
Use the same formula: multiply each percentage by its weight, add the results, and divide by the total weight. The answer is a percentage.
Is a weighted average the same as a weighted mean?
Yes, the two terms mean the same thing.
In short: multiply, add, then divide by the total weight. Whether you are checking a course grade, an average share price or a blended loan rate, the weighted average gives the answer that reflects what really counts.