Median Calculator
Paste your numbers to find the median, see them sorted, and follow each step. Works with decimals and negatives, and you can paste a column straight from a spreadsheet. For the average of the same numbers, use the average calculator.
Example loaded: 7, 3, 9, 4, 12. Select Clear to enter your own numbers.
Your numbers
Your results
Median: the quick answer
The median is the middle number in a list after the numbers are sorted from smallest to largest.
Example: 3, 9, 1, 5 sorts to 1, 3, 5, 9. There are two middle numbers, 3 and 5, so the median is (3 + 5) / 2 = 4. With an odd count, the median is the single middle number.
How to find the median
- Put the numbers in order from smallest to largest.
- Count them. Call the count n.
- If n is odd, the median is the middle number, at position (n + 1) / 2.
- If n is even, add the two middle numbers, at positions n / 2 and n / 2 + 1, and divide by 2.
Worked examples
- Odd count: 7, 3, 9, 4, 12. Sorted: 3, 4, 7, 9, 12. There are 5 numbers, so the median is the 3rd one: 7.
- Even count: 10, 2, 8, 4, 6, 14. Sorted: 2, 4, 6, 8, 10, 14. The middle two are 6 and 8, so the median is (6 + 8) / 2 = 7.
Median vs mean
Take 3, 4, 5, 6 and 91. The mean is 21.8, which is higher than four of the five numbers. The median is 5, which still describes a typical value. That is why the median is often used for incomes, home prices and other data with a few very large values.
Need the spread of your numbers as well? Try the standard deviation calculator. For all three averages at once, use the mean, median, mode calculator.
Frequently asked questions
How do I find the median of an even number of values?
Sort the numbers, then add the two middle ones and divide by 2. For 2, 4, 6, 8 the middle two are 4 and 6, so the median is 5.
What if some numbers repeat?
Keep every repeat when you sort. For 1, 3, 3, 7, 9 the median is 3. Repeated values count each time they appear.
Is the median the same as the average?
No. The average (mean) adds everything and divides by the count. The median is the middle value after sorting. They can differ a lot when a few numbers are very large or very small.
When is the median better than the mean?
Use the median when a few extreme values would pull the mean away from what is typical, such as incomes, house prices or waiting times.
Does the order I type the numbers in matter?
No. The calculator sorts them for you and shows the sorted list.
Can I enter decimals and negative numbers?
Yes. You can use decimals such as 2.5 and negatives such as -4. Separate numbers with commas, spaces or new lines.
How do I find the median in Excel or Google Sheets?
Type =MEDIAN(A1:A10), changing the range to match your cells. Empty cells and text are ignored.
Can the median be a number that is not in my list?
Yes. With an even count the median is the average of the two middle values, so it can fall between them, like 4.5 for 3, 4, 5, 6.
About this calculator
Written by Umar Khan. The calculator sorts your numbers and takes the middle value, or the average of the two middle values when the count is even. Results are shown to up to 10 decimal places (6 for standard deviation) with trailing zeros dropped, and your numbers stay in your browser. Last updated November 9, 2026. Questions or corrections: [email protected].
Written by Umar Khan
Umar Khan is a PhD student in engineering at NTNU, the Norwegian University of Science and Technology, in Norway. Every formula and worked example on this page is shown in full so you can check each result yourself. Corrections are welcome at [email protected].
Related calculators
For information only, not professional advice.
Written by Umar Khan. Last updated: November 9, 2026.
