# The median is the middle person

> Sort the values. With an odd count, the median is the middle one. With an even count, it's the average of the two middle ones. Duplicates stay in the list.

Canonical URL: https://monte.markets/learn/center/the-median/

License: CC BY 4.0, reuse with credit to monte.markets.

Lesson 2 of 5 in [Where is the middle](https://monte.markets/learn/center.md).

**Question:** Five people line up by height. Who is the median?

- Whoever is closest to the mean: The median doesn't need the mean at all. Just sort and take the middle.
- **The third person** (right answer): Yes. Two are shorter and two are taller.
- The average of the tallest and shortest: That's the midrange. The median is the person in the middle.

Sort the values. With an odd count, the median is the middle one. With an even count, it's the average of the two middle ones. Duplicates stay in the list.

**Question:** Find the median of 7, 2, 9, 4, 3.

- 9: That's the middle number as written. Sort first.
- 5: That's the mean: 25 ÷ 5. The median is the middle of the sorted list.
- **4** (right answer): Yes. Sorted: 2, 3, 4, 7, 9. The middle one is 4.

Sort first, always. Most median mistakes come from skipping the sort.

Next: [One extreme value](https://monte.markets/learn/center/outliers.md)
