How to find the weighted mean (with GPA example)

By Jude Wallis · Published

Multiply each value by its weight, add the products, then divide by the sum of the weights. Use a weighted mean whenever the values do not deserve equal say: groups of different sizes, course credits in a GPA, or category percentages in a course grade.

AP Statistics: Unit 1 (topics 1.7 Summary Statistics for One Quantitative Variable, 2.9 Parameters of Random Variables). The Fall 2026 AP Statistics course does not teach the weighted mean as its own topic, but it uses one in two places: computing a mean from a frequency table in Unit 1 topic 1.7, and finding the mean of a discrete random variable as a probability-weighted sum in Unit 2 topic 2.9.

The weighted mean formula

A weighted mean lets some values count more than others.

xˉw=wixiwi\bar{x}_w = \frac{\sum w_i x_i}{\sum w_i}

Read xˉw\bar{x}_w as "weighted x-bar". Each value xix_i carries a weight wiw_i that says how much say it gets. Multiply each value by its weight, add up those products, then divide by the total weight.

The ordinary mean is the special case where every weight is the same. Set every wi=1w_i = 1 and the numerator becomes xi\sum x_i while the denominator becomes nn, which is exactly xˉ=xin\bar{x} = \frac{\sum x_i}{n}. So a weighted mean is not a different kind of average, it is the general version, and the plain mean is what you get when the values genuinely deserve equal say.

Weights can be counts (30 students), credits (4 credit hours), percentages (0.50 of the grade), or probabilities (0.35 chance). The formula does not care. If the weights already add to 1, the denominator is 1 and you can skip the division.

When the plain mean is the wrong answer

Three situations show up constantly.

  • Groups of different sizes. You know each group's mean and each group's size, and you want the mean of everyone combined. Averaging the group means treats a class of 10 as equal in weight to a class of 30, and it is not.
  • Items of different importance. A syllabus that says tests are 50 percent of the grade and homework is 15 percent is handing you weights directly.
  • A value repeated many times. A frequency table where the value 2 appears 7 times is the same problem: the counts are the weights.

The common thread is the phrase "a mean of means". Whenever you are tempted to average numbers that are themselves already averages, stop and ask how many observations sit behind each one. If the answer is not "the same number for every group," the plain average is wrong. The situation you can rely on is all the groups being exactly the same size: with two sections of 20 each, the weighted mean and the plain average of the two means agree.

Why averaging two group means gives the wrong answer

Here is the failure with real numbers. Section A has 30 students with a mean test score of 82. Section B has 10 students with a mean of 92. What is the mean score for all 40 students?

The tempting move is 82+922=87\frac{82 + 92}{2} = 87. That is wrong, and you can see why by rebuilding the totals. Section A's 30 students scored 30×82=246030 \times 82 = 2460 points in total. Section B's 10 students scored 10×92=92010 \times 92 = 920 points. All 40 students together scored 2460+920=33802460 + 920 = 3380 points, so the combined mean is

xˉw=338040=84.5\bar{x}_w = \frac{3380}{40} = 84.5

The correct answer is 84.5, not 87. The plain average is off by 2.5 points, and it is off in a predictable direction: it inflates the result by giving the small, high-scoring section the same say as a section three times its size.

Notice that the weighted mean here is just the total of everything divided by the count of everything. That is the sanity check to fall back on. If you can reconstruct the grand total and the grand count, you never need the formula at all. And notice where 84.5 lands: closer to 82 than to 92, because most of the students are in Section A. A weighted mean with non-negative weights always falls between the smallest and largest value being averaged, pulled toward whichever carries more weight.

GPA and course grades: weights you are handed

A grade point average is a weighted mean with credit hours as the weights. Suppose a student earns 4.0 in a 4-credit calculus course, 3.0 in a 3-credit statistics course, 3.7 in a 3-credit history course, and 2.0 in a 1-credit PE course.

