Find the median of a list of numbers, with the middle values used and the count, for data that contains outliers.
Example
For 1, 2, 3 and 4 the two middle values are 2 and 3, so the median is 2.5. For 7, 1 and 9 the sorted list is 1, 7, 9 and the median is 7.
Calculation method
The tool sorts a copy of your values from smallest to largest and takes the middle one. With an even number of values it averages the two middle numbers, which is why 1, 2, 3 and 4 give 2.5. The result also lists the middle values and the count, so you can check that every number was read. Values may be separated by spaces, commas, semicolons or new lines.
Important notes
The median describes the centre but not the spread: 40, 41, 42 and 10, 41, 90 share a median of 41 despite very different ranges. Repeated values count separately, and negative and decimal numbers sort normally, so −2, 0 and 0.5 have a median of exactly 0.
Sorting comes first
You can paste values in any order; the calculator sorts a copy from smallest to largest before finding the centre. For 7, 1 and 9 the sorted list is 1, 7, 9, so the median is 7. With an even number of values there are two middle numbers and the median is their average: 1, 2, 3 and 4 give 2.5. The result also shows which middle values were used and the count, so you can confirm that every number was read correctly.
Why the median resists outliers
The median depends only on position, not on how far the extreme values are from the centre. Five salaries of 35,000, 38,000, 41,000, 42,000 and 250,000 have a median of 41,000, while their mean is 81,200 because the single large salary pulls it upward. That is why household income and house prices are often summarised with a median. Report the mean as well when the total amount matters, for example when budgeting a combined payroll.
Repeated values, negatives and what the median hides
Repeated numbers count separately: 3, 3, 3 and 8 have middle values 3 and 3, so the median is 3. Negative numbers and decimals sort normally, and −2, 0 and 0.5 have a median of exactly 0. The median shows the centre but not the spread: 40, 41, 42 and 10, 41, 90 share a median of 41 despite very different ranges. Pair it with the Standard Deviation Calculator or the minimum and maximum when variation matters.
Worked examples| Input | Result |
|---|
1, 2, 3, 4 | 2.5 (2, 3) |
7, 1, 9 | 7 (7) |
35000, 38000, 41000, 42000, 250000 | 41,000 (41,000) |
3, 3, 3, 8 | 3 (3, 3) |
-2, 0, 0.5 | 0 (0) |
Frequently asked questions
When should I use the median instead of the mean?
When a few extreme values would distort the average. Five salaries of 35,000, 38,000, 41,000, 42,000 and 250,000 have a median of 41,000 but a mean of 81,200, which nobody actually earns. Incomes and house prices are usually reported as medians for that reason; use the mean when the total matters, such as a payroll budget.
What happens with an even number of values?
The two middle values are averaged. 1, 2, 3 and 4 give (2 + 3) ÷ 2 = 2.5, and the result shows both middle values so you can see where the centre lies. With repeated numbers those middle values can be identical: 3, 3, 3 and 8 have middle values 3 and 3, so the median is 3.
Does the order I paste the numbers in matter?
No. The tool sorts a copy before finding the centre, so 7, 1, 9 and 1, 7, 9 both give a median of 7, and a column copied from a spreadsheet works as it is. To see how spread out the values are, pair the median with the Standard Deviation Calculator or with the minimum and maximum.