Median and Range Calculator

Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 9/8/2026

The median is the middle value of a sorted set (or the average of the two middle values if the count is even), and the range is the difference between the largest and smallest value. For the values 2, 8, 4, 10, 6, the median is 6 and the range is 8.

Explanation

The median is a measure of central tendency alternative to the arithmetic mean (see our sample variance and standard deviation calculator for the latter): it corresponds to the value that sits exactly in the middle of a data set sorted in ascending order, with as many values below as above. Its most useful feature is its robustness to extreme values: unlike the mean, which a single very high or very low outlier can strongly shift, the median stays largely unaffected by this type of atypical value, as long as its relative rank doesn't change drastically. This is why the median is often preferred over the mean to describe data such as incomes or property prices, where a few extreme values (very high incomes, for example) could give a misleading picture of the 'typical' situation if the mean were used. The range, by contrast, is the simplest possible measure of spread (the difference between the largest and smallest value), but it's also the most sensitive to extreme values, since it depends only on these two boundary values and completely ignores how the intermediate values are distributed. These two measures thus naturally complement the mean and standard deviation: the median and range offer a quick, robust reading, while the mean and standard deviation use the full data set but remain more sensitive to outliers.

Example: the values 2, 8, 4, 10, 6

Inputs

Values: 2, 8, 4, 10, 6.

Calculation

Sorted in ascending order: 2, 4, 6, 8, 10. With 5 values (odd count), the median is the middle value: 6. Range = 10 − 2 = 8.

Result

This set's median is 6, and its range is 8.

Frequently asked questions

Why is the median sometimes preferred over the mean to describe incomes?

Because income distribution is generally highly skewed, with a small number of very high incomes pulling the mean strongly upward, to the point that it can give a misleading picture of a population's 'typical' income. The median, depending only on the central rank of the values rather than their exact amount, stays largely unaffected by these few extreme values and better reflects the situation of the person in the middle of the distribution.

Why is the median of an even number of values an average of two values?

Because with an even number of sorted values, there's no single value exactly at the center: two values share this central position, equally distant from both ends of the set. The standard mathematical convention is then to take the arithmetic mean of these two central values as the median, ensuring exactly half the values fall on each side.

Why is the range an unreliable measure of spread on its own?

Because it depends on only two values (the minimum and maximum), completely ignoring how the other values are distributed between these two extremes: a single outlier is enough to artificially inflate the range, even if the rest of the data is tightly clustered. More robust measures of spread, such as standard deviation or the interquartile range, account for all or a larger part of the distribution — see our coefficient of variation calculator for a relative rather than absolute measure of spread.

Related resources

Similar calculators