The median is the value that splits a data set clean in half — half the numbers below it, half above. It is the statistic that survives outliers: one billionaire in a room of teachers does not move the median income, even though the mean leaps. This median calculator takes any list of numbers, sorts it, and returns the median with the working shown — the sorted order, where the middle falls, and the mean alongside so you can see at a glance whether your data is skewed.



How to Find the Median

Three steps, always in this order. Sort the data from smallest to largest — nearly every wrong median comes from skipping this. Count the values, n. Pick the middle: if n is odd, the median is the single 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. The calculator above runs exactly this procedure and shows the sorted list so you can audit it.

Worked Examples

Even count: for 4, 8, 15, 16, 23, 42 there are 6 values, so the median is the average of the 3rd and 4th sorted values: (15 + 16) ÷ 2 = 15.5. Note the mean of the same set is 18 — the large 42 pulls the mean up while the median stays in the middle of the pack, the classic signature of right-skewed data. Odd count: for 3, 7, 9, 12, 20 the middle position is the 3rd, so the median is simply 9. No averaging needed, and the median is always one of the actual data values when the count is odd.

Median vs Mean: Which Should You Report?

Report the median when the data is skewed or contains outliers you cannot remove: incomes, house prices, reaction times, and hospital stays are the textbook cases — a handful of huge values drag the mean away from "typical," while the median stays put. Report the mean when the data is roughly symmetric and every value matters to a total (the mean preserves sums; the median does not). Honest analysts often report both: when mean and median sit close together the distribution is symmetric, and when they separate, the gap itself is information about the skew. This calculator prints both for that reason.

The Median in Real Reporting

Median household income is the standard economic headline precisely because a few very high earners would make the mean misleading. Median house prices dominate real-estate reporting for the same reason. In medicine, median survival is preferred over mean survival because a few long survivors stretch the mean beyond what a typical patient experiences. In each case the logic is identical to the classroom rule: the median answers "what is the middle case?" rather than "what is the average share?"

Finding Medians of Grouped Data

When data arrives already binned into a frequency table, locate the class where the cumulative count crosses n ÷ 2 — that is the median class — and interpolate inside it if an estimate is needed: median ≈ L + ((n/2 − cf) ÷ f) × w, where L is the class's lower boundary, cf the cumulative frequency before it, f its frequency, and w its width. For raw lists like the ones this calculator accepts, no interpolation is involved: sorting and picking the middle is exact.

Common Mistakes

Forgetting to sort is error number one — the "middle" of an unsorted list is meaningless. Error two is averaging the two middle values when the count is odd, or grabbing one middle value when the count is even. Error three is applying the median to data where the total matters (splitting a bill, averaging speeds over fixed distances) — those are mean problems. Finally, ties do not need special handling: repeated values simply occupy their sorted positions like any others.

The Median of an Even Count, Once More

Students often ask why the two middle values are averaged rather than picking either one. The answer is fairness to the definition: the median must leave exactly half the data on each side, and with an even count no single value does that — the gap between the two middle values is the only point that splits the set evenly. Averaging them is the convention that places the median in that gap, which is also why an even-count median can be a number the data never takes.

Related Tools

The full set lives in the Statistics Calculators hub — pair this with the Five Number Summary Calculator for quartiles and the Percentile Calculator for rank positions.

Frequently Asked Questions

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

Sort the data and average the two middle values. For 4, 8, 15, 16, 23, 42 the middle pair is 15 and 16, so the median is 15.5.

Can the median be a number that is not in the data set?

Yes — with an even count, the average of the two middle values (like 15.5 above) often falls between data points. With an odd count, the median is always an actual data value.

Why is the median better than the mean for income?

Income is right-skewed: a small number of very high incomes inflate the mean far above what a typical household earns. The median marks the true middle household and barely moves when top incomes change.

What is the median of 3, 7, 9, 12, 20?

Nine. With five values the median is the third one in sorted order — no averaging required.

Does the median work for data with duplicates?

Yes. Duplicates take their places in the sorted list like any other values, and the middle is picked by position. Heavy duplication can make the median equal to the most common value, which is correct behavior.

What is the difference between median and mode?

The median is the middle value by position; the mode is the most frequent value. A data set has exactly one median but can have one mode, several modes, or no mode at all.

How is the median related to percentiles?

The median is the 50th percentile — the value below which 50 percent of the data falls. Quartiles are the same idea at 25 and 75 percent.