How to Find Mean, Median and Mode (Step by Step With Examples)

Notebook with sorted number cards, a bar chart showing the mode, a calculator reading 14 and a stopwatch on a desk

To find the mean, median and mode of a data set, first sort the numbers from smallest to largest. The mean is the sum divided by the count. The median is the middle value, or the average of the two middle values when the count is even. The mode is the value that appears most often.

Those three numbers are the classic measures of central tendency, and each one answers the question “what is a typical value?” in a slightly different way. Most of the time they land close together. When they do not, the gap between them tells you something useful about your data, usually that a few unusual values are pulling the average around.

This guide walks through one small data set from start to finish, then covers even counts, the range, skewed data such as incomes, weighted averages and the mistakes that cost students marks. If you want to check your own numbers as you go, paste them into our mean, median, mode and range calculator, which shows each step.

The data set we will use

Say you timed your commute every workday for nine days and wrote down the minutes:

14, 9, 17, 12, 20, 12, 16, 11, 15

Before you calculate anything, put the values in order. This one habit prevents most median and mode errors, because both depend on position and repetition, and those are much easier to see in a sorted list:

9, 11, 12, 12, 14, 15, 16, 17, 20

There are nine values (n = 9). Keep that count handy, because the mean and the median both use it.

How to find the mean

The mean is what most people call the average. Add every value, then divide by how many values there are. In symbols, mean = Σx ÷ n, where Σx means “the sum of all the x values”.

  1. Add the values: 9 + 11 + 12 + 12 + 14 + 15 + 16 + 17 + 20 = 126.
  2. Count the values: n = 9.
  3. Divide: 126 ÷ 9 = 14.

Your mean commute is 14 minutes. One way to picture it: if every trip had taken exactly the same time, and the total stayed at 126 minutes, each trip would have taken 14 minutes. The mean is the “fair share” value.

Because the mean uses every number, it reacts to every number. Change the 20 to a 47 (a day with a road closure) and the sum becomes 153, so the mean jumps to 17. One bad day moved the “typical” commute by three minutes. Our mean calculator handles long lists if you have more than a handful of values.

How to find the median

The median is the middle value of the sorted list. Half the values sit at or below it and half sit at or above it.

Odd number of values

With an odd count, there is a single middle value. Its position is (n + 1) ÷ 2. For nine values that is (9 + 1) ÷ 2 = 5, so the median is the 5th value in the sorted list:

9, 11, 12, 12, 14, 15, 16, 17, 20

The median is 14 minutes. Here it happens to equal the mean, which is a sign the data are fairly balanced around the centre.

Even number of values

Now add a tenth day where traffic was slow and the trip took 22 minutes. The sorted list becomes:

9, 11, 12, 12, 14, 15, 16, 17, 20, 22

With ten values there is no single middle. The position formula gives (10 + 1) ÷ 2 = 5.5, which means “halfway between the 5th and 6th values”. Average those two: (14 + 15) ÷ 2 = 14.5. The median is 14.5 minutes, even though no trip took exactly 14.5 minutes. That is normal and correct.

The mean moves too, to 148 ÷ 10 = 14.8 minutes. The median moved by half a minute while the mean moved by 0.8 minutes, because the new value sits out at the top end. The median calculator does the sorting and the middle-pair averaging for you.

How to find the mode

The mode is the value that occurs most often. Scan the sorted list for repeats:

9, 11, 12, 12, 14, 15, 16, 17, 20

Only 12 appears twice, so the mode is 12 minutes. Notice that the mode sits well below the mean and median here. With small data sets the mode is often a bit random, because a single repeat is enough to create one.

The mode has a few quirks worth knowing:

  • A data set can have two modes (bimodal) or more. The list 3, 4, 4, 6, 7, 7, 9 has modes 4 and 7.
  • If every value appears exactly once, there is no mode. Saying “the mode is 0” or picking one value at random are both wrong.
  • The mode is the only one of the three that works for categories. If a shoe shop sold sizes 8, 9, 9, 10, 9, 11 and 8, the mode is size 9, and that is the size to restock first. You cannot take the mean of “medium, large, small”.

For long lists with lots of repeats, a tally or a frequency distribution table makes the mode obvious at a glance.

Range and midrange: the quick spread check

Mean, median and mode tell you where the centre is. The range tells you how far the data stretch. It is the largest value minus the smallest:

Range = 20 − 9 = 11 minutes.

The midrange is halfway between the two extremes: (20 + 9) ÷ 2 = 14.5 minutes. It is quick to work out, but it uses only two values, so a single odd day changes it completely. Treat the midrange as a rough check, not a summary you would report.

The range has the same weakness. For a sturdier measure of spread, use the interquartile range from our quartile and IQR calculator, which looks at the middle 50% of the data, or the standard deviation, explained in our guide to standard deviation.

Worked example summary table

Here is everything for the nine-day commute data in one place, with the ten-day version beside it so you can see what one extra value does.

MeasureHow to find it9 days (n = 9)10 days (n = 10, added 22)
SumAdd every value126148
MeanSum ÷ n1414.8
MedianMiddle value, or average of the middle two14 (5th value)14.5 (average of 14 and 15)
ModeMost frequent value1212
RangeMaximum − minimum1113
Midrange(Maximum + minimum) ÷ 214.515.5

All of these numbers are in minutes, the same unit as the data. If your mean comes out as 140 when no trip took longer than 20, you have slipped a decimal.

