Median Calculator
Find the exact middle number of a sorted set of numbers.
Mathematical Formula
Overview & Explanation
The median is the middle value in a list of numbers sorted in ascending order. It is less affected by extreme outliers than the mean.
How It Works
- Sort all dataset values in ascending numerical order.
- If dataset length is odd, pick the exact center number.
- If dataset length is even, compute the average of the two central numbers.
Practical Applications
- Determining median household income.
- Analyzing real estate median home sale prices.
Finding the median
The median is the middle value of a data set sorted from smallest to largest. For 3, 7, 9, 15, 40 the median is 9. With an even number of values, take the average of the two middle ones: for 3, 7, 9, 15 the median is (7 + 9) ÷ 2 = 8.
Always sort first. Forgetting to sort is the most common error.
Median versus mean
The mean of 3, 7, 9, 15, 40 is 74 ÷ 5 = 14.8, pulled upwards by the single large value 40. The median, 9, is not affected by how extreme the largest or smallest values are, which makes it the better summary for skewed data.
This is why household incomes and house prices are usually reported as medians: a few very high values would make the mean look unrepresentative of a typical household. If the mean is much larger than the median, the data has a long tail of high values.
Related measures
The median splits data into two halves; the quartiles split it into four. The interquartile range, the gap between the first and third quartile, describes spread in a way that, like the median, resists outliers. For grouped data in frequency tables, the median is estimated by interpolating within the class that contains the middle position.
Worked Example: Median of 12, 5, 22, 30, 7
Find median.
Sort in Order
5, 7, 12, 22, 30
Select Middle Element
Third value of 5 elements
Frequently Asked Questions
Why is median preferred over mean for income data?
Can the median be a value not in the data?
What is the position of the median?
Related Calculators
Average Calculator
Calculate the arithmetic mean, sum, count, and statistical summary of a dataset.
Percentage Calculator
Calculate percentages, percentage change, and percentage of a number instantly.
Percentage Increase Calculator
Calculate the percentage growth or increase from an initial value to a final value.
Percentage Difference Calculator
Calculate the relative percentage difference between two numbers when neither is a baseline.