Glossary
Median
The middle of a sorted dataset
Median is the middle value of a sorted dataset. For [3, 4, 5, 6, 7, 8] (six values), the median is 5.5 (the mean of the two middle values). For [3, 4, 5, 6, 7] (five values), the median is 5. Half the data is below, half above.
The median is famously robust: a single extreme outlier can’t pull it. The median of [1, 2, 3, 4, 5] is 3. The median of [1, 2, 3, 4, 1000] is still 3. This makes the median the right summary for skewed distributions — income, house prices, response times, file sizes — where one or two extreme values would dominate the arithmetic mean.
It’s the same as the 50th percentile. Computing it directly (sort, take the middle) is O(n log n); for very large datasets a quickselect algorithm finds the median in expected O(n).
Use the statistics calculator for the median, mean, mode, and quartiles in a single pass.
Related
Published May 16, 2026