Median calculator: what is the middle value of a list?
Paste or type your numbers in any order to find the median, the middle value. You also get the quartiles, the interquartile range and any outliers.
Median calculator
I want the median of 9 numbers, with quartiles by halves.
Median
12
The median is 12: the 5th of 9 values when they are sorted from smallest to largest. The mean is 11.2222, a little lower.
- 11.2222Mean (average), for comparison
- 6 to 16Quartiles Q1 to Q3: the middle half
- 10Interquartile range (Q3 − Q1)
- NoneOutliers (none outside −9 to 31)
How the median calculator works it out
- Sort the 9 values from smallest to largest: 3, 5, 7, 8, 12, 13, 14, 18, 21.
- 9 is odd, so the median is the single middle value, number (9 + 1) ÷ 2 = 5: 12.
- Lower half (without the median): 3, 5, 7, 8. Its median is Q1 = 6.
- Upper half (without the median): 13, 14, 18, 21. Its median is Q3 = 16.
- Interquartile range: 16 − 6 = 10. Outlier fences: 6 − 1.5 × 10 = −9 and 16 + 1.5 × 10 = 31; no value falls outside.
Your numbers sorted, with their place in the list. The marked row is the middle.
| Place | Value | Where it falls |
|---|---|---|
| 1 | 3 | Below Q1 |
| 2 | 5 | Below Q1 |
| 3 | 7 | Middle half |
| 4 | 8 | Middle half |
| 5 | 12 | Median |
| 6 | 13 | Middle half |
| 7 | 14 | Middle half |
| 8 | 18 | Above Q3 |
| 9 | 21 | Above Q3 |
How to use the median calculator
- Your numbers: type or paste them in any order, separated by commas, spaces or new lines. A column copied from a spreadsheet works. Write 1250, not 1,250, because a comma separates numbers.
- Quartiles by: Halves takes the median of the lower and upper half (the usual school and TI-84 method). Excel INC matches the spreadsheet function QUARTILE.INC. The median does not change.
- Read the answer: the median is on top, with where it sits in the sorted list. The box shows the middle half of your numbers, the median and the mean.
When to use a median calculator
Use the median when a few very large or very small values would pull the average off: incomes, house prices, waiting times, response times or test scores with a few outliers. It is also the value asked for in many statistics and homework questions, together with the quartiles and the interquartile range for a box plot.
For the mean, mode and range of the same list, use the average calculator. To work out what percent one value is of another, use the percentage calculator.
Median calculator at a glance
What it does
Sorts the list, finds the middle value or the average of the two middle values, and gives Q1, Q3, the interquartile range and the 1.5 × IQR outliers, with every step.
Who it's for
Students, teachers and anyone summarizing prices, salaries, times or scores where a few extreme values would distort the average.
Watch out for
Sort first. The middle of the list as typed is not the median. With an even count, average the two middle values.
How the median calculator works
The median is the value in the middle once the numbers are sorted: half of the values are at or below it, half at or above. With an odd count there is one middle value, at place (n + 1) ÷ 2. With an even count there are two, and the median is their average, so it does not have to be one of your numbers.
With your numbers: 9 values, so the median is value number 5 in the sorted list, 12.
Unlike the mean, the median hardly moves when one value is extreme. Add a salary of $250,000 to five salaries around $47,000 and the mean jumps to about $81,000, while the median only moves from $47,000 to $49,000. That is why house prices and incomes are usually reported as medians. The quartiles split the sorted list into four parts the same way; the middle half lies between Q1 and Q3, and values more than 1.5 times that range beyond it are commonly called outliers.
For the mean, mode and range together, use the average calculator. To see what share of the list is below a value as a percent, use the percentage calculator, and to compare two values, the percent difference calculator.
Median calculator: worked examples
What is the median of 8, 3, 9, 1, 5?
Sorted: 1, 3, 5, 8, 9. Five values, so the median is the 3rd: 5.
Common mistake: taking the middle of the list as typed (9). The list must be sorted first.
What is the median of 12, 4, 7, 10?
Sorted: 4, 7, 10, 12. Four values, so average the 2nd and 3rd: (7 + 10) ÷ 2 = 8.5.
Common mistake: picking 7 or 10. With an even count the median lies between the two middle values.
Six salaries: $42,000, $45,000, $47,000, $51,000, $52,000 and $250,000. What is the typical salary?
Median: ($47,000 + $51,000) ÷ 2 = $49,000. The mean is $81,167, higher than five of the six salaries, because of the one large value.
Common mistake: reporting the mean as the typical salary. One outlier pulls it far up.
Find Q1, Q3 and the IQR of 3, 5, 7, 8, 12, 13, 14, 18, 21.
The median is 12. Lower half 3, 5, 7, 8: Q1 = 6. Upper half 13, 14, 18, 21: Q3 = 16. IQR = 16 − 6 = 10.
Common mistake: including the median 12 in both halves. With an odd count the halves method leaves it out.
A median calculator in Excel and Google Sheets
Put your numbers in column A, from A2 down. MEDIAN ignores empty cells and text, so the range can be longer than your list.
Read the table row by row: each row is one cell of your sheet, what to put in it and an example.
| Cell | What goes in it | Example |
|---|---|---|
| A2:A100 | Your numbers, in any order | 3, 7, 8, 5, … |
| B2 | Median | =MEDIAN(A2:A100) |
Median
=MEDIAN(A2:A100) Q1 and Q3 (Excel QUARTILE.INC)
=QUARTILE.INC(A2:A100,1) Interquartile range
=QUARTILE.INC(A2:A100,3)-QUARTILE.INC(A2:A100,1) Mean, for comparison
=AVERAGE(A2:A100) Number of values
=COUNT(A2:A100) For Q3 use 3 as the last argument. In Google Sheets, QUARTILE works the same as QUARTILE.INC. QUARTILE.EXC is a third method and gives other quartiles again; no spreadsheet function gives the halves method directly.
Median calculator: frequently asked questions
How do you find the median?
Sort the numbers from smallest to largest. With an odd count, the median is the middle one. With an even count, it is the average of the two middle ones. For 2, 5, 6, 9 that is (5 + 6) ÷ 2 = 5.5.
What is the difference between the median and the mean?
The mean adds all values and divides by the count; the median is the middle value. One very large value raises the mean a lot but the median hardly at all, so the median shows the typical value better for skewed data like incomes.
Can the median be a number that is not in the list?
Yes, when the count is even. The median of 1, 2, 3, 4 is 2.5.
Why do calculators give different quartiles?
There are several accepted methods. The halves method (also used on TI-84 calculators) and Excel QUARTILE.INC often differ: for 1 to 6, halves gives Q1 = 2 and QUARTILE.INC gives 2.25. Choose the method your course or report uses.
What counts as an outlier?
A common rule: anything more than 1.5 × IQR below Q1 or above Q3. For 10, 11, 11, 12, 12, 12, 13, 95, Q1 = 11 and Q3 = 12.5, so the fences are 8.75 and 14.75 and 95 is an outlier.
Does the median work with negative numbers and decimals?
Yes. Sorting works the same way: the median of −5, −1, 0, 2.5, 3 is 0.
Other math calculators
- Average calculator
- Decimal to fraction
- Fraction calculator
- Fraction to decimal
- Percent change calculator
- Percent difference calculator
- Percent increase calculator
- Percent off calculator
- Percentage calculator
- Ratio calculator
- Rounding calculator
- Scientific notation calculator
- Simplify fractions calculator
- Square root calculator
- Standard deviation calculator
- Weighted average calculator
Report a problem with this calculator · Sponsor this calculator