Counting & Probability

Weighted Average: How to Calculate It and When to Use It

A weighted average multiplies each value by its weight, adds those products, and divides by the sum of the weights: xˉw=∑wixi∑wi\bar{x}_w=\dfrac{\sum w_i x_i}{\sum w_i}. The result always lands between the smallest and largest value, pulled toward whichever value carries the most weight.

xˉw=∑i=1nwixi∑i=1nwi\bar{x}_w = \frac{\sum_{i=1}^{n} w_i x_i}{\sum_{i=1}^{n} w_i}

The ordinary mean quietly gives every number an equal vote. Course grades, GPAs, combined class averages, average prices and average speeds all break that assumption, and this page covers how to handle each of them, plus the traps that cost the most points.

What is the weighted average formula?

xˉw=w1x1+w2x2+⋯+wnxnw1+w2+⋯+wn\bar{x}_w=\frac{w_1x_1+w_2x_2+\cdots+w_nx_n}{w_1+w_2+\cdots+w_n}

Here xix_i are the values and wiw_i are their weights. The numerator is the weighted total, the denominator is the total weight, and the quotient is the average.

The formula has one clean origin: a weight is a count in disguise. Suppose three students scored 9090 and one scored 7070. Averaging all four scores gives 90+90+90+704=3(90)+1(70)3+1=85,\frac{90+90+90+70}{4}=\frac{3(90)+1(70)}{3+1}=85, which is the formula with weights 33 and 11. Percentages, credit hours and dollars invested work the same way, with the repetition made fractional.

A second picture helps for mental checks. Put the values on a number line and treat the weights as masses. The weighted average is the balance point of that seesaw, so it sits closer to the heavy values. If a result lands outside the range of the values, or on the wrong side of the heavy one, something went wrong.

Quick check

The values 1010 and 2020 have weights 33 and 11. Without calculating, will the weighted average be above or below 1515? Then find it.

How to calculate a weighted average step by step

The procedure is the same every time:

  1. Multiply each value by its weight.
  2. Add those products to get the weighted total.
  3. Add the weights to get the total weight.
  4. Divide the weighted total by the total weight.

Example 1. A course counts homework for 15%15\%, quizzes for 25%25\%, the midterm for 25%25\% and the final for 35%35\%. The scores are 9595, 8080, 7070 and 8888.

Part Score Weight Product
Homework 95 0.15 14.25
Quizzes 80 0.25 20
Midterm 70 0.25 17.5
Final 88 0.35 30.8

14.25+20+17.5+30.8=82.5514.25+20+17.5+30.8=82.55

The weights add to 11, so the weighted average is 82.5582.55. The plain mean of the four scores is 3334=83.25\frac{333}{4}=83.25, which overstates the grade because it gives the weak midterm the same say as the heavy final in the wrong direction. The gap grows whenever the heavily weighted category is also your weakest.

Do weights in a weighted average have to add up to 1?

No. Only the ratios between weights matter, provided you divide by their total. Weights of 22, 33 and 55 behave exactly like 0.20.2, 0.30.3 and 0.50.5. Percent weights simply happen to sum to 11, so the denominator equals 11 and disappears, which is why some textbooks drop it and why students forget it when the weights are counts.

Take scores 6060, 7070, 8080 with weights 11, 22, 33 (later work counts more): 1(60)+2(70)+3(80)1+2+3=4406≈73.3\frac{1(60)+2(70)+3(80)}{1+2+3}=\frac{440}{6}\approx 73.3 Weights that run 1,2,3,…,n1,2,3,\dots,n always total n(n+1)2\frac{n(n+1)}{2}, a fact that comes straight from the arithmetic series formula. GPA is the same calculation: grade points are the values and credit hours are the weights, so 44 credits of A and 33 credits of B give 4(4)+3(3)7=257≈3.57\frac{4(4)+3(3)}{7}=\frac{25}{7}\approx 3.57.

The between check

A weighted average must fall between the smallest and largest value. If 4403≈146.7\frac{440}{3}\approx 146.7 appears for scores that top out at 8080, the wrong denominator was used.

There is also a faster hand method. Subtract a convenient base from every value, average the small deviations, then add the base back. For scores 7070, 8080, 9090 with weights 22, 33, 55, use base 7070: 70+2(0)+3(10)+5(20)10=70+13=83.70+\frac{2(0)+3(10)+5(20)}{10}=70+13=83. Smaller numbers mean fewer arithmetic slips.