When to use the mean, median or mode

The three measures agree when data are roughly symmetric, like the commute times above. They split apart when the data are skewed, meaning a long tail stretches out on one side.

Skewed data: why incomes use the median

Picture a small office with seven people. Six earn $42,000, $45,000, $48,000, $51,000, $53,000 and $58,000. The owner pays herself $310,000.

  • Mean salary: $607,000 ÷ 7 = $86,714 (rounded).
  • Median salary: the 4th of seven sorted values, $51,000.

The mean says the typical person earns almost $87,000, yet six of the seven people earn $58,000 or less. The median of $51,000 describes the typical employee far better. If the owner’s salary were $61,000 instead, the mean would drop to about $51,143 while the median would stay at exactly $51,000. The median barely notices extreme values. The mean follows them.

This is why the U.S. Census Bureau leads with median household income in its income statistics, and why house prices are usually reported as medians too. A handful of very high incomes or mansion sales would push the mean well above what most households earn or pay.

A useful rule of thumb: when the mean is clearly higher than the median, the data are skewed to the right (a long tail of high values). When the mean is lower than the median, they are skewed to the left. The skewness calculator puts a number on that lopsidedness.

Quick guide to choosing

SituationBest summaryWhy
Test scores, heights, measurement repeatsMeanData are roughly symmetric and every value matters
Incomes, house prices, wait times with rare long delaysMedianResistant to a few extreme values
Shoe sizes, favorite colors, survey answersModeWorks for categories and shows the most common choice
Data with a suspected typo or outlierMedian, then investigateStops one bad value from distorting the summary

The NIST/SEMATECH Engineering Statistics Handbook makes the same point in its section on measures of location: for symmetric data the three measures are close, and for skewed or heavy-tailed data the median is usually the safer choice. If you suspect an outlier, our outlier calculator applies the standard 1.5 × IQR fence test.

Weighted averages: when values do not count equally

A plain mean treats every value the same. Sometimes that is wrong. Suppose your course grade is built like this:

  • Homework average 88, worth 20% of the grade.
  • Quiz average 92, worth 30%.
  • Final exam 74, worth 50%.

A plain mean of the three scores gives (88 + 92 + 74) ÷ 3 = 84.67. That overstates your grade, because the final counts for half. The weighted mean multiplies each score by its weight and divides by the total weight:

(88 × 0.20) + (92 × 0.30) + (74 × 0.50) = 17.6 + 27.6 + 37.0 = 82.2

The weights add to 1.00, so there is nothing more to divide. If your weights were percentages or credit hours that do not add to 1, divide by their sum instead. Your real grade is 82.2, almost two and a half points lower than the plain mean suggested. GPA works the same way, with credit hours as the weights, which our guide on how to calculate GPA covers in detail. For quick sums, use the weighted average calculator.

Common mistakes

  • Finding the median without sorting first. The middle of an unsorted list is just whatever value you happened to write in the middle.
  • Using the wrong position for an even count. With ten values the median is the average of the 5th and 6th values, not the 5th alone.
  • Dividing by the wrong n. Count the values after you clean the data. If you removed a blank or a duplicate entry, n changes.
  • Calling a value “the mode” when nothing repeats. A list with no repeated values has no mode.
  • Reporting only the mean for skewed data. Give the median as well, or instead, whenever a few large values sit far from the rest.
  • Averaging averages. If one class of 10 students averaged 80 and another of 30 students averaged 70, the combined mean is (10 × 80 + 30 × 70) ÷ 40 = 72.5, not 75. Weight each group by its size.
  • Rounding too early. Keep full precision through the sum and division, then round the final answer once.

Beyond the three averages

Once you can find the mean, median and mode by hand, the next step is describing spread and position. The five-number summary (minimum, first quartile, median, third quartile, maximum) gives a compact picture of a whole data set and is exactly what a box plot draws. Standard deviation tells you how far values typically sit from the mean, and a z-score combines the mean and standard deviation to say how unusual a single value is. Our guide on how to calculate a z-score picks up from here.

Frequently asked questions

What is the difference between mean, median and mode?

The mean is the sum of the values divided by how many there are. The median is the middle value once the data are sorted. The mode is the value that appears most often.

How do you find the median with an even number of values?

Sort the values, find the two in the middle, and take their average. For 3, 5, 8, 10 the median is (5 + 8) ÷ 2 = 6.5.

Can a data set have more than one mode?

Yes. If two values tie for the highest count, the data are bimodal and both values are modes. If every value appears once, there is no mode at all.

Which is better, the mean or the median?

Use the mean for roughly symmetric data where every value matters, like test scores. Use the median for skewed data like incomes or house prices, where a few extreme values would drag the mean away from what is typical.

Is the average the same as the mean?

In everyday speech, yes: “average” almost always means the arithmetic mean. In statistics, “average” can loosely refer to any measure of central tendency, so textbooks use “mean” to be precise.

How do I find the range?

Subtract the smallest value from the largest. For the commute data, 20 − 9 = 11 minutes.

Sort first, count carefully, and then the mean, median and mode each take a minute or two by hand. The more useful skill is reading them together: when all three sit close, your data are balanced and the mean is a fair summary, and when they drift apart, look for the long tail or the outlier causing it. For bigger lists, the mean, median and mode calculator gives all three plus the range in one pass, and the percentile calculator takes it further when you need to know where one value stands within the rest.