Statistics
How To Calculate A Weighted Average
A weighted average answers "what is the typical value?" when some values count more than others. Grades, portfolio returns, inventory costs and survey results are almost never plain averages, which is why the distinction matters.
Quick Answer
Weighted Average = Sum of (Value x Weight) / Sum of Weights
- vi
- Each individual value
- wi
- The weight attached to that value
- Sum vi x wi
- Total of every weighted contribution
- Sum wi
- Total weight — 100 if you are already using percentages
Multiply each value by its weight, add those products, then divide by the total of the weights. Scores of 85, 92 and 78 carrying weights of 30, 40 and 30 give (2550 + 3680 + 2340) / 100 = 85.70, against a plain average of 85.00. The weights need only be proportional to each other, not expressed as percentages.
What Is A Weighted Average?
An ordinary mean treats every observation as equally important, dividing the sum by how many there are. A weighted average replaces that count with a set of importances: each value contributes in proportion to how much it is supposed to matter. When all weights are equal the two definitions coincide exactly, which is the cleanest way to remember the relationship — the plain average is simply the special case where every substitution gets the same weight.
The form worth internalising is working in percentages of one whole. Every course grade is a weighted average of assignment scores weighted by their share of the final mark. Every portfolio return is a weighted average of the returns of its holdings weighted by allocation. Every blended shipping cost per unit is a weighted average of batch costs weighted by quantity. Once you see the pattern, these stop being separate formulas to memorise.
Notice what the weights do and do not have to do. They need to be in consistent units and they need to sum to something you can divide by, but they do not have to be percentages and they do not have to sum to 100. Weights of 30, 40 and 30 — percent shares — give exactly the same answer as 3, 4 and 3, or as 60, 80 and 60, because multiplying every weight by the same constant scales both numerator and denominator equally. This proportionality is what makes the formula usable before you know the actual totals.
Gradebooks illustrate the practical version most people meet. If homework is 20%, a midterm 30% and the final 50%, a student scoring 95 and 70 on the first two has locked in 95 x 0.20 + 70 x 0.30 = 40.00 points of the final grade. Reaching an overall 80 therefore needs 80 - 40 = 40 more points from the 50-point final, which is a score of 80.00 on that exam. This reverse form — solving for one missing input — is where weighted averages earn their keep as a planning tool rather than an accounting one.
Portfolio returns show why weighting by the right thing matters. A portfolio holding 60% in an asset returning 8% and 40% in one returning 3% returned 0.60 x 8 + 0.40 x 3 = 6.0%. The weights are allocations of capital, not time periods, and getting that wrong — for instance weighting by holding duration rather than dollars — silently produces a figure that looks authoritative and means nothing.
Two checks catch nearly every computational error. First, compute the plain average alongside the weighted one; if the two differ dramatically, confirm that the weights are genuinely unequal, because a large gap from near-equal weights usually signals a mis-keyed number. Second, verify that the result lies between the smallest and the largest observed value. A weighted average can never fall outside that range — if it does, either a weight is negative or the denominator has been omitted entirely.
One phenomenon deserves warning because it is genuinely counterintuitive and repeatedly turns up in aggregated reporting: Simpson's paradox. A weighted average of two groups can move in the opposite direction to the average within every individual group, when the group sizes themselves shift between periods. A hospital can show higher survival rates in both its wards while its overall rate falls, purely because it treated more severe cases in the second period. Nothing is miscounted; the mix changed.
Finally, keep units straight. Weights are not values, and confusing the two — using the item quantities as both the value and the weight simultaneously — is the classic inventory costing error that produces units of "dollars squared per unit". Ask what the answer should be measured in, and confirm that the units in the numerator cancel to that.
Where it belongs in a decision is also worth noting: a weighted average is a summary, and summaries hide dispersion. Two portfolios can both average 6% while one is a mix of steady holdings and the other oscillates between large gains and losses. Pair it with a measure of spread whenever the difference between typical and extreme outcomes could matter.
Formula
Weighted Average = (v1 x w1 + v2 x w2 + v3 x w3) / (w1 + w2 + w3)
Sum every value times its weight, then divide by the sum of weights. Weights may be percentages, counts, or ratios — only their relative size matters.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| vi | Each value being averaged | number | Scores, returns, unit costs — anything you would otherwise average. |
| wi | Weight for that value | weight | Its relative importance. Use shares summing to 100, or any consistent proportional set. |
| vw | Weighted average | number | Always falls between the smallest and largest value in the set. |
Plain Average = (v1 + v2 + v3) / n
The equal-weights case. Comparing it with the weighted result isolates how much the weights actually changed the answer.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| n | Number of observations | count | Identical in effect to assigning every weight the value one. |
Required v = (Target - Sum of known v x w) / w for the missing item
Subtract everything already locked in from the target, then divide by whatever weight remains. Use it to answer what score or return is still needed.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| T | Target weighted average | number | The overall result you want to finish with. |
| wk | Weight still open | weight | Expressed on the same scale as the other weights — as a share if those are shares. |
How To Calculate A Weighted Average
- 1
List each value with the weight it carries
Write them side by side so units are visible. If the weights are percentages summing to 100 the denominator simplifies to 100, otherwise add them explicitly.
- 2
Multiply each pair
85 x 30 = 2550, 92 x 40 = 3680, and 78 x 30 = 2340. Each product is that value's total contribution to the result.
- 3
Add both columns
Contributions total 8570 and weights total 100. Keeping the two sums separate is what prevents the classic mistake of dividing by the number of items instead.
- 4
Divide contributions by total weight
8570 / 100 = 85.70. Note this sits between 78 and 92, where any weighted average of those numbers must sit.
- 5
Compare against the plain average
(85 + 92 + 78) / 3 = 85.00. The 0.70 gap tells you the weights shifted the outcome toward the higher-weighted 92 — a helpful check that the answer moved in a sensible direction.
Examples
Example 1: Three scores with unequal weights
- Value 1
- 85 with weight 30
- Value 2
- 92 with weight 40
- Value 3
- 78 with weight 30
| Step | Calculation | Result |
|---|---|---|
| First contribution | 85 x 30 | 2550 |
| Second contribution | 92 x 40 | 3680 |
| Third contribution | 78 x 30 | 2340 |
| Total contributions | 2550 + 3680 + 2340 | 8570 |
| Total weight | 30 + 40 + 30 | 100 |
| Weighted average | 8570 ÷ 100 | 85.70 |
Result: 85.70 against a plain average of 85.00 — the heavier weight on the 92 pulls the result 0.70 above the unweighted mean.
Example 2: Grade points weighted by credit hours
- Course A
- Grade 4.0, 3 credits
- Course B
- Grade 3.0, 4 credits
- Course C
- Grade 4.0, 3 credits
| Step | Calculation | Result |
|---|---|---|
| Weighted grade points | 4.0 x 3 + 3.0 x 4 + 4.0 x 3 | 36.0 |
| Total credits | 3 + 4 + 3 | 10 |
| Grade point average | 36.0 ÷ 10 | 3.60 |
| What the unweighted mean would have said | (4.0 + 3.0 + 4.0) ÷ 3 | 3.67 |
Result: 3.60 — the four-credit B drags the result below the 3.67 you would get by averaging the grades equally.
Example 3: Solving for the score still needed
- Homework
- 95, worth 20%
- Midterm
- 70, worth 30%
- Target
- 80 overall
| Step | Calculation | Result |
|---|---|---|
| Points already secured | 95 x 0.20 + 70 x 0.30 | 40.00 |
| Points still required | 80 - 40.00 | 40.00 |
| Final exam weight | 50% | 0.50 |
| Score needed on the final | 40.00 ÷ 0.50 | 80.00 |
Result: 80.00 on the final — the weak midterm has already spent the cushion the homework built.
Calculator
Weighted average
85.7
- Unweighted average for comparison
- 85
- Total weight
- 100
- Effect of the weights
- 0.7
Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.
Prefer a full-width tool? Open the A Weighted Average calculator page.
Common Mistakes
Dividing by the number of items instead of the total weight
With weights of 30, 40 and 30 the correct divisor is 100, not 3. This produces answers three orders of magnitude out and is the most common single error.
Using inconsistent units for weights
Mixing percentages with counts puts a hundred alongside a three and silently over-weights whichever happens to be larger. Convert to one consistent scale first.
Using the quantity as both value and weight
It produces nonsense units. When averaging unit costs, the cost is the value and the batch size is the weight — never both at once.
Assuming weights must total 100
They do not. Any proportional set gives the same result, since scaling every weight scales numerator and denominator together. Only their relative size carries information.
Comparing weighted averages across periods without checking the mix
Simpson's paradox can reverse the apparent trend when group sizes shift. Compare like with like, or decompose the change into shift within groups and shift in the mix.
FAQ
Do my weights have to add up to 100%?
No. Weights only need to be proportional to each other. Thirty, forty and thirty behaves identically to three, four and three, because the scaling cancels between numerator and denominator.
Can a weight be zero or negative?
Zero simply removes that value from consideration, which is legitimate. Negative weights are occasionally used in specialised financial contexts but break the guarantee that the average lies between the smallest and largest values, so avoid them unless you know exactly why.
How is this different from a moving average?
A moving average is a sequence of ordinary averages over rolling windows, each typically equal-weighted. You can construct a weighted moving average that emphasises recent observations, but the two concepts address different questions.
What should I use as the weight for a portfolio return?
Allocation by market value at the start of the period. Period returns then combine linearly, which is what makes the portfolio calculation exact rather than approximate.
Why is my weighted average outside the range of my values?
Something is wrong. A weighted average with non-negative weights can never fall below the smallest value or above the largest. Check the denominator first — dividing by the item count instead of the total weight is the usual culprit.
References
- [1]Khan Academy, Weighted averages and expected value — https://www.khanacademy.org/math/statistics-probability/probability-library
- [2]Organisation for Economic Co-operation and Development (OECD), Statistics Directorate, Weighted mean and index number construction — https://www.oecd.org/en/data/datasets.html
- [3]U.S. Bureau of Labor Statistics, Consumer Price Index — weighting expenditure categories — https://www.bls.gov/cpi/