Why can you not just average two averages?

Seesaw number line showing a combined class average of 74 instead of 80
A class with four times the students pulls the combined average four times as hard, landing at 74 instead of 80.

Because an average hides the size of its group. Multiplying an average by its count recovers that group’s total, and totals are what must be combined.

Example 2. Class A has 1010 students averaging 9090. Class B has 4040 students averaging 7070. The tempting answer is 90+702=80\frac{90+70}{2}=80, but the correct combined average is 10(90)+40(70)10+40=900+280050=370050=74.\frac{10(90)+40(70)}{10+40}=\frac{900+2800}{50}=\frac{3700}{50}=74. Class B has four times as many students, so it pulls the result four times as hard.

The same rule explains Simpson’s paradox. Suppose Treatment A succeeds in 8181 of 8787 easy cases (about 93%93\%) and 192192 of 263263 hard cases (about 73%73\%). Treatment B succeeds in 234234 of 270270 easy cases (about 87%87\%) and 5555 of 8080 hard cases (about 69%69\%). A wins in both groups, yet overall A scores 273350=78%\frac{273}{350}=78\% while B scores 289350≈82.6%\frac{289}{350}\approx 82.6\%. An overall rate in basic probability terms is a weighted average of the group rates, and A’s weights sit mostly on the hard cases. Whenever a trend flips after combining groups, compare the weights first.

How to find the score you need on the final exam

Reverse the formula. Everything known goes on one side, and the unknown score is isolated.

Example 3. Your average is 8282 on the part of the course worth 70%70\%. The final is worth 30%30\%. To finish with 8585: 0.70(82)+0.30x=850.70(82)+0.30x=85 57.4+0.30x=8557.4+0.30x=85 0.30x=27.60.30x=27.6 x=92x=92 Check: 0.30(92)=27.60.30(92)=27.6 and 57.4+27.6=8557.4+27.6=85.

A faster route avoids the equation. The target is 33 points above your current 8282, and the final carries only 30%30\% of the grade, so it must be 30.30=10\frac{3}{0.30}=10 points above 8282. In general, the needed score equals your current average plus the gap to the target divided by the final’s weight. The same reasoning shows when a goal is out of reach: for a target of 9090, the final would need 82+80.30≈108.782+\frac{8}{0.30}\approx 108.7, which is impossible without extra credit.

Try this: Keep the 8282 average on 70%70\% of the course. Find the final score needed for an overall 8080, then find the highest overall grade possible with a perfect 100100 on the final. (Answers: about 75.375.3 and 87.487.4.)

With several unknown categories, the method is unchanged: subtract all known weighted pieces from the target, then divide by the weight of the unknown.

Quick check

Five equally weighted quizzes average 8282. What must a sixth quiz score to raise the average to 8484?

Which quantity should be the weight in average speed?

The weight must be the quantity sitting under the rate. Speed is distance per time, so speeds are weighted by time, not by distance. Getting this wrong is the classic error with rates.

A driver covers 3030 miles at 6060 mph, then another 3030 miles at 4040 mph. The plain mean says 5050 mph. The slow leg takes longer (0.750.75 hours against 0.50.5), so it deserves more weight: 60(0.5)+40(0.75)0.5+0.75=30+301.25=48.\frac{60(0.5)+40(0.75)}{0.5+0.75}=\frac{30+30}{1.25}=48. Total distance over total time confirms it: 601.25=48\frac{60}{1.25}=48 mph. When the distances are equal, the answer is the harmonic mean, 2160+140=48\frac{2}{\frac1{60}+\frac1{40}}=48.

The same logic applies to price per kilogram (weight by kilograms), miles per gallon (weight by gallons) and test-score percentages (weight by number of questions).

Total over total

When a rate is one total divided by another, the correct average is all the topsall the bottoms\frac{\text{all the tops}}{\text{all the bottoms}}. A weighted average is this idea written in pieces.

Expected value is a weighted average whose weights are probabilities. Because the probabilities sum to 11, the denominator vanishes and E=∑pixiE=\sum p_i x_i.

Counting gives the weights directly. For the number of heads in three coin flips there are 2⋅2⋅2=82\cdot2\cdot2=8 equally likely outcomes, a result of the fundamental counting principle. The number of outcomes with kk heads is (3k)\binom{3}{k} from combinations, namely 1,3,3,11,3,3,1. So 0(1)+1(3)+2(3)+3(1)8=128=1.5.\frac{0(1)+1(3)+2(3)+3(1)}{8}=\frac{12}{8}=1.5. The counts serve as weights, and dividing by their total, 88, turns them into probabilities.

