Median calculator
Find the median, the middle value of a list once it is sorted from smallest to largest. The median is often a better summary than the mean when a few values are very high or very low, such as with house prices or incomes.
- Runs in your browser
- Free, no account needed
- Copy or download the result
Result
The short answer
The median is the middle value of a sorted list. With an odd count it is the single middle number, and with an even count it is the mean of the two middle numbers. A single extreme value hardly moves it.
FormulaOdd n: the middle value of the sorted list. Even n: (the two middle values added together) / 2
Worked exampleThe numbers 9, 2, 7, 4, 12 and 5 sort to 2, 4, 5, 7, 9, 12, so the two middle values are 5 and 7 and the median is 6.
Example
9, 2, 7, 4, 12, 5
- Count
- 6
- Middle values
- 5 and 7, averaged
- Sorted
- 2, 4, 5, 7, 9, 12
How to use the median calculator
- Type or paste your numbers in the box in any order, such as 9, 2, 7, 4, 12, 5.
- Choose Commas for compact lists such as 100,200,300. Automatic also accepts spaces, semicolons, new lines and comma-space lists.
- Separate values with commas, spaces, semicolons or new lines.
- The result updates as you type, or press Run. Use Copy result or Download to keep it.
How it works
The tool sorts the numbers from smallest to largest for you, so you do not need to sort them first.
With an odd count, the median is the single middle number. With an even count, it is the mean of the two middle numbers.
Example: 9, 2, 7, 4 sorts to 2, 4, 7, 9, so the median is (4 + 7) / 2 = 5.5.
Accepts up to 5,000 numbers. Nonzero values must be between 1e-100 and 1e100 in size, and results show up to 12 significant digits.
Everything runs in your browser. Your input is not uploaded or stored. If you use Copy link, what you entered is placed in the link.
Questions and answers
How do you find the median?
Sort the numbers, then pick the middle one. If there are two middle numbers, add them and divide by 2.
What is the median of an even set of numbers?
It is the average of the two middle values. For 2, 4, 7, 9 the middle values are 4 and 7, so the median is 5.5.
When should I use the median instead of the mean?
Use the median when a few extreme values could pull the mean too far. For 1, 2, 3, 100 the mean is 26.5 but the median is 2.5.
Do repeated numbers count?
Yes. Every value you enter takes its own place in the sorted list, including duplicates.
Last updated November 1, 2026. Maintained by SnowRock. How our tools work
All 220 SnowRock tools