The median is the value that splits a sorted data set into two equal halves: as many observations lie below it as above it. It is the 50th percentile and the second quartile, and it is the measure of centre of choice whenever data are skewed or may contain outliers. Median household income, median house price and median survival time are all reported this way for that reason.
The median is resistant: changing the largest value from 9 to 100 does not move it at all, while the mean jumps. For the default data 3, 7, 1, 9, 4, 100 the mean is 20.67, a value that no typical observation is close to, but the median is 5.5. Comparing the two is itself a quick check of skewness.
To find it, sort the numbers and count them. With an odd count the median is the single middle value at position (n + 1)/2; with an even count it is the average of the two values at positions n/2 and n/2 + 1. The calculator shows these steps for your data.
How to use the Median Calculator
- Data set
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Sort the data and count the values. For odd n take the value at position (n + 1)/2; for even n average the values at positions n/2 and n/2 + 1.
Worked example
Data: 3, 7, 1, 9, 4, 100. Sorted: 1, 3, 4, 7, 9, 100; n = 6 is even, so the middle positions are 3 and 4. The median = (4 + 7) ÷ 2 = 5.5. The mean is 124 ÷ 6 = 20.67, more than three times the median, because the single value 100 pulls it upwards. Three values lie below 5.5 and three above.
Median versus mean
If the mean is clearly larger than the median, the data have a long right tail (a few large values); if it is clearly smaller, the tail is on the left. For symmetric data the two are close. Reporting both, as this calculator does, gives readers an immediate sense of the shape of the data.
Formula
Median = x₍(n+1)/2₎ for odd n · Median = (x₍n/2₎ + x₍n/2+1₎) ÷ 2 for even n
Worked example
Inputs: Data set: 3, 7, 1, 9, 4, 100.
Results: Median = 5.5; Middle position(s) in the sorted list = 3 and 4; Values below and above the median = 3 below, 3 above; Mean (for comparison) = 20.6667; Mode = No mode – every value appears once; Range = 99.
Key terms
- Median
- The middle value of sorted data; the 50th percentile.
- Resistant measure
- A statistic not strongly affected by extreme values.
- Cumulative frequency
- Running total of counts up to a value.
Frequently asked questions
How do I find the median?
Sort the values. If there is an odd number, take the middle one; if even, average the two middle ones.
What is the median of 3, 7, 1, 9, 4, 100?
Sorted: 1, 3, 4, 7, 9, 100. The middle values are 4 and 7, so the median is 5.5.
What is the median of an odd number of values?
The value at position (n + 1)/2. For 15 values it is the 8th value in sorted order.
When is the median better than the mean?
For skewed data such as incomes, house prices and waiting times, or whenever there are outliers.
Can the median be a value that is not in the data?
Yes, with an even count it is the average of two values and may not appear in the list.
What is the median of a frequency table?
Find the value whose cumulative frequency first reaches n/2 (for grouped classes, interpolate within the median class).
How do I find the median in Excel?
=MEDIAN(range).