Median Calculator: Finding the Middle Value
By Prince Yadav, Founder & Lead Developer.
What the median tells you
The median is the middle value after observations are sorted from smallest to largest. It describes the centre of an ordered data set.
Odd number of values
For an odd number of observations, the median is the single value in the middle position after sorting. For example, in 2, 5, 9, the median is 5.
Even number of values
For an even number of observations, the median is commonly the average of the two middle values. In 2, 5, 9, 11, the median is (5 + 9) ÷ 2 = 7.
Sort before selecting
Do not choose the middle item from the original order unless the data are already sorted. Check that each observation is included and that missing values are handled consistently.
Median versus mean
The mean uses every value and can be pulled by very large or small observations. The median depends on the ordered middle position, so the two measures can tell different stories about skewed data.
Worked example: even and odd sample sizes
For 3, 7, and 10, the median is 7 because it is the middle sorted value. For 3, 7, 10, and 20, the median is the average of the two middle values, (7 + 10) ÷ 2 = 8.5. Sort the data first; the original order does not determine the median.
What the median does not tell you
The median identifies the centre but not how widely values vary or how many clusters exist. Two data sets can share a median while having very different ranges. When reporting results, pair the median with sample size and a spread measure when useful, and retain units and context.
Sort and count observations explicitly
Write the values in ascending order and count them before selecting the middle. For an even count, average the two middle values; do not select one arbitrarily. If data are weighted, grouped into intervals, or contain missing entries, the simple unweighted median may not be the intended statistic.
Related Calculators
Use the Calculator
Try the worked-example inputs in Median Calculator, then change one assumption at a time to see what drives the result.
Open Median Calculator