Skip to content

Median Calculator: Median, Mean, Mode & Quartiles

Median calculator that finds the middle value of any list, with mean, mode, range, and quartiles, plus the step-by-step sorted work shown.

By Updated Runs in your browser

Median Calculator guide

Paste a list of numbers to find the median instantly, with the sorted list and the middle position shown so you can check the work. Mean, mode, range, and quartiles are calculated at the same time.

The method, step by step

The median is the value that splits a sorted dataset in half: as many numbers sit below it as above it. Finding it takes three steps. Sort the values from smallest to largest. Count them. If the count n is odd, the median is the value at position (n + 1) ÷ 2. If n is even, it is the average of the values at positions n ÷ 2 and n ÷ 2 + 1.

That is the whole algorithm. The calculator does the sort for you and prints the sorted list plus the exact positions it used, so you can copy the working into homework or a report.

Worked examples

Odd count: test scores 88, 72, 95, 64, 81, 90, 77. Sorted: 64, 72, 77, 81, 88, 90, 95. There are 7 values, so the median is at position (7 + 1) ÷ 2 = 4, which is 81. Three scores sit below 81 and three above.

Even count: monthly electric bills of $142, $96, $118, $175, $103, $131. Sorted: 96, 103, 118, 131, 142, 175. There are 6 values, so take positions 3 and 4: (118 + 131) ÷ 2 = $124.50. The median bill is $124.50, even though no month was exactly that amount.

Duplicates count as separate values. The median of 5, 5, 5, 9 is (5 + 5) ÷ 2 = 5, not the median of the unique values 5 and 9.

Median vs. mean: when each one lies

The mean is sensitive to every value; the median only cares about order. That makes the median resistant to outliers. Five people earn $40,000, $45,000, $50,000, $55,000, and $1,000,000. The mean is $238,000, a salary none of them has. The median is $50,000, which describes the typical person.

This is why US statistics for income and housing are reported as medians. The Census Bureau put median household income at $80,610 for 2023, well below the mean, because a small number of very high incomes pull the average up. Home sale prices work the same way: one mansion sale can move a neighborhood's average price by tens of thousands of dollars, but barely moves the median.

Rule of thumb: if the mean is much higher than the median, the data is right-skewed (a long tail of large values). If the mean is lower, it is left-skewed. If they are close, the data is roughly symmetric.

Quartiles and the IQR

The median is also the second quartile, Q2. Split the sorted data at the median, then take the median of each half: that gives Q1 (the 25th percentile) and Q3 (the 75th percentile). The interquartile range, IQR = Q3 − Q1, measures the spread of the middle 50% of the data.

For 2, 4, 6, 8, 10, 12: the lower half is 2, 4, 6, so Q1 = 4; the upper half is 8, 10, 12, so Q3 = 10; IQR = 6. A common outlier test flags anything below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR, here anything below −5 or above 19.

Heads up: there are several quartile conventions. This calculator uses the median-of-halves method taught in most US high school and AP Statistics classes and used by TI-84 calculators. Excel's QUARTILE.INC and QUARTILE.EXC interpolate differently, so they can disagree by a fraction on small datasets. Neither is wrong; just be consistent.

Common mistakes

Forgetting to sort. Picking the middle of an unsorted list is the most common error in intro stats. Dropping duplicates: every value counts, even repeats. Miscounting position with an even count: the median is the average of two values, not either one. And with pasted data, watch for thousands separators. Here, commas separate values, so write 1200, not 1,200.

Median in Excel and Google Sheets

Both use =MEDIAN(A1:A100). Blank cells and text are ignored, but zeros are counted, which can quietly pull the median down if empty values were saved as 0. That is worth checking before you trust the result.

How we calculate: sources

Frequently asked questions

How do you find the median?

Sort the numbers from smallest to largest and take the middle one. For 3, 9, 4, 1, 7, the sorted list is 1, 3, 4, 7, 9 and the median is 4.

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

Average the two middle values. For 2, 4, 6, 8, 10, 12, the middle pair is 6 and 8, so the median is (6 + 8) ÷ 2 = 7.

What is the difference between median and mean?

The mean adds everything and divides by the count; the median is the middle value. For salaries of $40k, $45k, $50k, $55k, and $1M, the mean is $238k but the median is $50k, which better describes a typical person.

Why is median used for home prices and income?

Because a few very large values drag the mean upward. The US Census Bureau reports median household income for this reason; it was $80,610 in 2023.

Can the median be a number that is not in the list?

Yes, whenever the count is even. The median of 1, 2, 3, 4 is 2.5.

How are quartiles calculated here?

Q1 is the median of the lower half and Q3 the median of the upper half, excluding the overall median when the count is odd. This matches TI-84 calculators; Excel's QUARTILE.INC can give slightly different values.

Can I paste numbers with thousands separators?

Remove the commas first. Commas separate values, so 1,200 is read as two numbers, 1 and 200. Spaces, new lines, commas, and semicolons all work as separators.

Is my data uploaded?

Everything runs in your browser. Nothing you enter is uploaded to a server or stored by us.

What is the median of a single number?

The number itself. With one value there is nothing to sort, so it is both the median and the mean.

Is the median affected by outliers?

Very little. Changing the largest value from 100 to 1,000,000 does not move the median at all, as long as the sorted order of the middle values stays the same.