Skip to content
thecalculatorstudio

Mean, Median, Mode and Range Calculator

Enter your numbers to see the mean, median, mode, range and midrange. The sorted list, the position of the median and a frequency table show how each answer was found.

Last reviewed

Separate with commas, spaces or new lines. Leave out thousands separators.

Mean

5.125

41 ÷ 8

Median
5.5
Mode
7 (3 times each)
Range
7 (2 to 9)
Midrange
5.5

Sorted: 2, 2, 3, 4, 7, 7, 7, 9. The median is the average of the values in positions 4 and 5.

How often each value occurs
ValueTimes
22
31
41
73
91

The four measures

Mean, median, mode and range summarise a list of numbers. Three describe the middle and one the spread.

  • Mean is the sum of the numbers divided by how many there are. OpenStax calls it the most common measure of the center.
  • Median splits the sorted list into two equal halves. With an odd count it is the middle value. With an even count it is the average of the two middle values.
  • Mode is the most frequent value. A set can have more than one mode, and a set with two is called bimodal. If every value occurs once, there is no mode.
  • Range is the largest value minus the smallest. It measures spread using only the two extremes.

The midrange, the average of the smallest and largest, is also shown.

Worked example

The numbers 3, 7, 7, 2, 9, 4, 7, 2.

  1. Sort them: 2, 2, 3, 4, 7, 7, 7, 9.
  2. Mean: the sum is 41 and there are 8 numbers, so 41 ÷ 8 = 5.125.
  3. Median: with 8 numbers the middle ones are the 4th and 5th, which are 4 and 7. Their average is (4 + 7) ÷ 2 = 5.5.
  4. Mode: 7 occurs three times and 2 occurs twice, so the mode is 7.
  5. Range: 9 − 2 = 7.
  6. Midrange: (2 + 9) ÷ 2 = 5.5.

More examples

Numbers Mean Median Mode Range
1, 2, 3, 4, 5 3 3 none 4
2, 4, 6, 8 5 5 none 6
1, 2, 2, 3, 3 2.2 2 2 and 3 2
2, 3, 4, 5, 100 22.8 4 none 98
5, 5, 5, 5 5 5 5 0

The fourth row shows why the median can be the better measure. One extreme value, 100, pulls the mean to 22.8, higher than four of the five numbers, while the median stays at 4. OpenStax makes the same point: the median is generally a better measure of the center when there are extreme values or outliers.

Which one to use

  • Use the mean when the values are fairly even, with no extreme ones, and you want every value to count.
  • Use the median when a few extreme values would distort the mean, as with incomes or house prices.
  • Use the mode for the most common value, which is the only one of the three that also works for categories, such as the most popular shoe size.
  • Use the range for a quick feel of the spread, and the standard deviation calculator for a fuller one.

Common mistakes

  • Forgetting to sort before finding the median. The median is of the sorted list.
  • Picking one middle value when the count is even. Average the two middle ones.
  • Calling a repeated pair a mode when another value repeats more. The mode is the most frequent.
  • Entering 1,000 as a number. Leave out thousands separators.
  • Mixing up range and midrange. One subtracts and the other averages.

For quartiles, outliers and variance, use the statistics calculator, and for a simple mean of a list the average calculator.

A weighted mean

When some values count more than others, weight them. A score of 80 that counts three times and a score of 90 that counts twice give a mean of (80 × 3 + 90 × 2) ÷ 5 = 84, not 85.

Do not average two averages

The mean of two group means is the mean of the whole only when the groups are the same size. If 10 people have a mean of 50 and 30 people have a mean of 70, the mean of all 40 is (10 × 50 + 30 × 70) ÷ 40 = 65, not 60. Always combine the sums and the counts, not the averages.

How it is calculated

The sums use exact decimal arithmetic, so a list such as 0.1, 0.2, 0.3 has a mean of exactly 0.2. Results are shown to 15 significant figures. The frequency table lists up to 30 different values.

Frequently asked questions

How do you find the mean, median, mode and range?

Mean: add the numbers and divide by how many there are. Median: sort them and take the middle one. Mode: the value that occurs most often. Range: the largest minus the smallest.

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

Take the average of the two middle values in the sorted list. OpenStax describes it as the two middle values added together and divided by two. For 2, 4, 6, 8 the median is (4 + 6) ÷ 2 = 5.

Can there be more than one mode?

Yes. OpenStax notes that a data set can have more than one mode, and a set with two is called bimodal. If every value occurs only once, there is no mode.

When is the median better than the mean?

When there are extreme values or outliers. OpenStax says the median is generally a better measure of the center in that case, because a single extreme value pulls the mean but barely moves the median.

What is the midrange?

The average of the smallest and largest values. It is a quick measure of the middle of the data, but it depends only on the two extremes, so it is sensitive to outliers.

What is the difference between range and spread?

The range is the simplest measure of spread, the largest minus the smallest. It uses only two values. For a fuller measure, use the standard deviation.

Related calculators

Sources