Skip to content
Math & Statisticsstatistics

Median Calculator

The median with the full summary alongside. The median resists outliers where the mean does not, which is why incomes and house prices are reported as medians and averages of them mislead.

Also called: middle value calculator, find the median.

Median
5.5

The median is 5.5. Half the values lie below it and half above, and the quartiles are 3.25 and 7.75. The mean is 5.33. The mean sits below the median, which means a long left tail is pulling it down. No values fall outside the 1.5 IQR fences, so the mean and median should agree closely.

Mean
5.33
Median
5.5
Mode
no repeated value
How many values
6
Sum
32
Smallest
1
Largest
9
Range
8
First quartile
3.25
Third quartile
7.75
Interquartile range
4.5
Sample standard deviation
3.14
Population standard deviation
2.87
On outliers
No values fall outside the 1.5 IQR fences, so the mean and median should agree closely.
On the shape
The mean sits below the median, which means a long left tail is pulling it down.
Method and background

How this is calculated

Sort the values and take the middle one, or the average of the two middle ones for an even count. The property that matters is resistance to outliers: replacing the largest value with one a hundred times bigger moves the mean substantially and leaves the median exactly where it was. That is why any distribution with a long tail, which includes income, wealth and house prices, is reported as a median. Comparing the two here is the quickest test of whether a distribution is skewed.

the middle value once sorted, or the average of the two middle values for an even count
n
How many values

Worked examples

Each of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.

six values

Numbers
3, 9, 4, 1, 7, 8

Median5.5

the average of the two middle values, 4 and 7

Open this example

the median ignores an extreme value

Numbers
3, 9, 4, 1, 7, 800

Median5.5

boundary: the median is unchanged while the mean has moved by two orders of magnitude

Open this example

Method and limits

What it assumes

  • Numeric values, with anything unparseable ignored.

What it deliberately does not model

  • Quartiles use linear interpolation, which is the spreadsheet convention; other definitions differ slightly on small samples.
  • A summary hides the distribution: two very different datasets can share every statistic here.

Formula version 1.0.0 · definition 1.0.0 · India · Report a problem with this calculator

Frequently asked questions

Should I use the mean or the median?
The median when the data has outliers or a long tail, since one extreme value moves the mean and not the median. The mean when the distribution is roughly symmetric.
Which standard deviation do I want?
Sample, almost always. The n-1 divisor corrects for the mean being estimated from the same data. Use the population divisor only when your data genuinely is every member of the group.