Median Calculator
Paste your numbers and get the middle value instantly — with the sorted data set and every step of the working shown.
Separate values with commas, spaces or line breaks — a column pasted from Excel or Google Sheets works as-is. Anything that is not a number is ignored, never counted as zero.
What is the median?
The median is the middle value of a data set — the value that sits exactly halfway through the sorted data, with half the values below it and half above. It is one of the three measures of central tendency, alongside the mean and the mode, and it answers a different question from the mean: not "what would everyone get if the total were shared out?" but "what does the person in the middle have?"
Because the median only cares about position, it is famously steady. Add one enormous value to a data set and the mean lurches toward it, while the median moves at most one place. That steadiness is why official statistics quote median incomes and median house prices rather than means.
How to find the median (odd count)
Step 1 — Sort the values from smallest to largest. Step 2 — Count them. With an odd count there is a single middle value. Step 3 — Take the value in the middle position, (n + 1) ÷ 2.
Worked example: for 3, 7, 9, 14, 20 the set is already sorted, n = 5, and the middle position is the 3rd value — the median is 9. Notice the mean of the same set is 53 ÷ 5 = 10.6: the two larger values pull the mean above the median, while the median simply reports the middle student, score or sale.

How to find the median (even count)
With an even count there is no single middle value, so the median is the average of the two middle values. Worked example: 5, 8, 12, 20 — sorted, the middle pair is 8 and 12, so the median is (8 + 12) ÷ 2 = 10. Note that 10 is not one of the values in the set; like the mean, the median of an even set can be a value nobody has.
Median formula
Even n: the average of the values in positions n ÷ 2 and (n ÷ 2) + 1
There is no Σ and no division of a total — sorting is the whole job, which is why the steps panel above always shows the sorted data set with the middle highlighted. Our step-by-step median guide covers duplicates, negatives and larger data sets in the same way.
When the median beats the mean
Six people in a company earn $32,000, $34,000, $35,000, $36,000, $38,000 — and the owner earns $240,000. The mean salary is $69,166.67, a number that describes nobody. The median is $35,500, which describes the typical employee honestly. Any time a distribution is skewed — a long tail of big values — the median is the safer headline number: house prices, incomes, business valuations, hospital waiting times. When the data is symmetric and measurement-like (test scores, temperatures, heights), the mean uses more of the information and is usually the better summary. The mean vs median guide works through the decision in full.
Median vs mean — which one to report
| Median | Mean | |
|---|---|---|
| Uses | Position only | Every value |
| Outliers | Barely move it | Drag it toward themselves |
| Best for | Skewed data: income, prices | Even data: scores, measurements |
| Must be a data value? | Only for odd counts | No |
When in doubt, quote both — the gap between them is itself information about the shape of your data. The mean calculator returns both from a single paste.
Frequently asked questions
How do you calculate the median?
Sort the values from smallest to largest and take the middle one. With an even count, average the two middle values — e.g. 5, 8, 12, 20 gives (8 + 12) ÷ 2 = 10.
What is the median of 3, 7, 9, 14, 20?
9 — it is the middle value once the set is sorted (it already is).
Does the median ignore outliers?
Yes — the median depends on position, not size, so one extreme value barely moves it. That is why house prices and salaries are usually reported as medians.
What is the median if two numbers are in the middle?
Add the two middle values and divide by 2. For 5, 8, 12, 20 the middle pair is 8 and 12, so the median is (8 + 12) ÷ 2 = 10.
Should I report the mean or the median?
Report the median when the data is skewed or has outliers — incomes, house prices, waiting times. Report the mean when the values are fairly even and every value should count. This page shows both, so you can compare before deciding.