How to Calculate Average: Mean, Median, Mode, Weighted

How to Calculate Average: Mean, Median, Mode, Weighted

Most of the time, “average” means the mean: add all the numbers and divide by how many there are. But the mean is only one kind of average. The median is the middle value when the numbers are sorted, and the mode is the value that appears most often. On uneven data, the three disagree, and picking the wrong one gives a misleading answer.

This page shows how to calculate all three, plus the weighted average for numbers that do not count equally, with a worked set you can follow line by line.

Mean: add them up, divide by the count

The mean is the arithmetic average:

Mean = Sum of all values ÷ Number of values

Worked example: 6, 9, 11, 14, 20. Add them: 6 + 9 + 11 + 14 + 20 = 60. Count them: 5. Divide: 60 ÷ 5 = 12. The mean is 12.

The mean uses every value. That is its strength and its weakness. One extreme number pulls it. Take the salaries, in thousands, of six people: 38, 42, 45, 47, 52, 210. The sum is 38 + 42 + 45 + 47 + 52 + 210 = 434. The mean is 434 ÷ 6 = 72.33, or about $72,300. Five of the six earn under $53,000, but the mean says $72,300. The mean is technically correct and practically misleading here, which is why the median exists.

Median: the middle value when sorted

To find the median, sort the numbers smallest to largest, then take the middle one. With an odd count, the middle value is the median. With an even count, the median is the mean of the two middle values.

Worked example, odd count: 6, 9, 11, 14, 20. Already sorted. With 5 values, the middle one is the 3rd: 11. The median is 11. Notice the mean was 12 and the median is 11. The 20 at the top end pulled the mean up; the median ignored it.

Worked example, even count: 8, 12, 15, 19, 23, 27. Sorted already. With 6 values, the two middle values are the 3rd and 4th: 15 and 19. Median = (15 + 19) ÷ 2 = 34 ÷ 2 = 17. The mean of the same set is (8 + 12 + 15 + 19 + 23 + 27) ÷ 6 = 104 ÷ 6 = 17.33. Here the mean and median nearly agree, because the set is fairly even.

Back to the salary set: 38, 42, 45, 47, 52, 210. Sorted already. Even count, so the two middle values are 45 and 47. Median = (45 + 47) ÷ 2 = 92 ÷ 2 = 46, or $46,000. That describes the group far better than the mean’s $72,300. That is why house prices and salaries are usually reported as medians.

Sorting first is not optional. The median of 14, 6, 20, 9, 11 is still 11, but only because sorting puts 11 in the middle. Take the middle of the unsorted list and you get 20, which is wrong.

Mode: the most common value

The mode is the value that appears most often. It is the only average that works on categories as well as numbers: shoe sizes, survey answers, most-picked options.

Worked example: 4, 7, 7, 9, 12, 12, 12, 15. Count appearances: 4 appears once, 7 twice, 9 once, 12 three times, 15 once. The mode is 12.

The same set gives a full picture. Mean: (4 + 7 + 7 + 9 + 12 + 12 + 12 + 15) ÷ 8 = 78 ÷ 8 = 9.75. Median: even count, two middle values are the 4th and 5th — 9 and 12 — so (9 + 12) ÷ 2 = 10.5. Mode: 12. Three averages, three answers: 9.75, 10.5, 12.

A set can have no mode, one mode, or several. If every value appears exactly once, there is no mode. If two values tie for the highest count, both are modes, and the set is bimodal. For 3, 6, 6, 9, 9, 11, the modes are 6 and 9. Neither is “the” mode alone.

Weighted average: when values do not count equally

A weighted average gives some values more influence than others. Each value is multiplied by its weight, the products are added, and the total is divided by the sum of the weights:

Weighted average = Sum of (value × weight) ÷ Sum of weights

Worked example: a course grade. Homework scores 88 and counts 20%. A test scores 76 and counts 50%. A project scores 94 and counts 30%. Using the weights as decimals: 88 × 0.20 = 17.6; 76 × 0.50 = 38; 94 × 0.30 = 28.2. Add the products: 17.6 + 38 + 28.2 = 83.8. The weights sum to 0.20 + 0.50 + 0.30 = 1.00, so no final division is needed — dividing by 1.00 changes nothing. The weighted average is 83.8.

Compare with the plain mean of the three scores: (88 + 76 + 94) ÷ 3 = 258 ÷ 3 = 86. The plain mean overstates the grade, because it gives the 88 homework the same weight as the 76 test. The test counted for half the grade, so it should pull harder. Whenever weights differ, the plain mean is the wrong tool.

