๐งฎ Median Calculator: Find the Middle Value of Any Data Set
By ToolNimba Editorial Team ยท Updated 2026-06-20
This median calculator finds the middle value of any list of numbers in one step. Paste or type your values separated by commas, spaces, or new lines, and it instantly sorts them and returns the median, along with the count, minimum, maximum, and the full sorted list. It handles both odd and even counts correctly, works with negatives and decimals, and copes with data sets of any size.
What is the Median Calculator?
The median is the middle value of a data set once the numbers are arranged in order from smallest to largest. Exactly half of the values sit at or below the median and half sit at or above it, which is what makes it such a clear marker of the centre of your data. Finding it by hand is a two step job: first sort every value, then locate the middle position. This tool does both for you and shows the sorted list so you can check the work.
The rule for the middle depends on how many values you have. With an odd count there is a single value sitting exactly in the centre, and that value is the median. With an even count there is no single middle, so you take the two values closest to the centre and average them. For example, in the sorted list 3, 7, 9, 12 the two middle values are 7 and 9, and the median is (7 plus 9) divided by 2, which is 8. The median itself does not have to be one of the original numbers.
The median is often a better summary than the mean (the everyday average) when your data is skewed or contains outliers. Because the median only cares about the position of values and not their size, a single very large or very small number cannot drag it around the way it pulls the mean. This is exactly why incomes, house prices, and response times are usually reported as medians: a few extreme values would distort the average and paint a misleading picture of the typical case.
Reading the median alongside the minimum, maximum, and count gives you a quick, honest snapshot of a data set. The count confirms how many values you entered, the min and max show the full span, and the median tells you where the centre sits within that span. If the median sits close to the midpoint between min and max, the data is fairly balanced; if it leans toward one end, the data is skewed in that direction.
When to use it
- Finding the typical salary, price, or response time in a list where a few extreme values would distort the average.
- Reporting the median test or survey score for a class or group.
- Summarising sensor readings, timings, or measurements without letting one bad reading skew the result.
- Checking the centre of a data set in homework or statistics practice and seeing the sorted list to verify it.
How to use the Median Calculator
- Type or paste your numbers into the box, separated by commas, spaces, or new lines.
- Negative numbers and decimals are fine; any invalid entry is flagged so you can fix it.
- Read the median at the top, with the count, minimum, and maximum beside it.
- Use the sorted list below to verify the result, and copy it with the Copy button if you need it.
Formula & method
Worked examples
Find the median of 12, 7, 9, 7, 15, 3, 21 (an odd count).
- Sort the values: 3, 7, 7, 9, 12, 15, 21
- Count the values: n = 7, which is odd
- The middle position is (7 + 1) / 2 = 4, so take the 4th value
- The 4th value in the sorted list is 9
Result: The median is 9
Find the median of 10, 2, 38, 23, 38, 23, 21, 16 (an even count).
- Sort the values: 2, 10, 16, 21, 23, 23, 38, 38
- Count the values: n = 8, which is even
- The two middle positions are n / 2 = 4 and (n / 2) + 1 = 5, so take the 4th and 5th values: 21 and 23
- Average them: (21 + 23) / 2 = 22
Result: The median is 22
Finding the median: odd vs even count
| Count (n) | Rule | Example |
|---|---|---|
| Odd | The single middle value after sorting | 3, 7, 9 gives a median of 7 |
| Even | The average of the two middle values | 3, 7, 9, 12 gives a median of (7 + 9) / 2 = 8 |
Median vs mean: which to use
| Measure | What it is | Best used when |
|---|---|---|
| Median | The middle value when sorted | Data is skewed or has outliers (income, prices, timings) |
| Mean | Sum of values divided by the count | Data is fairly even with no extreme outliers |
| Both together | Compare the two figures | A large gap between them signals skew or outliers |
Common mistakes to avoid
- Forgetting to sort before finding the middle. The median is the middle of the sorted list, not the middle of the order you typed the numbers in. Always sort from smallest to largest first, or let the calculator sort them for you.
- Using the wrong rule for an even count. When there is an even number of values there is no single middle. You must average the two central values. Picking just one of them gives the wrong answer.
- Expecting the median to be one of your numbers. With an even count the median is an average of two values, so it can be a number that does not appear in your list at all, such as 8.5 from 7 and 10.
- Confusing the median with the mean. The mean adds everything up and divides by the count, while the median is purely about position. For skewed data the two can be far apart, so make sure you are reporting the one you actually want.
Glossary
- Median
- The middle value of a data set once it is sorted. With an even count, it is the average of the two middle values.
- Mean
- The arithmetic average: the sum of all values divided by how many values there are.
- Outlier
- A value far from the rest of the data that can distort the mean while leaving the median largely unaffected.
- Skew
- A lopsided spread where values cluster more on one side, which pulls the mean toward the long tail but barely moves the median.
- Central tendency
- A single value, such as the median or mean, that represents the centre or typical value of a data set.
- Range
- The difference between the largest and smallest values, a simple measure of how spread out the data is.
Frequently asked questions
How do I find the median of a list of numbers?
Sort the numbers from smallest to largest, then find the middle. If the count is odd, the median is the single middle value. If the count is even, average the two middle values. Paste your list above and the calculator does both steps for you.
How do I find the median when there is an even number of values?
Sort the values, take the two that sit closest to the centre, and average them. For 3, 7, 9 and 12 the two middle values are 7 and 9, so the median is (7 + 9) / 2 = 8.
What is the difference between the median and the mean?
The median is the middle value when the numbers are sorted, while the mean is the sum of all values divided by the count. The median ignores how extreme outliers are, so it often describes skewed data more honestly than the mean.
When should I use the median instead of the average?
Use the median when your data is skewed or contains outliers, such as incomes, house prices, or response times. A few very large or very small values would pull the mean away from the typical case, but the median stays put.
Can the median be a number that is not in my data set?
Yes. With an even number of values the median is the average of the two middle numbers, so it can be a value that never appears in your list, for example 8.5 from 7 and 10.
Does this median calculator work with negative numbers and decimals?
Yes. You can mix negative numbers, decimals, and whole numbers, separated by commas, spaces, or new lines. The calculator sorts them correctly and computes the median for any combination.