CalcMathic

Geometry and statistics

Mean, median and mode calculator

Enter a list of numbers separated by commas, spaces or new lines. The calculator sorts them and finds the mean, median, mode and range, explaining each step.

Decimals and negatives are fine. Up to 500 numbers.

Press Calculate. The answer and every step of the working will show here.

How it works

Mean, median and mode are three ways to describe the middle of a set of numbers. Each answers a slightly different question, and range tells you how spread out the numbers are.

The mean is the usual average. Add every number, then divide by how many there are. The median is the middle value once the list is sorted. If the count is odd, it is the one in the center. If the count is even, there are two middle numbers, and the median is halfway between them. The mode is the value that appears most often. A list can have one mode, several modes when there is a tie, or no mode when every value appears just once. The range is the largest number minus the smallest.

The first step in almost every statistics problem is to sort the list, and the calculator does that and shows you the sorted list, which makes the median easy to see. Sorting also puts equal numbers side by side, so the mode stands out.

Numbers can be separated by commas, spaces, semicolons or new lines. Anything that is not a number, like a stray letter, shows an error that names the entry, so you can correct it. An empty list shows an error as well.

The formula

  • Mean = sum of the numbers ÷ how many numbers there are
  • Median = the middle value of the sorted list (or the mean of the two middle values)
  • Mode = the most frequent value
  • Range = largest value - smallest value

Worked example

Find the averages of 12, 15, 18, 15, 20, 25, 40. Sorted, the list is 12, 15, 15, 18, 20, 25, 40. The sum is 145 and there are 7 numbers, so the mean is 145 ÷ 7 = 20.7143. There are 7 numbers, an odd count, so the median is the 4th one, 18. The value 15 appears twice and nothing else does, so the mode is 15. The range is 40 - 12 = 28.

The mean is larger than the median because the 40 pulls it upward.

More examples

An even count. For 3, 5, 7, 9, the middle two numbers are 5 and 7, so the median is (5 + 7) ÷ 2 = 6. The mean is 24 ÷ 4 = 6 as well. Every number appears once, so there is no mode.

Two modes. For 1, 1, 2, 2, 3, the values 1 and 2 each appear twice, so the modes are 1 and 2. The mean is 9 ÷ 5 = 1.8 and the median is 2.

Test scores. Five scores: 85, 90, 78, 92, 85. Sorted: 78, 85, 85, 90, 92. The sum is 430, so the mean is 86. The median is 85, the mode is 85, and the range is 92 - 78 = 14.

Negative and decimal numbers. For -2.5, 4, 10, the mean is 11.5 ÷ 3 = 3.8333, the median is 4, and the range is 10 - (-2.5) = 12.5.

A single number. For just 7, the mean, median and mode are all 7, and the range is 0.

Common mistakes

  • Finding the median without sorting. The middle of the list as typed is not the median. Sort first.
  • Forgetting the even-count rule. With an even count there is no single middle number. Average the two in the middle.
  • Saying the mode is the biggest number. It is the most frequent one, which can be anywhere in the list.
  • Dividing by the wrong count. When computing a mean, count every entry, including repeats. A repeated 15 counts twice.
  • Dropping a zero. A score of 0 is a value and belongs in the list. Leaving it out raises the mean.

When to use it

Averages summarize data in science labs, sports, weather and grades. The mean is fair when values are fairly even, like temperatures over a week. The median is better when a few extreme values would distort the mean, which is why reports of house prices or incomes quote the median. The mode suits data in categories, like the most common shoe size sold.

Students meet these in middle school and use them again in science fair projects and statistics classes. The calculator shows the working in the same order as a textbook so you can compare it to your own.

Read the guideMean, median and mode explained with examples7 min read

Common questions

Which average should I use?

Use the mean for things that add up evenly, like daily temperatures. Use the median when a few very large or very small values would distort the mean, like incomes. Use the mode for the most common value.

What if there is no mode?

If every number appears just once, there is no mode. If two or more numbers tie for most frequent, the list has several modes, and the calculator lists them all.

Why is the median different from the mean?

Because the mean is pulled by extreme values and the median is not. In 12, 15, 15, 18, 20, 25, 40, the 40 drags the mean up to 20.7, while the median stays at 18.

What score do I need to reach a target mean?

Multiply the target by the number of scores, then subtract the sum you already have. To average 86 over 5 tests with four scores adding to 345, you need 86 × 5 = 430, then 430 - 345 = 85 on the last one.

Can I enter decimals and negatives?

Yes, both work. Use a decimal point and a minus sign, and separate the numbers with commas, spaces or new lines.

What does the range tell me?

How spread out the data is. A small range means the numbers are close together. A large range means they are far apart. It uses only the two extreme values, so one outlier changes it a lot.

You might also need

Need a quick calculation instead? The free scientific calculator on the homepage handles roots, powers, trig and logs, and the math guides explain each method step by step.