If the weights do not sum to 1, divide by their sum. Scores 90 (weight 2), 80 (weight 3), and 70 (weight 5): (90 × 2) + (80 × 3) + (70 × 5) = 180 + 240 + 350 = 770. Sum of weights: 2 + 3 + 5 = 10. Weighted average: 770 ÷ 10 = 77.

The same formula covers “average marks” questions where subjects carry different credit hours, and GPA calculations where courses carry different credits. The GPA Calculator runs the same weighted maths on grades by credit hours.

Which average should you use?

Use the mean when your numbers are fairly even and no single value dominates. Test scores in a class, daily temperatures across a mild week, and repeated measurements of the same thing are mean territory.

Use the median when a few very large or very small values would drag the mean off centre. Income, house prices, and anything with outliers are median territory. If the mean and median disagree by a lot, the data is skewed, and the median usually tells the truer story.

Use the mode when you want the most typical value, especially for categories. Shoe sizes, survey answers, and most-common choices are mode cases. The mode is the only average that works when the data is not numeric at all.

Use the weighted average when values count unequally: grades with different weights, prices with different quantities, averages of averages from groups of different sizes. A plain mean of group means, where the groups differ in size, is a classic error — weight by group size instead.

Mean vs median vs mode at a glance

AverageHow to find itBest whenWeakness
MeanSum ÷ countData is fairly evenOutliers pull it
MedianMiddle of sorted dataData is skewed, or has outliersIgnores how far values sit from the middle
ModeMost frequent valueCategories, most typical valueMay not exist, or there may be several
Weighted meanSum of (value × weight) ÷ sum of weightsValues count unequallyNeeds correct weights

Where it usually goes wrong

Taking the median without sorting. The middle of an unsorted list is not the median. Sort first, every time.

Using the mean on skewed data. One billionaire in a survey of ten people wrecks the mean but barely moves the median. If the mean and median disagree sharply, report the median.

Averaging averages without weighting. Two classes average 80 and 90. If the first class has 10 students and the second has 30, the overall average is not (80 + 90) ÷ 2 = 85. It is (80 × 10 + 90 × 30) ÷ 40 = (800 + 2,700) ÷ 40 = 3,500 ÷ 40 = 87.5. Weight by group size.

Forgetting weights must sum correctly. In the grade example, weights of 20%, 50%, and 30% sum to 100%, so dividing by 1.00 was invisible. If weights sum to something else, divide by their sum, or the answer is scaled wrong.

Calling the range an average. The range (largest minus smallest) describes spread, not centre. For 6, 9, 11, 14, 20, the range is 20 − 6 = 14. That tells you how spread out the numbers are, not where their centre is.

Three to try yourself

Work these out before reading the answers below.

  1. Find the mean, median, and mode of 5, 8, 12, 12, 18.
  2. A course has a midterm worth 40% (score 90) and a final worth 60% (score 70). What is the weighted average?
  3. Two groups average 60 and 84. The first group has 25 people, the second has 15. What is the combined average?

Answers: 1. Mean: (5 + 8 + 12 + 12 + 18) ÷ 5 = 55 ÷ 5 = 11. Median: sorted already, middle value (3rd) = 12. Mode: 12 (appears twice). 2. 90 × 0.40 = 36; 70 × 0.60 = 42; 36 + 42 = 78. 3. (60 × 25 + 84 × 15) ÷ 40 = (1,500 + 1,260) ÷ 40 = 2,760 ÷ 40 = 69.

Questions people ask

How do I calculate the average?

Add all the numbers and divide by how many there are. That gives the mean. For 6, 9, 11, 14, 20: 60 ÷ 5 = 12. If the data has outliers, the median (middle of the sorted list) may describe it better.

What is the difference between mean, median, and mode?

The mean is the sum divided by the count. The median is the middle value when the numbers are sorted. The mode is the most frequent value. On the set 4, 7, 7, 9, 12, 12, 12, 15, they are 9.75, 10.5, and 12.

How do I calculate a weighted average?

Multiply each value by its weight, add the products, and divide by the sum of the weights. For scores 88 (20%), 76 (50%), 94 (30%): 17.6 + 38 + 28.2 = 83.8.

How do I calculate average marks?

If all subjects count equally, add the marks and divide by the number of subjects. If subjects carry different weights or credits, use the weighted average: multiply each mark by its weight, add, and divide by the total weight.

When should I use median instead of mean?

Use the median when the data has outliers, a few very high or very low values. Income and house prices are the usual examples: one extreme value wrecks the mean but barely moves the median.


To skip the arithmetic, try it in the Average Calculator. If the numbers are grades with different credit hours, the GPA Calculator runs the weighted version.

By Lucas Meyer
CalcKits calculators show the formula with every result.