What is a weighted average?
A weighted average gives some observations more influence than others. Multiply every value by its weight, add those products, and divide by the total weight.
A weight may represent importance, quantity, frequency, credits or exposure. The calculation cannot decide whether the chosen weights are appropriate; that depends on the problem being modelled.
How to calculate a weighted average by hand
Take a course where coursework scored 74 and counts for 30%, a project scored 82 for 30%, and the exam scored 68 for 40%.
| Item | Score | Weight | Score × weight |
|---|---|---|---|
| Coursework | 74 | 30 | 2,220 |
| Project | 82 | 30 | 2,460 |
| Exam | 68 | 40 | 2,720 |
| Total | 100 | 7,400 |
- Multiply each value by its weight.
- Add the products: 7,400.
- Add the weights: 100.
- Divide the first total by the second: 7,400 ÷ 100 = 74.
With percentages that total 100, you can also multiply by the weights as decimals and skip the division: 74 × 0.3 + 82 × 0.3 + 68 × 0.4 = 74.
Weighted average in Excel and Google Sheets
Excel has no weighted-average function, but SUMPRODUCT does the work in one formula. With values in B2:B4 and weights in C2:C4:
SUMPRODUCT multiplies each pair and adds the results, and SUM adds the weights. The same formula works in Google Sheets, which also has a dedicated function, =AVERAGE.WEIGHTED(B2:B4, C2:C4). After each calculation, this page shows both formulas sized to your rows, so you can check a spreadsheet against it. To go the other way, copy cells from your sheet and paste them into the calculator.
Weighted average vs simple average
A simple average gives every value the same say. A weighted average lets bigger, more important or more frequent items count for more. The two match only when all the weights are equal.
The difference matters most when you combine averages from groups of different sizes. If class A has 20 students averaging 68 and class B has 30 averaging 76, the simple average of the two means is 72. The true mean of all 50 students is (68 × 20 + 76 × 30) ÷ 50 = 72.8, because class B has more students. The calculator shows the simple mean beside the weighted one, so you can see how much the weights move the result.
Relative weights and percentage weights
Relative weights can use any non-negative scale. For example, weights 1, 2 and 3 give the third value three times the influence of the first. Percentage weights express each share out of 100 and must total 100% in this calculator.
Weighted-average example
Suppose scores of 80, 90 and 70 have weights of 20%, 30% and 50%. The weighted average is (80 × 20 + 90 × 30 + 70 × 50) ÷ 100 = 78.
Where weighted averages are used
Course components with different importance
If coursework scores 74 at 30%, a project scores 82 at 30%, and an exam scores 68 at 40%, the result is 74 × 0.30 + 82 × 0.30 + 68 × 0.40 = 74. Institutions may use different categories, caps and rounding rules, so check the official policy before treating the result as a recorded grade.
Average purchase price
Buying 40 units at £12 and 60 units at £15 gives an average purchase price of (40 × 12 + 60 × 15) ÷ 100 = £13.80 per unit. Quantities act as weights. Transaction costs would need to be added separately.
Portfolio return for one period
If 70% of a portfolio returns 5% and 30% returns −2%, its one-period weighted return is 2.9%, assuming those are the relevant starting weights. Returns across several time periods normally require compounding rather than a simple weighted average.
Combining group results
Two classes average 68 and 76, with 20 and 30 students. The combined mean is (68 × 20 + 76 × 30) ÷ 50 = 72.8. Averaging 68 and 76 directly would incorrectly give both classes equal influence.
Grade point average by credits
A GPA is a weighted average of grade points, with course credits as the weights. Grades worth 4.0, 3.3, 3.7 and 2.7 points on courses of 3, 4, 3 and 2 credits give (12 + 13.2 + 11.1 + 5.4) ÷ 12 = 3.475. Grading scales differ between countries and institutions, so use the points your school publishes.
Average rating from review counts
If 48 people give 5 stars, 30 give 4, 12 give 3, 6 give 2 and 4 give 1, the counts are the weights. The average rating is (240 + 120 + 36 + 12 + 4) ÷ 100 = 4.12 stars.
Weighted average cost of stock
A shop holds 100 units bought at 5.00 each and buys 300 more at 5.40. Under the weighted average cost method, each unit is valued at (500 + 1,620) ÷ 400 = 5.30. This figure is used for the cost of goods sold until the next purchase changes it.
Pasting data from a spreadsheet
If your numbers are already in a spreadsheet, select the cells, copy them, and paste into Paste rows from Excel, Google Sheets or a CSV file, or straight into any value or weight box. The calculator works out the layout for you:
- Columns separated by tabs (Excel, Google Sheets, Numbers), commas, semicolons or spaces are all recognised.
- A header row is detected. Columns named like “Weight”, “Credits”, “Quantity” or “Units” become the weights, and “Score”, “Grade”, “Price” or “Value” become the values. You can change either choice or swap them with one click.
- A text column such as the assessment, course or product name is kept as a label. Labels appear in the contribution table and the CSV download.
- Numbers can include thousands separators, currency symbols, percent signs, brackets for negatives, and decimal commas such as 2,50 in European files.
- Rows with a missing or non-numeric value or weight are skipped and listed, so nothing is dropped silently.
If every weight ends in % or the weights add up to 100, the weight format switches to percentages. Otherwise the weights are used as relative weights.
Zero and missing weights
A zero-weight entry has no effect on the final result. A missing weight is different from zero and should be corrected rather than silently ignored. Negative weights are excluded because they require a specialised interpretation.
Common mistakes
- Dividing by the number of items instead of the total weight. That only works when the weights add up to the item count.
- Averaging averages from groups of different sizes without weighting by group size.
- Percentage weights that don’t total 100. A missing component or a typo changes the result; the calculator flags this in percentage mode.
- Mixing scales, such as one score out of 20 and another out of 100. Convert everything to the same scale first.
- Swapping values and weights. The weight is how much an item counts, not the result it got.