Weighted Average Calculator: Formula, Grades, GPA and Portfolios
By FindMySum · Last reviewed
A weighted average calculator combines several numbers when some of them should count more than others. A final exam worth half the course, a four-credit class next to a two-credit one, a stock that is 60% of a portfolio: in each case a plain average would give the wrong answer. This article explains the formula, the role of the total weight, and the most common uses, starting with the calculator's default course-grade example.
The formula
For values x₁, x₂, … with weights w₁, w₂, …:
Weighted average = (w₁x₁ + w₂x₂ + … + wₙxₙ) ÷ (w₁ + w₂ + … + wₙ)
or, in summation notation, Σ(w × x) ÷ Σw. The NIST Dataplot reference manual gives the same definition of the weighted mean, and in a spreadsheet it is =SUMPRODUCT(values, weights) / SUM(weights).
Worked example: a course grade
The calculator opens with three pieces of coursework:
| Item | Mark | Weight |
|---|---|---|
| Assignments | 85 | 20% |
| Midterm | 78 | 30% |
| Final exam | 92 | 50% |
Multiply each mark by its weight and add: 85 × 20 + 78 × 30 + 92 × 50 = 1,700 + 2,340 + 4,600 = 8,640. Divide by the total weight of 100 to get 86.4.
The simple average of the three marks is 85. The weighted average is higher because the best mark, the final exam, carries half the weight. The calculator's breakdown table shows each row's share of the weight and how much it adds to the result: the final exam contributes 46.0 of the 86.4 points.
Why divide by the total weight?
Dividing by Σw turns any set of weights into proportions that add up to 1. That is what lets you use whatever units are natural:
- Percentages that total 100, as in a course outline.
- Credits or units, as in a GPA: a 4-credit course counts twice as much as a 2-credit one.
- Counts, as when averaging prices across purchases of different sizes.
- Market values, as in a portfolio.
It also handles weights that don't total what you expect. If only 60% of a course has been graded, entering the two 30% tests you have gives your average on the work so far, rather than a misleadingly low number that treats the missing 40% as zeros. The calculator flags percentage weights that don't add up to 100 so you know which situation you are in.
Grade point average
A GPA is a weighted average of grade points with credit hours as the weights. Four courses with grade points 3.7, 3.3, 4.0 and 2.7 and credits 3, 4, 3 and 2 give (11.1 + 13.2 + 12.0 + 5.4) ÷ 12 = 41.7 ÷ 12 = 3.475. The four-credit course pulls the GPA towards its 3.3 more than the two-credit course pulls it towards 2.7. The GPA calculator adds letter-grade scales and semester totals on top of this.
Portfolio returns
The return of a portfolio over a period is the weighted average of the returns of its holdings, weighted by their value at the start of the period. A portfolio that is 60% stocks returning 5% and 40% bonds returning 3% returned 0.6 × 5 + 0.4 × 3 = 4.2%. This is a single-period figure. Over several years, returns compound, and the right summary is a geometric (time-weighted) average rather than an arithmetic one.
When not to use a weighted average
A weighted average assumes each value's influence should be proportional to its weight. That is not always the case:
- Averaging rates over different bases. The average speed over two equal distances is a harmonic mean, not an arithmetic one.
- Growth over time. Compound growth needs a geometric mean.
- Skewed data. A weighted median can describe a typical value better when a few large values dominate.
For ordinary grades, credits, prices and portfolio shares, the weighted arithmetic average this calculator uses is the standard choice.
More questions
Is a weighted average always between the smallest and largest value?
Yes, as long as every weight is zero or positive and at least one is positive. The weighted average is a blend of the values, so it can't be lower than the smallest or higher than the largest. That makes a quick check: if your answer falls outside the range of your values, a weight or a value was entered wrong.
What score do I need on the final to reach a target grade?
Work backwards from the weighted average. If the final is worth 50% and your other work averages 80, a final grade of 86.4 needs 0.5 × 80 + 0.5 × F = 86.4, so F = 92.8. The final grade calculator does this rearrangement for you, including courses with several categories.
Why does my school's weighted GPA differ from the one I calculate?
Schools often add extra points for honours, AP or IB courses (a 5.0 scale instead of 4.0), round each course to a letter grade before averaging, or leave out pass/fail and transfer credits. The arithmetic is the same weighted average, but the values and weights going into it follow the school's rules.
What is a weighted moving average?
A moving average that gives recent data points more weight than older ones, used in finance and forecasting. A 3-day weighted moving average might use weights 3, 2 and 1 for today, yesterday and the day before. Each day the window moves forward and the weighted average is recalculated with the same formula.
How is a weighted average used in inventory accounting?
The weighted average cost method values stock at the average purchase price weighted by quantity. Buying 100 units at $10 and 300 at $12 gives (100 × 10 + 300 × 12) ÷ 400 = $11.50 a unit, which is then used for the cost of goods sold until the next purchase changes the average.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.