Median Calculator

Find the middle value of any list of numbers. Paste your numbers separated by commas or spaces, and this median calculator sorts them, picks the middle value, and shows the mean and range too.

Separate numbers with commas or spaces. A column copied from a spreadsheet works too.

Tick this to see the mean, the count and the range next to the median.

Formula: sort the numbers from smallest to largest. With an odd count, the median is the middle value. With an even count, the median is the average of the two middle values.

How to Use the Median Calculator

Paste or type your numbers in the box, separated by commas or spaces. A column copied from a spreadsheet works too, since line breaks count as separators.

  1. Type your numbers in the list box. The example list 3, 7, 8, 12, 20 is already filled in, so you can press Calculate right away to see how it works.
  2. Leave the extra statistics box ticked to see the mean and the range next to the median.
  3. Press Calculate, or press Enter. The median appears first and large, with the sorted list and the middle value shown below.
  4. Press Reset to clear the box and start over with a new list.
A photo of a student writing a list of numbers on a whiteboard in a bright classroom and circling the middle number
The median of 3, 7, 8, 12, 20 is 8, the middle value once sorted.

The Median Formula

The median is the middle value of a sorted list. Sort the numbers from smallest to largest first, because the median of an unsorted list has no meaning.

With an odd count, the median is the single middle value. Its position is (n + 1) / 2, where n is how many numbers there are. With five numbers, the middle position is (5 + 1) / 2 = 3, so the third number in the sorted list is the median.

With an even count, there are two middle values. Add them and divide by 2. For 4, 8, 15, 16, 23, 42, the middle pair is 15 and 16, so the median is (15 + 16) / 2 = 15.5. Our mean median mode calculator finds the mean and the mode of the same list if you need all three measures at once.

Worked Example: The Median of 3, 7, 8, 12, 20

Find the median of 3, 7, 8, 12, 20.

  1. Sort the numbers. They are already in order, so the sorted list is 3, 7, 8, 12, 20.
  2. Count them. There are 5 numbers, an odd count.
  3. Find the middle position. (5 + 1) / 2 = 3, so the third number is the median.
  4. Read the answer. The third number is 8, so the median is 8.

The mean of the same list is (3 + 7 + 8 + 12 + 20) / 5 = 50 / 5 = 10, and the range is 20 - 3 = 17. As a second check, try an even count. For 4, 8, 15, 16, 23, 42, the two middle values are 15 and 16, so the median is (15 + 16) / 2 = 15.5. The same steps work for any list, so try your own numbers in the tool above.

A photo of a notebook page with a handwritten sorted list of numbers 3, 7, 8, 12, 20 with the middle number 8 circled in red pen
The five numbers sort to 3, 7, 8, 12, 20, so the middle value is 8.

Median vs Mean: When the Middle Beats the Average

The median and the mean both describe the center of a list, but they react very differently to extreme values. The mean adds every number and divides by the count, so one very large value pulls it up. The median only cares about order, so that same value barely moves it.

Take the salaries in a small office. Nine people earn 40, 42, 45, 48, 50, 52, 55, 58 and 60 thousand dollars, and the boss earns 500 thousand. The mean salary is 95 thousand, which describes nobody in the office. The median is 51 thousand, the average of the two middle salaries, 50 and 52, and it describes a typical worker far better.

Use the median when a few extreme values would distort the mean, and use the mean when every value should count equally, as in a test average where each score matters. Our average calculator gives the mean of the same list, and our standard deviation calculator measures how spread out the numbers are.

Common Mistakes to Avoid

The most common mistake is taking the middle value without sorting first. The list 20, 3, 12, 8, 7 has the same median as 3, 7, 8, 12, 20, but only after sorting. The middle value of the unsorted list is 12, which is wrong. Sort first, every time.

A second mistake is forgetting to average the two middle values with an even count. For 4, 8, 15, 16, 23, 42, picking 15 or 16 alone is wrong. The median is 15.5, the average of the pair.

A third mistake is treating the median like the mean. The median does not have to be one of your numbers, and it does not use the size of the largest or smallest values at all. One huge outlier changes the mean a lot and leaves the median almost untouched, which is exactly why the median is used for incomes and house prices.

Where the Median Shows Up in Real Life

House prices are the classic median example. A few very expensive homes pull the mean price far above what most buyers pay, so estate agents and news reports quote the median price instead. The median home price is the price of the middle home when every home sold is lined up from cheapest to dearest.

Incomes work the same way. The median income splits a population in half, with half earning more and half earning less, while the mean income is pulled up by a small number of very high earners. Test scores, marathon times and waiting times are also often reported with a median, because one very slow time should not define the whole group. Our quartile calculator splits the same sorted list into quarters, so you can see where any value sits in the spread.

A photo of a teacher pointing at a row of seven numbered index cards lined up on a table from smallest to largest
House prices and incomes are usually reported with a median, not a mean.

Frequently asked questions

How do you find the median of a list of numbers?

Sort the numbers from smallest to largest, then take the middle value. With an odd count, the median is the single middle value. For 3, 7, 8, 12, 20, the median is 8.

What is the median of an even set of numbers?

Average the two middle values. For 4, 8, 15, 16, 23, 42, the middle pair is 15 and 16, so the median is (15 + 16) / 2 = 15.5.

What is the difference between the median and the mean?

The median is the middle value once the numbers are sorted, while the mean is the total divided by how many numbers there are. The median resists outliers, so one very large value moves the mean a lot and the median barely at all.

Can the median be a number that is not in the list?

Yes. With an even count, the median is the average of the two middle values, and that average is often a number that appears nowhere in the list. For 4, 8, 15, 16, 23, 42, the median is 15.5.

What is the median used for?

It describes a typical value when a few extreme values would distort the mean. Incomes, house prices, test scores and waiting times are usually reported with a median for this reason.

Does the order of the numbers matter?

No. The calculator sorts the numbers first, so you can paste them in any order. What matters is the sorted order, because the median is the middle value of the sorted list.

Start Calculating Now!

Discover the power of smart tools at KitQuarter.

Explore All Tools