EasyUnitConverter.com

Median Calculator

Find the median, quartiles, and interquartile range of a data set. See also Mean Calculator and Mode Calculator.

How to Find the Median

The median is the middle value of a sorted data set. To find it: (1) sort the numbers from smallest to largest, (2) if the count is odd, the median is the middle number, (3) if the count is even, the median is the average of the two middle numbers. The median is less affected by outliers than the mean, making it a robust measure of central tendency.

Median Formula

If n is odd: Median = x[(n+1)/2]

If n is even: Median = (x[n/2] + x[n/2 + 1]) / 2

Q1 = Median of lower half

Q3 = Median of upper half

IQR = Q3 − Q1

Example Calculation

Data: 12, 5, 22, 30, 7, 36, 14, 42, 15, 53

Sorted: 5, 7, 12, 14, 15, 22, 30, 36, 42, 53

n = 10 (even) → Median = (15 + 22) / 2 = 18.5

Q1 = 12, Q3 = 36, IQR = 24

Median vs Mean vs Mode

MeasureDefinitionBest For
MeanSum ÷ CountSymmetric data
MedianMiddle valueSkewed data, outliers
ModeMost frequent valueCategorical data

Frequently Asked Questions

When is the median better than the mean?

The median is better when data has outliers or is skewed. For example, in income data where a few very high earners pull the mean up, the median gives a more representative "typical" value.

What is the interquartile range (IQR)?

The IQR is the range of the middle 50% of data — the difference between Q3 (75th percentile) and Q1 (25th percentile). It measures spread without being affected by extreme values.

Can the median equal the mean?

Yes. In a perfectly symmetric distribution, the mean and median are equal. For example, in {1, 2, 3, 4, 5}, both the mean and median are 3.

How do you find the median of an even number of values?

Sort the values, then take the average of the two middle numbers. For example, in {2, 4, 6, 8}, the median is (4 + 6) / 2 = 5.

Related Calculators: