Math
Weighted average calculator
A weighted average is a mean in which some values count for more than others. Enter each value with its weight — a percentage, a credit count, a quantity — to get the weighted average, the plain average for comparison, and the working.
| Value (x) | Weight (w) | Remove |
|---|---|---|
Weights can be credits, percentages, counts or any positive number. They do not need to add up to 1 or 100 — the calculator divides by their total.
Show the working, step by step
The formula
weighted average = Σ(w × x) ÷ Σw
Each value x is multiplied by its weight w, the products are added,
and the total is divided by the sum of the weights. Dividing by Σw rather than
by the number of values is what makes the weights relative: doubling every weight changes
nothing.
A worked example: a course grade
A course grades four components. The student's marks and the weight each carries in the syllabus are the calculator's default rows:
| Component | Mark (x) | Weight (w) | w × x |
|---|---|---|---|
| Coursework | 88 | 30 | 2,640 |
| Midterm | 92 | 20 | 1,840 |
| Final exam | 79 | 40 | 3,160 |
| Participation | 95 | 10 | 950 |
| Total | 100 | 8,590 |
- Σwx = 2,640 + 1,840 + 3,160 + 950 = 8,590.
- Σw = 30 + 20 + 40 + 10 = 100.
- Weighted average = 8,590 ÷ 100 = 85.9.
The plain average of the four marks is 88.5. The weighted figure is 2.6 points lower because the weakest mark, the final exam, carries the most weight. That gap is the whole reason to weight: an unweighted average would overstate this grade.
Where weighted averages are used
- Grades and GPA. Components weighted by syllabus percentage, or course grades weighted by credit hours. A 4-credit A moves a GPA more than a 1-credit A.
- Prices and costs. The average price paid across several purchases is weighted by quantity: 100 units at $2 and 10 units at $5 average $2.27 a unit, not $3.50.
- Survey weights. Responses from under-represented groups are weighted up so the sample matches the population.
- Portfolio returns. Each asset's return weighted by its share of the money invested.
- Combining group means. The overall mean of several groups is their means weighted by group size.
Weighted average versus weighted standard deviation
The weighted average gives the centre. How far the values spread around it is the weighted standard deviation, which weights each squared deviation the same way. The calculator above reports the population version for reference: 6.0075 for the course example. If the weights describe a sample and you need a bias-corrected spread, use the weighted standard deviation calculator, which offers both sample and population modes and explains which correction applies.
Weighted average in Excel and Google Sheets
| What you want | Formula |
|---|---|
| Weighted average, values in A, weights in B | =SUMPRODUCT(A2:A5,B2:B5)/SUM(B2:B5) |
| Google Sheets built-in | =AVERAGE.WEIGHTED(A2:A5,B2:B5) |
| Unweighted average, for comparison | =AVERAGE(A2:A5) |
Common mistakes
- Dividing by the count instead of the total weight. With the example, 8,590 ÷ 4 = 2,147.5 — nonsense. It only works when the weights already sum to the number of values.
- Averaging averages. The mean of two class averages is not the mean of all students unless the classes are the same size. Weight each average by its class size.
- Weights on different bases. Mixing percentages with points out of 50 gives wrong weights. Convert every weight to the same scale first.
- Missing components. If a component has not been graded yet, leave it out (or weight it 0). The formula then gives the average of what has been graded so far.
Related calculators
-
Weighted standard deviation
The spread around the weighted average, with the bias correction for samples.
-
Grade average
An unweighted average of scores, with the spread of the marks.
-
Mean (average) calculator
The ordinary mean, plus geometric, harmonic and trimmed means.
-
Frequency table SD
When the weights are counts: the mean and SD of a frequency table.
Common questions
How do you calculate a weighted average?
Multiply each value by its weight, add those products, and divide by the total of the
weights: weighted average = Σwx ÷ Σw. With scores of 88, 92, 79 and 95 weighted
30, 20, 40 and 10, the products sum to 8,590 and the weights to 100, so the weighted average
is 85.9.
Do the weights have to add up to 100%?
No. The formula divides by the total weight, so weights of 3, 2, 4 and 1 give exactly the same answer as 30%, 20%, 40% and 10%. They only need to be in the right proportion to one another. If you divide by the number of values instead of the total weight, the answer is wrong unless the weights happen to sum to that number.
What is the difference between a weighted average and a normal average?
A normal (arithmetic) average gives every value the same weight of 1. A weighted average lets some values count for more than others. When all the weights are equal the two are identical; the more unequal the weights, the further apart they can drift.
How do I calculate a weighted average in Excel or Google Sheets?
With values in A2:A5 and weights in B2:B5:
=SUMPRODUCT(A2:A5,B2:B5)/SUM(B2:B5)
SUMPRODUCT multiplies the two columns row by row and adds the results. There is no
built-in WEIGHTEDAVERAGE function in Excel; Google Sheets also has
=AVERAGE.WEIGHTED(A2:A5,B2:B5).
Can a weight be zero or negative?
A weight of zero simply leaves that row out, which is a handy way to exclude a value without deleting it. Negative weights have no sensible meaning for an average, and this calculator rejects them.