Median Calculator

Median calculator that shows you the sorted list

Enter your numbers in any order. You get the median, the sorted data it came from, whether the count was odd or even, and the mean and mode alongside it, because the gap between the mean and the median is usually the interesting part.

For variance and standard deviation as well, use the full statistics solver.

Separate values with commas or spaces. Decimals and negatives are fine.

Sorts your data, states whether the count is odd or even, and reports the mean and mode alongside
What the median is

The middle value, and why that is often the honest one

The median is the value sitting in the middle once the data is sorted. Half the values are at or below it, half at or above. Finding it requires sorting first, and that is the step people skip and the reason most wrong answers are wrong.

Its usefulness comes from what it ignores. The mean adds every value together, so one extreme number drags it around. The median only cares about position, so an extreme value moves it by at most one place in the ordering. Take the salaries 30k, 32k, 35k, 36k and 900k: the mean is 206,600, which describes nobody in the room, while the median is 35,000, which describes the middle person exactly.

That is why house prices, household incomes and response times are reported as medians. When a distribution has a long tail, the median answers "what is typical" and the mean answers "what is the total, shared out".

Odd count

3, 7, 9, 12, 15 → 9

Five values, so the third is the middle one. No arithmetic needed at all.

Even count

4, 8, 10, 14 → 9

Four values, so average the two in the middle: (8 + 10) / 2 = 9.

Sorting is not optional

15, 3, 9, 12, 7

The middle of the list as typed is 9 here only by luck. Sort first, every time.

Resistant to outliers

mean 206,600 vs median 35,000

One 900k salary among four ordinary ones moves the mean enormously and the median not at all.

Method

How to find the median of a data set

1
Sort the values from smallest to largest.

This is the whole trick. The median is defined by position, and position only means something once the data is in order. Duplicates stay in, so a list with three 7s contributes three entries.

2
Count how many values you have.

Call it n. Whether n is odd or even decides which of the next two steps applies.

3
If n is odd, take the middle one.

It sits at position (n + 1) / 2. With 5 values that is the 3rd; with 11 values it is the 6th. The median is then an actual member of your data set.

4
If n is even, average the two middle ones.

They sit at positions n/2 and n/2 + 1. With 4 values that is the 2nd and 3rd. The median here need not be a member of the data set at all, and frequently is not.

5
Sanity check the result.

Count how many values fall below your answer and how many above. They should match, or come as close as duplicates allow. Badly lopsided means the sort went wrong.

Worked examples

Odd, even, and with an outlier

An odd number of values

15, 3, 9, 12, 7
  1. Sort: 3, 7, 9, 12, 15.
  2. n = 5, which is odd.
  3. The middle position is (5 + 1) / 2 = 3, so take the 3rd value.
  4. Two values sit below it and two above, which confirms the count.
median = 9

An even number of values

14, 4, 10, 8
  1. Sort: 4, 8, 10, 14.
  2. n = 4, which is even, so there is no single middle value.
  3. The two middle positions are 2nd and 3rd: 8 and 10.
  4. Average them: (8 + 10) / 2 = 9. Notice that 9 is not one of the original values, which is normal for an even count.
median = 9

Why the median resists an outlier

30, 32, 35, 36, 900
  1. Sort: already in order.
  2. n = 5, so the median is the 3rd value: 35.
  3. The mean is (30 + 32 + 35 + 36 + 900) / 5 = 206.6, which is larger than four of the five values.
  4. Replace 900 with 9000 and the mean leaps to 1826.6 while the median does not move at all. That immovability is the point.
median = 35, mean = 206.6

Find the median of your own data above →

Choosing between them

When to report the median and when the mean

Use the median when the data is skewed or has outliers you do not want to let dominate: incomes, house prices, waiting times, anything with a long tail on one side. Use the mean when the distribution is roughly symmetric and you care about the total, since the mean multiplied by n gives the sum back and the median does not.

Comparing the two is itself informative. If the mean sits well above the median, the tail runs to the right and a few large values are pulling it. If the mean sits below, the tail runs left. This calculator reports both so you can read that difference straight off.

The other averages

Mode, and when it is the right answer

The mode is the most frequent value, and it is the only average that works on data with no numeric order at all: the most common shoe size, the most popular option in a survey. A data set can have two modes, several, or none when nothing repeats.

For the full picture, including variance and standard deviation, the statistics solver computes every measure at once. For the mean on its own with the standard error beside it, use the mean calculator.

Common questions

Median calculator FAQ

How do you find the median?

Sort the values from smallest to largest, then take the middle one. If there is an even number of values, average the two in the middle. Sorting first is essential: the median is defined by position, not by where a number happens to sit in your list.

What is the median of an even number of values?

The average of the two middle values. For 4, 8, 10, 14 the two middle values are 8 and 10, so the median is 9. Note that the median then need not be one of your original data values, which is perfectly normal.

What is the difference between the mean and the median?

The mean adds every value and divides by how many there are. The median is the middle value after sorting. The mean uses every number's size, so one extreme value can move it a long way; the median uses only position, so it barely moves. For skewed data the median is usually the more honest summary.

Why is the median used for income and house prices?

Because those distributions have a long tail of very high values. A handful of extreme figures pull the mean far above what a typical person experiences, while the median stays with the middle of the population. Reporting the mean there would be technically correct and practically misleading.

Can a data set have more than one median?

No. Every data set has exactly one median. The mode is the average that can be multiple or absent; the median is always a single value, even when it has to be constructed by averaging the two middle entries.

Do duplicate values count when finding the median?

Yes, every occurrence counts as its own entry. In 4, 7, 7, 7, 9 there are five values, so the median is the third one, which is 7. Removing duplicates before sorting is a common and serious error.

Is this median calculator free?

Yes, with no account and no limit. It shows the sorted list, states whether the count is odd or even, and reports the mean and mode alongside the median so you can compare. Everything runs in your browser.