Weighted average in geometry: dividing a segment

A point partway along a segment is a weighted average of its endpoints. The point a fraction tt of the way from AA to BB is P=(1−t)A+tB,P=(1-t)A+tB, applied separately to each coordinate. With A(2,1)A(2,1), B(10,9)B(10,9) and t=14t=\frac14: x=0.75(2)+0.25(10)=4,y=0.75(1)+0.25(9)=3,x=0.75(2)+0.25(10)=4,\qquad y=0.75(1)+0.25(9)=3, so P=(4,3)P=(4,3). The midpoint is t=12t=\frac12, and the centroid of a triangle is the plain average of its three vertices.

For a line, the expression a+t(b−a)a+t(b-a) is linear in tt, with the shape of slope-intercept form: intercept aa, slope b−ab-a. That is why estimating a value between two data points (linear interpolation) uses the same formula, and why point-slope form and weighted averaging are two descriptions of one straight-line idea.

Mixtures follow the seesaw rule: the amounts are in inverse proportion to the distances from the target. To make a 42%42\% solution from 30%30\% and 50%50\% solutions, the distances are 1212 and 88, so the amounts are in ratio 8:12=2:38:12=2:3. Check: 2(30)+3(50)5=2105=42\frac{2(30)+3(50)}{5}=\frac{210}{5}=42.

Quick check

Find the point 34\frac{3}{4} of the way from A(1,2)A(1,2) to B(9,10)B(9,10).

When does a weighted average mislead?

The formula is only as sound as its weights and its assumptions. These limits come up most:

  • Negative weights break the “between the values” guarantee, and weights summing to 00 make the division undefined.
  • A large weight on one unusual value lets a single outlier dominate the result.
  • Growth rates compound, so they need a geometric mean. A +50%+50\% year followed by a −50%-50\% year averages 0%0\% arithmetically, but 1.5×0.5=0.751.5\times0.5=0.75 is a real loss. The per-year factor is 0.75≈0.866\sqrt{0.75}\approx0.866, and logarithm rules explain why: a geometric mean is an ordinary average of logarithms.
  • The average says nothing about spread. Scores of 80,8080,80 and 60,10060,100 share a mean of 8080, which is why standard deviation is reported alongside it, and it can be weighted too.

Finally, weights chosen by feel are opinions dressed as arithmetic. When a formula looks surprising, ask what each weight represents and whether it matches the question.

Practice problems

0 of 5 solved

  1. A quiz score of 7272 counts for 25%25\% of a grade and a project score of 8888 counts for 75%75\%. What is the weighted average?

  2. A shop sells 66 items at 22 dollars each, 33 items at 44 dollars each and 11 item at 1010 dollars. What is the weighted average price per item?

  3. Class A has 1212 students with an average of 8585. Class B has 1818 students with an average of 7575. What is the combined average?

  4. Your average is 7878 on the part of a course worth 60%60\% of the grade. The final exam is worth the other 40%40\%. What must you score on the final to finish with 8585 overall?

  5. How many liters of a 20%20\% solution must be mixed with a 60%60\% solution to make 1010 liters of a 36%36\% solution?

Common questions

What is the formula for a weighted average?

Multiply each value by its weight, add the products, then divide by the sum of the weights: ∑wixi∑wi\frac{\sum w_i x_i}{\sum w_i}. When the weights are percentages that add to 100%100\%, the division can be skipped.

What is the difference between a weighted average and a simple average?

A simple average gives every value the same influence. A weighted average lets some values count more, so it is the right tool when groups have different sizes or categories have different importance.

Do the weights have to add up to 100 percent?

No. Only the ratios between weights matter, as long as you divide by their total. Weights of 22, 33 and 55 give the same result as 20%20\%, 30%30\% and 50%50\%.

How do you calculate a weighted average in Excel or Google Sheets?

In Excel, use SUMPRODUCT(values, weights)/SUM(weights). Google Sheets has the same approach and also offers an AVERAGE.WEIGHTED function.

How do you find a weighted average of percentages?

Weight each percentage by the size of the group it came from, such as the number of students or dollars. Averaging the percentages directly only works when every group has the same size.

Can a weighted average be higher than every value?

No, not with non-negative weights. The result always lies between the smallest and largest value, which makes a quick and reliable check on your answer.

Up next