Categories📊 StatisticsMedian Calculator

Median Calculator

Find the middle value and sorted rank order of a numerical data set.

There you go.
22.5
Sorted Set: [5, 15, 20, 25, 35, 40]
Guide & Educational Reference
How to Use the Median Calculator
  1. 1Enter your data points in the text area, separated by commas, spaces, or line breaks.
  2. 2The calculator sorts your data automatically and displays the median value.
  3. 3The sorted dataset is shown below the result so you can verify the calculation.
What Is the Median?

The median is the middle value in a sorted dataset. Unlike the mean, the median is not affected by extreme values (outliers), which makes it especially useful for skewed distributions. For example, median household income is often more representative than mean income because a small number of very high incomes can inflate the mean.

How It Works
Odd Number of Values

Sort the dataset from smallest to largest. The median is the single middle value.

Dataset: 3, 7, 10, 15, 20 → Sorted: [3, 7, 10, 15, 20] → Median = 10
Even Number of Values

Sort the dataset. The median is the average of the two middle values.

Dataset: 2, 4, 8, 10 → Sorted: [2, 4, 8, 10] → Median = (4 + 8) / 2 = 6
Practical Example
Home Prices in a Neighborhood (5 houses)
Prices: $320K, $275K, $410K, $290K, $1.2M → Sorted → Median position: 3rd value
Median = $320,000 (the mean of $499K would be skewed by the $1.2M outlier)
Odd count: 7, 1, 3, 9, 5
Sorted: 1, 3, 5, 7, 9; middle position (3rd of 5)
Median = 5
Even count: 2, 4, 6, 8
Sorted: 2, 4, 6, 8; average of the two middle values (4 and 6)
Median = 5
Important Considerations
  • The median is resistant to outliers, making it a better choice than the mean for skewed data.
  • For a symmetric dataset, the mean and median will be the same or very close.
  • This calculator automatically sorts your data — you do not need to enter values in order.
Frequently Asked Questions

When should I use the median instead of the mean?

Use the median when your data has outliers or is heavily skewed in one direction. Common examples include income data, home prices, and response times.

Can the median be a value not in the original dataset?

Yes. When there is an even number of values, the median is the average of the two middle values, which may not exist in the original dataset. For example, the median of [2, 4, 8, 10] is 6.

How is the median found for an even number of values?

The values are sorted and the two middle numbers are averaged. For an odd count, the single middle value is used.

Why use the median instead of the mean?

The median is the middle value and is barely affected by extreme outliers, so it often describes a skewed data set better than the mean.

Related Statistics Calculators