Median Calculator
Find the median of any set of numbers in seconds. Enter your values to see the sorted data, the middle position, the median, and a clear step-by-step solution.
Median Calculator
Enter your numbers below and get your result instantly.
Step-by-Step Solution
What Is the Median?
The median is the middle value of a data set after the numbers have been arranged from smallest to largest. Half of the values are below it and half are above it.
Because it depends on position rather than on the size of every value, the median is not pulled around by extreme numbers. This makes it a reliable way to describe the typical value in data such as incomes, house prices, or test scores.
Our Median Calculator does the sorting and the middle-value search for you, and shows every step so you can follow the logic.
How to Find the Median
You can find the median by hand with three simple steps.
1. Sort the numbers
Arrange all the values in order from the smallest to the largest.
2. Count the values
Count how many numbers are in the list. Call this number n.
3. Pick the middle
If n is odd, the median is the single value in the exact middle. If n is even, there are two middle values, and the median is the average of those two.
Median Calculator Examples
Example 1: odd number of values
Find the median of these five numbers:
Sort them from smallest to largest:
There are 5 values, so the middle position is (5 + 1) ÷ 2 = 3. The third value is 5, so the median is 5.
Example 2: even number of values
Find the median of these four numbers:
Sort them:
There are 4 values, so the two middle values are 8 and 12. Their average is (8 + 12) ÷ 2 = 10, so the median is 10.
More Median Calculator Examples
These extra worked examples cover a typical homework question, repeated values, a frequency table, real-world salary data, and how adding a value changes the median. In every case, sort the numbers first, then find the middle.
Example 3: What is the median of 23, 45, 12, 67, 34, 89, 21?
Answer: the median is 34.
Sort the numbers from smallest to largest: 12, 21, 23, 34, 45, 67, 89. There are 7 values, so the middle position is (7 + 1) ÷ 2 = 4. The fourth value is 34, so the median is 34.
Example 4: Repeated values and an even count
Find the median of 6, 2, 9, 6, 3, 6, 8, 2.
Answer: the median is 6.
Sort the numbers: 2, 2, 3, 6, 6, 6, 8, 9. There are 8 values, so the two middle values are the 4th and 5th, which are 6 and 6. Their average is (6 + 6) ÷ 2 = 6. Repeated values are all counted, and when the two middle values are equal, the median is simply that value.
Example 5: Median from a frequency table
A teacher asked 17 students how many books they read last month: 4 students read 0 books, 6 students read 1 book, 5 students read 2 books, and 2 students read 3 books. What is the median?
Answer: the median is 1 book.
There are 4 + 6 + 5 + 2 = 17 students, so the middle position is (17 + 1) ÷ 2 = 9. Count up through the table: the first 4 students read 0 books, and students 5 to 10 read 1 book. The 9th student is in that group, so the median is 1.
Example 6: Median salary with one very high value
Five employees earn these yearly salaries: 32,000, 35,000, 38,000, 41,000 and 400,000. Which is a better summary, the median or the mean?
Answer: the median, which is 38,000.
The data is already sorted and has 5 values, so the middle position is 3 and the median is 38,000. The mean is 546,000 ÷ 5 = 109,200, which is higher than four of the five salaries. One extreme value pulls the mean up, but the median stays close to a typical salary. You can compare it with the mean using our Average Calculator.
Example 7: How does adding a value change the median?
The numbers 4, 8 and 12 have a median of 8. What happens if you add 20?
Answer: the median becomes 10.
The new sorted data is 4, 8, 12, 20. There are now 4 values, so the median is the average of the two middle values: (8 + 12) ÷ 2 = 10. Adding one value shifted the middle, and the count changed from odd to even, which changes how the median is found.
A common mistake: forgetting to sort first
Take the numbers 9, 2, 7, 4, 5. If you pick the middle of the list as written, you get 7, which is wrong. Sort first: 2, 4, 5, 7, 9. The middle value is 5, so the median is 5. Always sort before you look for the middle. For other helpful summaries of the same data, try our Mode Calculator or the Descriptive Statistics Calculator.
Created by Sajid Ali, SmartStatCalc · Last updated: 7 November 2026
Found a mistake or have a suggestion? Contact us.
How to Use Our Median Calculator
You can get your answer in just a few seconds:
- Type or paste your numbers into the Data Values box.
- Separate the numbers with commas, spaces, or line breaks.
- Click the Calculate Median button.
- Read the count, the middle position, and the median.
- Use the step-by-step solution to see how the answer was found.
Click Reset at any time to clear your data and start a new calculation.
Median vs. Mean vs. Mode
The median, mean, and mode are the three common measures of the center of a data set, and each tells you something different.
- Median: the middle value after sorting. It is not affected by extreme values.
- Mean: the sum of all values divided by the count. It is affected by very large or very small values.
- Mode: the value that appears most often in the data.
For example, in the data 2, 3, 3, 4, 100, the mean is 22.4, but the median is 3. The median describes the typical value much better here, because one extreme number would otherwise pull the mean far from the rest. If you need the mean, try our Average Calculator.
Why Use SmartStatCalc?
SmartStatCalc is built to make everyday statistics quick and easy to understand. Instead of sorting and counting by hand, you can enter your data and see a clear result right away.
Who Can Use a Median Calculator?
Students can use a median calculator to check statistics homework, and teachers can use it to summarize class results. It is also useful for anyone who wants a fair picture of data that contains a few unusually high or low values, such as salaries, prices, or delivery times.
Frequently Asked Questions
What is the median in simple words?
The median is the middle number in a list that has been sorted from smallest to largest.
How do I find the median of an even number of values?
Sort the numbers, take the two values in the middle, and calculate their average. That average is the median.
Do the numbers have to be in order?
No. You can enter the numbers in any order, and the calculator sorts them automatically before finding the median.
Can I enter decimal or negative numbers?
Yes. The calculator works with whole numbers, decimals, and negative numbers.
What happens if a number appears more than once?
Repeated values are all counted. Each one takes its own place in the sorted list.
When should I use the median instead of the mean?
Use the median when your data has extreme values or is skewed, such as incomes or house prices. The mean is better for data that is fairly evenly spread.
Is this Median Calculator free?
Yes. SmartStatCalc's Median Calculator is free to use online.
Contact SmartStatCalc
Have a question, suggestion, or feedback about our calculators? We want to make SmartStatCalc more useful, accurate, and easier for everyone to use.
If you spot a mistake or have an idea for another statistics tool, we would be happy to hear from you.
Median Practice Problems with Answers
Try these problems on your own first, then click a problem to see the answer. You can also check your work with the Median Calculator above.
Problem 1: Find the median of these numbers:14, 9, 21, 5, 17
Sort the numbers: 5, 9, 14, 17, 21.
There are 5 values, so the middle position is (5 + 1) ÷ 2 = 3. The value in that position is 14.
Median = 14
Problem 2: Find the median of these numbers:30, 12, 45, 18, 27, 36
Sort the numbers: 12, 18, 27, 30, 36, 45.
There are 6 values, so there are two middle values: 27 and 30. Their average is (27 + 30) ÷ 2 = 28.5.
Median = 28.5
Problem 3: Find the median of this data set. Notice the very large value:3, 5, 4, 6, 200
Sort the numbers: 3, 4, 5, 6, 200.
There are 5 values, so the middle position is (5 + 1) ÷ 2 = 3. The value in that position is 5.
Median = 5
Problem 4: Find the median of these numbers:10, 20, 30, 40
Sort the numbers: 10, 20, 30, 40.
There are 4 values, so there are two middle values: 20 and 30. Their average is (20 + 30) ÷ 2 = 25.
Median = 25
Problem 5: Find the median of these decimal values:2.4, 1.8, 3.6, 2.9, 1.2, 3.1
Sort the numbers: 1.2, 1.8, 2.4, 2.9, 3.1, 3.6.
There are 6 values, so there are two middle values: 2.4 and 2.9. Their average is (2.4 + 2.9) ÷ 2 = 2.65.
Median = 2.65
Problem 6: Find the median of these negative and positive numbers:-7, 4, -2, 10, 0, -5, 3
Sort the numbers: -7, -5, -2, 0, 3, 4, 10.
There are 7 values, so the middle position is (7 + 1) ÷ 2 = 4. The value in that position is 0.
Median = 0
Problem 7: Find the median of these ten test scores:88, 45, 67, 23, 91, 54, 36, 72, 15, 60
Sort the numbers: 15, 23, 36, 45, 54, 60, 67, 72, 88, 91.
There are 10 values, so there are two middle values: 54 and 60. Their average is (54 + 60) ÷ 2 = 57.
Median = 57
Cite this calculator
If you use this calculator in your work, you can cite it like this:
SmartStatCalc. (2026). Median Calculator. https://smartstatcalc.com/median-calculator/
Related Calculators
Explore more free statistics tools from SmartStatCalc.