Article
Weighted Average: Formula, Examples and Calculator
A weighted average accounts for the fact that some numbers matter more than others. This article gives you the formula, explains how it differs from a simple average, and walks through four worked examples with grades and prices. You can test your own data in the weighted average calculator.
Last updated:
For a simple mean use the average calculator. For grades, see the grade calculator and the GPA calculator.
The weighted average formula
A weighted average is the sum of each value multiplied by its weight, divided by the sum of the weights. A weight says how much influence a value has on the result. The larger the weight, the more strongly that value pulls the average toward itself.
x̄ = (w₁·x₁ + w₂·x₂ + … + wₙ·xₙ) ÷ (w₁ + w₂ + … + wₙ)
example: (3·5 + 2·4 + 1·3) ÷ (3 + 2 + 1) = 26 ÷ 6 ≈ 4.33
| Value x | Weight w | Product w · x |
|---|---|---|
| 5 | 3 | 15 |
| 4 | 2 | 8 |
| 3 | 1 | 3 |
| Sum of weights: 6 | Sum of products: 26 |
The number of values must equal the number of weights, and the sum of the weights cannot be zero.
Try it with an example
Example: three grades with weights. The exam has grade 4 and weight 3, the project has grade 5 and weight 2, and the homework has grade 3 and weight 1. The lists are already stored in the link to the calculator.
- Grades
- 4, 5, 3
- Weights
- 3, 2, 1
- Result
- 4.1667 (plain mean: 4)
Open the calculator with these numbers
The calculator reads the values from the page address and shows the result right away. You can change them freely.
How the calculator works
The calculator computes the weighted average Σ(w · x) ÷ Σw from two lists of equal length: values and weights. Next to the result it shows the sums Σ(w · x) = 25 and Σw = 6 and the plain arithmetic mean for comparison. The sum of the weights cannot be zero. It is not an ECTS average, where the weights are credit points assigned to courses; there is a separate ECTS average calculator for that.
How to calculate a weighted average step by step
Write the values and their weights in the same order. Multiply each value by its weight, add all the products, then divide the result by the sum of the weights.
For scores 80 and 90 with weights 2 and 1, the sum of products is 160 + 90 = 250 and the sum of weights is 3. The weighted average is 250 ÷ 3 ≈ 83.33. In the calculator you enter a list of values and a list of weights, and besides the result you see the simple average and the difference between them.
The weights do not have to add up to 100 or to 1. Only their proportions matter: weights 2 and 1 give the same result as 20 and 10.
Weighted average with percentage weights
Weights do not have to be whole numbers or add up to 100. If they are given as percentages, for example exam 40% and project 60%, enter them directly as 40 and 60. The calculator divides by the sum of the weights, so the result is the same as with the weights 0.4 and 0.6.
| Component | Grade | Weight |
|---|---|---|
| Exam | 4 | 40% |
| Project | 5 | 60% |
| Weighted average | (4 · 40 + 5 · 60) ÷ 100 = 4.6 | — |
In the weighted average calculator enter the grades 4, 5 and the weights 40, 60. The result 4.6 lies closer to the grade 5, because the project has the larger weight.
Weighted average in Excel and Google Sheets
In a spreadsheet you calculate a weighted average with the SUMPRODUCT function and divide the result by the sum of the weights. If the grades are in cells A2:A4 and the weights in B2:B4, the formula is:
=SUMPRODUCT(A2:A4,B2:B4)/SUM(B2:B4)
For the grades 4, 5, 3 and the weights 3, 2, 1 the formula returns 4.1667, the same result the calculator shows.
How a weighted average differs from a simple average
A simple average treats all values equally. For 80 and 90 it is 85. A weighted average with weights 2 and 1 gives 83.33, because the score of 80 counts twice. When all weights are equal, the two averages are identical.
If you need a middle value rather than a mean, use the median calculator. The spread of results around the mean is covered in the article Standard Deviation: Formula, Examples and Population vs Sample.
Where a weighted average is useful
Grades at school and university. An exam may carry a weight of 3 and a quiz a weight of 1. With ECTS credits the weights are the credits of each course, which the ECTS average calculator takes into account.
Average purchase price. When you buy goods in several batches at different prices, the weight is the quantity. For 10 units at $5 and 30 units at $7 the average price is $6.5, not $6.
Investment portfolios. The average return of a portfolio is calculated with weights equal to the share of each holding.
Surveys. A final survey score often combines answers from different groups, with the size of each group as the weight.
Quick comparison of results
| Values | Weights | Weighted average | Simple average |
|---|---|---|---|
| 80; 90 | 2; 1 | 83.33 | 85 |
| 10; 20 | 1; 3 | 17.5 | 15 |
| 50; 70; 90 | 1; 2; 1 | 70 | 70 |
| 3; 5 | 0.5; 1.5 | 4.5 | 4 |
Four worked examples
You can repeat each example in the weighted average calculator.
1. Two tests: 80 (weight 2) and 90 (weight 1)
The lower score carries the higher weight.
- Enter the values 80 and 90 and the weights 2 and 1.
- Compute the products: 80 · 2 = 160 and 90 · 1 = 90.
- Divide the sum 250 by the sum of weights 3.
- The result is 83.33, while the simple average is 85.
2. Average purchase price: 10 units at $5 and 30 units at $7
The weight is the number of units.
- Enter the prices 5 and 7 and the weights 10 and 30.
- Compute the products: 5 · 10 = 50 and 7 · 30 = 210.
- Divide the sum 260 by 40 units.
- The result is $6.5 per unit.
3. Three scores: 50, 70 and 90 with weights 1, 2 and 1
The middle score counts twice.
- Enter the values 50, 70, 90 and the weights 1, 2, 1.
- Compute the sum of products: 50 + 140 + 90 = 280.
- Divide by the sum of weights 4.
- The result is 70.
4. Decimal weights: 3 (weight 0.5) and 5 (weight 1.5)
Weights do not have to be whole numbers.
- Enter the values 3 and 5 and the weights 0.5 and 1.5.
- Compute the products: 1.5 and 7.5, so the sum is 9.
- Divide by the sum of weights 2.
- The result is 4.5.
Common mistakes with weighted averages
- Dividing by the number of values instead of the sum of weights — the denominator is always the sum of weights, not the count of items.
- Different numbers of values and weights — every value needs its own weight, in the same order.
- Leaving out a weight for one value — a missing weight changes the result just like a wrong one.
- Using percentages as weights without checking — percentage weights work as long as each value has the correct share.
- Expecting the result to be the midpoint — a weighted average lies closer to the value with the larger weight.
- Confusing it with a simple average — the two agree only when all weights are equal.
- Rounding the products too early — round only the final result.
Frequently asked questions
How do you calculate a weighted average?
Multiply each value by its weight, add the products and divide by the sum of weights. For 80 and 90 with weights 2 and 1 the result is 250 ÷ 3 ≈ 83.33.
Do the weights have to add up to 100 percent?
No. Only the proportions between the weights matter. Weights 2 and 1 give the same result as 20 and 10.
When is a weighted average equal to a simple average?
When all weights are the same. Then every value has an identical influence on the result.
Can a weight be zero?
A weight of zero means that value has no influence on the result. The sum of all weights, however, cannot be zero, because division would be impossible.
How does a weighted average differ from an ECTS average?
The ECTS average is a special case in which the weights are the credits assigned to each course. The general calculator lets you use any weights.
How do you calculate a weighted average in Excel?
Use =SUMPRODUCT(values, weights) / SUM(weights).
How do you calculate a weighted average with percentage weights?
Enter the weights as percentages, for example 40 and 60, then divide the sum of the products by the sum of the weights. For the grades 4 and 5 with weights 40% and 60% you get (4 · 40 + 5 · 60) ÷ 100 = 4.6.
What happens if the number of weights differs from the number of values?
The result is undefined, because not every value has a weight. The calculator requires lists of equal length.
Calculate your own weighted average
Enter a list of values and a list of weights in the weighted average calculator. The result also shows the simple average and the difference between them, so you can see at once how the weights shift the outcome.
For comparison use the arithmetic mean, and for analyzing spread use the standard deviation calculator.