Weighted average
A weighted average multiplies each value by its weight, adds the products, and divides by the sum of the weights: sum(w * x) / sum(w). Values with larger weights pull the result toward themselves; when all weights are equal it is the ordinary mean.
Syntax
weighted mean = sum(w * x) / sum(w)| Part | What it is |
|---|---|
x | each value |
w | the weight of that value (count, importance, share) |
Examples
Grades: exam 80 (weight 0.3), project 90 (weight 0.7)
(0.3 * 80 + 0.7 * 90) / (0.3 + 0.7) = (24 + 63) / 1Result: 87
Excel: =SUMPRODUCT(B1:B2, C1:C2) / SUM(C1:C2)
Values 10, 20, 30 with weights 2, 3, 5
(2 * 10 + 3 * 20 + 5 * 30) / (2 + 3 + 5) = 230 / 10Result: 23
Average price paid: 100 shares at $10 and 300 shares at $14
(100 * 10 + 300 * 14) / 400 = 5200 / 400Result: $13 per share
Common mistakes
- Dividing by the number of values instead of the sum of the weights; the denominator is sum(w).
- Averaging percentages or rates without weighting by their base sizes; a 10% conversion rate from 1,000 visits and 50% from 10 visits do not average to 30%.
- Weights in percent that do not add to 100; the formula still works if you divide by their sum, but check whether a weight is missing.
Practice Weighted average
These drills check your answer on live data, free, no account needed.
- Weighted meanA buyer purchased printer paper (per case) from 3 suppliers: 52 units at $39.50, 59 units at $30.50, 32 units at $24.75. What was the average price paid per unit across all units bought? Give dollars and cents.
Questions
How do I do a weighted average in Excel?
Put values in one column and weights in the next, then use =SUMPRODUCT(values, weights) / SUM(weights). There is no built-in WEIGHTED.AVERAGE function.
When is a weighted average the same as the mean?
When every weight is equal. Then sum(w * x) / sum(w) reduces to sum(x) / n.
Related
- Mean, median and modeHow to calculate the mean, median and mode of a data set by hand and in Excel, when each average is the right one, and the mistakes that give a wrong answer.
- Expected valueExpected value is the probability-weighted average of all outcomes. Formula, worked examples with dice, raffles and bets, and the Excel SUMPRODUCT formula.
- Standard deviationThe standard deviation formula, sample versus population versions, a worked example with exact numbers and the Excel functions STDEV.S and STDEV.P.
- PercentileHow to find a percentile of a data set and the percentile rank of one value, with exact worked examples, Excel PERCENTILE.INC and common mix-ups.
Previous: Coefficient of variationNext: Range and interquartile range