Median — Definition, Formula & Examples
The median is the middle value in a data set when the numbers are arranged in order from least to greatest. If there are two middle values, the median is the average of those two numbers.
Given a data set of values sorted in non-decreasing order, the median is the value at position when is odd. When is even, the median is the arithmetic mean of the values at positions and . Unlike the mean, the median is resistant to extreme values (outliers).
Key Formula
Where:
- = The total number of values in the data set
How It Works
To find the median, first sort all the values from smallest to largest. Next, count how many values you have. If the count is odd, the median is the single middle number — for example, in a list of 7 values, the median sits at position 4. If the count is even, there is no single middle number, so you take the two values closest to the center and find their average. The median splits the data set in half: exactly 50% of the values fall at or below it, and 50% fall at or above it. This makes it especially useful when your data contains outliers that would pull the mean away from the center.
Worked Example
Problem: Find the median of this data set: 12, 7, 3, 15, 9.
Step 1: Sort the values from least to greatest.
Step 2: Count the number of values. There are 5 values, which is odd.
Step 3: Find the middle position using the formula.
Step 4: The 3rd value in the sorted list is the median.
Answer: The median is 9.
Another Example
This example has an even number of values, so the median is the average of the two middle numbers rather than a single value from the data set.
Problem: Find the median of this data set: 20, 5, 14, 8, 25, 11.
Step 1: Sort the values from least to greatest.
Step 2: Count the number of values. There are 6 values, which is even.
Step 3: Identify the two middle positions: position 3 and position 4.
Step 4: The 3rd value is 11 and the 4th value is 14. Average them.
Answer: The median is 12.5.
Visualization
Why It Matters
You will use the median throughout middle-school and high-school statistics courses, and it appears on standardized tests like the SAT. Real-world fields rely on it heavily — economists report median household income, real estate agents quote median home prices, and doctors use median survival times. Understanding the median helps you interpret data accurately when outliers could be misleading.
Common Mistakes
Mistake: Forgetting to sort the data before finding the middle value
Correction: Always arrange values from least to greatest first. The median depends on order, so skipping this step almost always gives the wrong answer.
Mistake: Picking one of the two middle values instead of averaging them when n is even
Correction: When the data set has an even number of values, you must add the two middle values and divide by 2. Neither middle value alone is the median.
Mistake: Confusing the median position with the median value
Correction: The formula (n + 1) / 2 gives you the position, not the median itself. You still need to look up which value sits at that position in the sorted list.
Check Your Understanding
Find the median of: 4, 1, 7, 3, 10.
Hint: Sort first, then pick the middle value from 5 numbers.
Answer: 4. Sorted: 1, 3, 4, 7, 10. The middle (3rd) value is 4.
Find the median of: 6, 2, 9, 13.
Hint: Even count means you average the two middle values.
Answer: 7.5. Sorted: 2, 6, 9, 13. Average the 2nd and 3rd values: (6 + 9) / 2 = 7.5.
A data set has values 50, 55, 60, 65, 70, 500. Is the median or the mean a better measure of center? Why?
Hint: Think about how the extreme value 500 affects each measure.
Answer: The median (62.5) is better because the outlier 500 pulls the mean up to about 133.3, which does not represent the typical value.