Multiply each grade point by its credits: 4×4.0=164 \times 4.0 = 16, 3×3.0=93 \times 3.0 = 9, 3×3.7=11.13 \times 3.7 = 11.1, and 1×2.0=21 \times 2.0 = 2. The products add to 38.1 and the credits add to 11, so the GPA is 38.1/11=3.463638.1 / 11 = 3.4636, which reports as 3.46.

Averaging the four grades without weights gives 4.0+3.0+3.7+2.04=12.74=3.175\frac{4.0 + 3.0 + 3.7 + 2.0}{4} = \frac{12.7}{4} = 3.175. That is nearly three tenths of a point lower, because it lets the 1-credit PE grade of 2.0 count as much as the 4-credit calculus grade of 4.0.

Course grade weights work the same way but usually add to 1 already. If tests are 50 percent, quizzes 20 percent, homework 15 percent, and the final 15 percent, and a student earns 88, 92, 100, and 79, then the grade is 0.50(88)+0.20(92)+0.15(100)+0.15(79)=44+18.4+15+11.85=89.250.50(88) + 0.20(92) + 0.15(100) + 0.15(79) = 44 + 18.4 + 15 + 11.85 = 89.25. The weights sum to 1, so there is nothing to divide by. The unweighted average of the same four scores is 359/4=89.75359/4 = 89.75, half a point higher, and it is worth seeing where that half point comes from, because the obvious answer is wrong. The perfect homework score is not the culprit. Dropping to equal weights promotes the 100 and the 79 by the same 10 percentage points each, and since they sit on opposite sides of 89.25 their effects very nearly cancel: together they account for only 0.05 of the 0.50 gap. Most of the gap is the test score of 88, which sits below the weighted average and has its say cut from 50 percent of the grade to 25 percent.

Frequency tables and expected value are weighted means

Two things you already do are weighted means wearing different clothes.

A frequency table. Suppose 20 households report the number of cars they own: four households with 1, seven with 2, five with 3, three with 4, and one with 5. The mean is not 1+2+3+4+55=3\frac{1+2+3+4+5}{5} = 3. The counts are weights, so

xˉ=4(1)+7(2)+5(3)+3(4)+1(5)4+7+5+3+1=4+14+15+12+520=5020=2.5\bar{x} = \frac{4(1) + 7(2) + 5(3) + 3(4) + 1(5)}{4 + 7 + 5 + 3 + 1} = \frac{4 + 14 + 15 + 12 + 5}{20} = \frac{50}{20} = 2.5

The answer is 2.5 cars, not 3. Reading the same idea from proportions instead of counts is relative frequency, and the running-total version of it is cumulative relative frequency. The distinction between a count and a proportion is covered in frequency vs relative frequency.

Expected value. The mean of a discrete random variable is μX=xiP(xi)\mu_X = \sum x_i P(x_i), which is a weighted mean whose weights are probabilities. Those weights already add to 1, so again there is no division. That is why the AP course can call the expected value the long-run mean without any new machinery. See how to find expected value and is expected value the same as the mean.

Mistakes to avoid

  • Averaging averages. The single most common error. Averaging two group means directly can only be relied on when the groups are the same size.
  • Dividing by the number of values instead of the total weight. In the GPA example the denominator is 11 credits, not 4 courses.
  • Forgetting to check that percentage weights add to 100. If they do not, you either missed a category or the denominator is not 1.
  • Weighting by the wrong quantity. For a combined mean, the weights are the sample sizes, not the standard deviations and not the number of groups.
  • Assuming a weighted mean also fixes the spread. It does not. You cannot combine two group standard deviations by averaging them either, and rebuilding a combined standard deviation needs the original data or the sum of squares. A weighted mean tells you nothing about shape, so pair it with a look at the distribution: see how to describe the shape of a distribution.
  • Reporting a weighted mean without units or context. "The combined mean was 84.5 points on the 100-point test" earns credit; "84.5" does not.

Combine two class sections into one mean

