How to Calculate a Weighted Average (Grades, Prices and More)

Multiply each value by its weight, add the products and divide by the sum of the weights. Worked examples for grades, prices, speeds and percentages.

To calculate a weighted average, multiply each value by its weight, add up those products, and divide by the sum of the weights. If homework is worth 20% of a grade and you scored 92, quizzes are 30% and you scored 78, and the final is 50% and you scored 85, your course grade is 0.20 × 92 + 0.30 × 78 + 0.50 × 85 = 84.3.

A plain average treats every number as equally important. A weighted average lets bigger, more important or more frequent items count for more, which is what most real-world averages actually need.

The weighted average formula

x̄w = Σ(wi × xi) ÷ Σwi

Here each x is a value and each w is its weight. Weights can be percentages, credit hours, quantities, durations or any other measure of importance.

Steps

  1. List each value with its weight.
  2. Multiply each value by its weight.
  3. Add the products.
  4. Add the weights.
  5. Divide the sum of products by the sum of weights.

When the weights are percentages that total 100%, step 4 gives 1 and you can skip the division.

Example 1: A course grade

Category Weight Your average Weight × average
Homework 20% 92 18.4
Quizzes 30% 78 23.4
Final exam 50% 85 42.5
Total 100% 84.3

The plain average of 92, 78 and 85 is 85, but the final grade is 84.3 because the weaker quiz score carries more weight than the strong homework score. The grade calculator does this for any number of categories.

Partway through the semester

If the final has not happened yet, the weights of the graded categories add to only 50%. Divide by that:

(0.20 × 92 + 0.30 × 78) ÷ (0.20 + 0.30) = 41.8 ÷ 0.50 = 83.6

Dividing by 100% here would report 41.8, which badly understates where you stand.

What do I need on the final?

Rearranging the formula answers the most common grade question. Suppose your average is 86 with 75% of the course graded, and the final is worth the remaining 25%:

needed = (target − current × wdone) ÷ wfinal

For a 90: (90 − 86 × 0.75) ÷ 0.25 = (90 − 64.5) ÷ 0.25 = 102, which is not possible without extra credit

For an 85: (85 − 64.5) ÷ 0.25 = 82

The final grade calculator solves this instantly.

Points-based grading

Some courses weight categories by total points instead of percentages. Then the weighted average is simply total points earned divided by total points possible. With 180 of 200 homework points and 255 of 300 test points, the grade is 435 ÷ 500 = 87%. Averaging the two category percentages, 90% and 85%, would give 87.5%, slightly overweighting homework, which has fewer points.

Example 2: Average cost of inventory

A store buys the same product three times at different prices:

Purchase Units Price per unit Cost
1 100 $4.20 $420
2 250 $3.90 $975
3 50 $4.50 $225
Total 400 $1,620

Weighted average cost = $1,620 ÷ 400 units = $4.05 per unit

The simple average of the three prices is $4.20, but most units were bought at the lowest price, so the true average cost is lower. The same logic gives the average price per share when buying a stock in several lots.

Example 3: Average speed

You drive 60 miles at 30 mph and then 60 miles at 60 mph. The average speed is not 45 mph. The first leg took 2 hours and the second 1 hour, so:

Average speed = total distance ÷ total time = 120 ÷ 3 = 40 mph

The speeds must be weighted by time, not distance, because you spent twice as long at 30 mph. Whenever you average rates, ask what the rate is “per”: average speed (miles per hour) is weighted by hours.

Example 4: Averaging percentages

Class A has 30 students and an 80% pass rate. Class B has 10 students and a 60% pass rate. The combined pass rate weights each rate by class size:

(30 × 0.80 + 10 × 0.60) ÷ (30 + 10) = (24 + 6) ÷ 40 = 75%

The unweighted average, 70%, would be correct only if both classes were the same size. The average percentage calculator handles this case directly.

Where weighted averages appear

Use Values Weights
GPA Grade points Credit hours
Course grade Category averages Category percentages
Portfolio return Each asset’s return Share of money invested
Inventory cost Purchase prices Units bought
Consumer price indexes Price changes Share of household spending
Survey results Group responses Population share of each group

A portfolio that is 60% stocks returning 8% and 40% bonds returning 3% returned 0.6 × 8 + 0.4 × 3 = 6% overall. For the most common academic case, see how to calculate GPA, or use the GPA calculator.

Weighted averages in a spreadsheet

With values in B2:B5 and weights in C2:C5:

=SUMPRODUCT(B2:B5,C2:C5)/SUM(C2:C5)

SUMPRODUCT multiplies each pair and adds the results; dividing by SUM handles weights of any size. This one formula covers every example in this guide.

Sanity-checking the result

Two quick checks catch most errors:

  • It must fall between the smallest and largest values. A weighted average of 92, 78 and 85 can never be 41.8 or 104. If it is, a weight or a division is wrong.
  • It leans toward the heaviest weights. In the inventory example, most units cost $3.90, so the average of $4.05 should sit closer to $3.90 than to $4.50, and it does.

Also check what happens when every weight is equal. The formula should then give the same answer as an ordinary average, which is a good test of a spreadsheet before you trust it with real weights.

Common mistakes

  • Dividing by the number of items instead of the sum of the weights.
  • Using percentages that don’t add to 100% without dividing by their actual total.
  • Averaging rates or percentages directly when the underlying groups or times differ in size.
  • Mixing weight units, such as percentages for some categories and points for others.

A weighted average is still an average, so the cautions in mean vs median vs mode about outliers apply too. For an unweighted average, use the mean calculator; for anything else, the weighted average calculator takes values and weights in any units.

Frequently asked questions

What is the formula for a weighted average?

Weighted average = Σ(value × weight) ÷ Σ(weight). Multiply each value by its weight, add up the products, and divide by the total of the weights. If the weights are percentages that add to 100%, dividing by 1 (or 100%) leaves the sum of the products.

How is a weighted average different from a regular average?

A regular (arithmetic) average gives every value the same importance. A weighted average lets some values count more than others. A regular average is just a weighted average where every weight is equal.

What if my weights don't add up to 100%?

Divide by the actual sum of the weights instead of 100%. This is common partway through a course: if only homework (20%) and quizzes (30%) are graded so far, divide the weighted sum by 0.5 to get your current average.

How do I calculate a weighted average in Excel?

Use SUMPRODUCT divided by SUM: =SUMPRODUCT(B2:B5,C2:C5)/SUM(C2:C5), with values in column B and weights in column C. This works whether the weights are percentages, credit hours or quantities.

Can I average percentages by just averaging them?

Only if they are based on groups of the same size. Otherwise weight each percentage by its group size. If 80% of 30 students and 60% of 10 students pass, the overall pass rate is 30 of 40, or 75%, not 70%.