The median is the middle value when numbers are arranged in order
The median is the number that sits in the middle when you arrange all your numbers from smallest to largest. If you have an odd count of numbers, the median is the one in the center. If you have an even count, the median is the average of the two middle numbers.
The median is useful because it shows you a typical value without being thrown off by extremely high or low numbers. For example, if five houses on a street sold for $200,000, $210,000, $215,000, $220,000, and $5,000,000, the median price ($215,000) tells you more about the neighborhood than the average would.
Key Takeaways
- Sort your numbers from smallest to largest before you do anything else.
- For an odd count of numbers, the median is the middle one; for an even count, add the two middle numbers and divide by two.
- The median ignores extreme values, making it more reliable than the average when your data includes outliers.
- Most spreadsheet programs have a built-in MEDIAN function that does the work for you.
- The median and the average are different calculations and often produce different results.
Finding the median with an odd number of values
Count how many numbers you have. If the count is odd, the median is straightforward: arrange the numbers from smallest to largest, then pick the one in the middle.
Example: You have the numbers 7, 2, 9, 5, 1. Arrange them: 1, 2, 5, 7, 9. The middle number is 5, so the median is 5. There are two numbers below it and two above it.
The position of the median in an odd list is always at spot (n + 1) ÷ 2, where n is how many numbers you have. With five numbers, that is (5 + 1) ÷ 2 = 3, so the median is in the third position.
Finding the median with an even number of values
When you have an even count of numbers, there is no single middle value. Instead, find the two numbers in the middle, add them together, and divide by two.
Example: You have the numbers 3, 8, 1, 6. Arrange them: 1, 3, 6, 8. The two middle numbers are 3 and 6. Add them: 3 + 6 = 9. Divide by two: 9 ÷ 2 = 4.5. The median is 4.5.
With an even list, the two middle positions are at n ÷ 2 and (n ÷ 2) + 1. With four numbers, those positions are 2 and 3, which hold the values 3 and 6.
Using a spreadsheet to calculate the median
Excel, Google Sheets, and most other spreadsheet programs have a MEDIAN function that does the sorting and calculation for you. Type your numbers into cells, then use the formula =MEDIAN(cell range).
In Excel or Google Sheets, if your numbers are in cells A1 through A10, type =MEDIAN(A1:A10) into an empty cell and press Enter. The program sorts the values and returns the median automatically.
This method is faster and removes the risk of sorting errors, especially when you have many numbers. It also works the same way whether your list has an odd or even count of values.
The difference between median and average
The average (also called the mean) adds all numbers and divides by how many there are. The median is the middle value. They often produce different results, especially when your data includes very high or very low outliers.
Example: Five test scores are 60, 65, 70, 75, and 100. The average is (60 + 65 + 70 + 75 + 100) ÷ 5 = 74. The median is 70. The one very high score (100) pulls the average up, but it does not affect the median. If you want to know what a typical score looks like, the median (70) is more honest than the average (74).
Step-by-step example with real numbers
Suppose you want the median of these house prices: $180,000, $250,000, $195,000, $220,000, $188,000, $210,000.
Step 1: Count the numbers. You have six, which is even.
Step 2: Sort from smallest to largest: $180,000, $188,000, $195,000, $210,000, $220,000, $250,000.
Step 3: Find the two middle values. With six numbers, the middle positions are 3 and 4. Those are $195,000 and $210,000.
Step 4: Add and divide by two: ($195,000 + $210,000) ÷ 2 = $202,500. The median price is $202,500.
Common mistakes to avoid
The most common error is forgetting to sort the numbers first. The median only works if your list is in order from smallest to largest. If you pick the middle number from an unsorted list, you will get the wrong answer.
Another mistake is confusing median with mode. The mode is the number that appears most often in your list, not the middle one. A list can have one mode, no mode, or multiple modes.
With an even count of numbers, do not just pick one of the two middle values. You must add them and divide by two to get the true median.
Frequently Asked Questions
What if all the numbers in my list are the same?
The median is that number. If your list is 5, 5, 5, 5, the median is 5. This is true whether you have an odd or even count of identical values.
Can the median be a number that is not in my original list?
Yes, especially with an even count of values. If your list is 1, 2, 3, 4, the median is 2.5, which does not appear in the original list. This happens because you are averaging the two middle numbers.
Do I have to sort the numbers myself, or can a computer do it?
A spreadsheet program will sort and calculate the median for you using the MEDIAN function. If you are doing it by hand, you must sort first. There is no shortcut.
Why is the median useful if the average exists?
The median is more reliable when your data has extreme values. A single very high or very low number can shift the average significantly, but it does not change the median. This makes the median better for understanding what is typical.
What if I have negative numbers in my list?
The process is the same. Sort from smallest to largest (most negative first), then find the middle value or average the two middle values. Negative numbers follow the same rules as positive ones.