Section A has 30 students with a mean score of 82. Section B has 10 students with a mean of 92. Find the mean score for all 40 students, and state how far off the plain average of the two means would be.

  1. Identify the weights. The weights are the sample sizes: wA=30w_A = 30 and wB=10w_B = 10.

  2. Rebuild each section's total. Section A: 30×82=246030 \times 82 = 2460 points. Section B: 10×92=92010 \times 92 = 920 points.

  3. Add the totals: 2460+920=33802460 + 920 = 3380 points for all students.

  4. Add the weights: 30+10=4030 + 10 = 40 students.

  5. Divide: xˉw=3380/40=84.5\bar{x}_w = 3380 / 40 = 84.5 points.

  6. Compare with the unweighted average: 82+922=87\frac{82 + 92}{2} = 87 points.

  7. Find the error: 8784.5=2.587 - 84.5 = 2.5 points too high.

The combined mean is 84.5 points. Averaging the two section means gives 87, which is 2.5 points too high because it gives the 10-student section the same weight as the 30-student section. The correct value sits closer to 82 because most students are in Section A.

Compute a GPA from credit hours

A student earns 4.0 in a 4-credit course, 3.0 in a 3-credit course, 3.7 in a 3-credit course, and 2.0 in a 1-credit course. Find the GPA, then compare it with the unweighted average of the four grades.

  1. The weights are the credit hours: 4, 3, 3, and 1.

  2. Multiply each grade by its credits: 4×4.0=164 \times 4.0 = 16, 3×3.0=93 \times 3.0 = 9, 3×3.7=11.13 \times 3.7 = 11.1, 1×2.0=21 \times 2.0 = 2.

  3. Add the products: 16+9+11.1+2=38.116 + 9 + 11.1 + 2 = 38.1 quality points.

  4. Add the weights: 4+3+3+1=114 + 3 + 3 + 1 = 11 credit hours.

  5. Divide: xˉw=38.1/11=3.4636\bar{x}_w = 38.1 / 11 = 3.4636, which reports as a 3.46 GPA.

  6. Now average the grades with no weights: (4.0+3.0+3.7+2.0)/4=12.7/4=3.175(4.0 + 3.0 + 3.7 + 2.0)/4 = 12.7/4 = 3.175.

  7. Compare: 3.46363.175=0.28863.4636 - 3.175 = 0.2886, so ignoring credits would understate the GPA by about 0.29.

The GPA is 38.1/11=3.463638.1 / 11 = 3.4636, reported as 3.46. The unweighted average of the four grades is 3.175, about 0.29 lower, because it lets the 1-credit grade of 2.0 count as heavily as the 4-credit grade of 4.0.

Frequently asked questions

When can you just average two group means?

Only when the groups are the same size, or in the degenerate case where the two means happen to be equal, in which case the sizes cannot matter. With two sections of 20 students each and means of 82 and 92, both the weighted mean and the plain average give 87. Change the sizes to 30 and 10 and the weighted mean drops to 84.5 while the plain average still says 87.

What do you divide by in a weighted mean?

By the sum of the weights, not the number of values. A GPA with credits 4, 3, 3, and 1 is divided by 11, not by 4. When the weights are percentages or probabilities that already add to 1, the denominator is 1 and the division does nothing.

Is expected value a weighted mean?

Yes. The mean of a discrete random variable, μX=xiP(xi)\mu_X = \sum x_i P(x_i), weights each value by its probability. Because probabilities add to 1, there is no visible denominator, which is what makes the formula look different from the general weighted mean.

Can a weighted mean fall outside the range of the values?

No, as long as the weights are not negative. A weighted mean is always at least the smallest value and at most the largest, and it sits closer to whichever values carry more weight. If your answer falls outside that range, you have an arithmetic error.

How do you find the mean from a frequency table?

Multiply each value by its frequency, add the products, and divide by the total frequency. For four households with 1 car, seven with 2, five with 3, three with 4, and one with 5, the mean is 50/20=2.550/20 = 2.5 cars, not the 3 you get by averaging the five distinct values.