gizmobench

Median Calculator

This page opens the average calculator with the median as its headline figure instead of the mean. The rule has two cases and the tool names the one it used: sort the values, and with an odd count the median is the middle one, while with an even count it is the average of the two middle values, printed as a division. The box arrives filled with twelve numbers, 18, 22, 31, 39, 44, 46, 51, 58, 62, 70, 76 and 83, whose 6th and 7th values are 46 and 51, so the median reads 48.5 while the mean of the same list is 50. That gap is the reason to ask for a median at all: one unusually large or small value drags the mean towards itself and leaves the median where it was, which is why incomes and house prices are reported as medians. Paste your own numbers over the sample and the mean, mode, range, both standard deviations, the geometric and harmonic means and the sum are still listed underneath, each with its arithmetic written out.

Median · 12 values48.5Sorted: 18, 22, 31, …, 83, an even count (12), so the median is the average of the 6th and 7th values: (46 + 51) ÷ 2 = 48.5
What to work out
Values
Sample or population
Count
12

Commas, spaces, tabs, semicolons and new lines all separate values, so a column pasted straight out of a spreadsheet works. Currency symbols, percent signs and accounting parentheses are understood; anything left over is listed rather than silently dropped.

  • Meansum ÷ count
    50

    (18 + 22 + 31 + … + 83) ÷ 12 = 600 ÷ 12 = 50 The arithmetic mean: the one most people mean by “average”.

  • Medianthe middle of the sorted list
    48.5

    Sorted: 18, 22, 31, …, 83, an even count (12), so the median is the average of the 6th and 7th values: (46 + 51) ÷ 2 = 48.5

  • Modeno value repeats
    None

    All 12 values appear exactly once, so nothing is more common than anything else: there is no mode. No mode is a real answer, not a failure. Adding a repeat would create one.

  • Rangelargest − smallest
    65

    Largest − smallest = 83 − 18 = 65

  • Standard deviation (sample)divides by n − 1 · your choice
    20.705730432111608

    √(sample variance) = √428.72727272727275 = 20.705730432111608 Divides by n − 1. Use this when your numbers are a sample drawn from something larger.

  • Variance (sample)divides by n − 1 · your choice
    428.72727272727275

    Σ(x − mean)² ÷ (n − 1) = 4716 ÷ 11 = 428.72727272727275 Divides by n − 1. Use this when your numbers are a sample drawn from something larger.

  • Standard deviation (population)divides by n
    19.82422760159901

    √(population variance) = √393 = 19.82422760159901 Divides by n. Use this when your numbers ARE the whole group.

  • Variance (population)divides by n
    393

    Σ(x − mean)² ÷ n = 4716 ÷ 12 = 393 Divides by n. Use this when your numbers ARE the whole group.

  • Geometric meanfor growth rates and ratios
    45.487558964974305

    (18 × 22 × 31 × … × 83)^(1/12) = 45.487558964974305 The geometric mean: the right average for growth rates, ratios and anything that multiplies.

  • Harmonic meanfor speeds and other per-unit rates
    40.56169143061571

    12 ÷ (1/18 + 1/22 + … + 1/83) = 12 ÷ 0.29584565082861597 = 40.56169143061571 The harmonic mean: the right average for speeds, rates and other per-unit quantities.

  • Sumevery value added up
    600

    18 + 22 + 31 + … + 83 = 600

Sample or population is not a formatting choice. Sample divides by n − 1, population by n, and on eight numbers the two answers differ by about 7%. Use sample when your numbers are a subset of something larger, which is almost always. A tool that shows one of them and calls it “standard deviation” has picked for you without saying so. Both are above, each labelled with the divisor it used.

Common questions

How do you find the median by hand?
Put the values in order from smallest to largest, then count to the middle. With an odd count there is a single middle value and that is the median: for 2, 4, 5, 9, 100 the count is 5 and the 3rd value, 5, is the answer. With an even count there are two middle values and the median is their average: for 1, 2, 3, 4 the 2nd and 3rd values are 2 and 3, so the median is (2 + 3) ÷ 2 = 2.5. The page prints that same line under the big figure, naming the count, the positions it took and the division, so the answer can be checked rather than taken on trust.
What is the median when there is an even number of values?
It is the average of the two middle values, and it is often a number that does not appear in your list at all. The twelve numbers this page opens with are a worked example: sorted, the 6th and 7th values are 46 and 51, so the median is (46 + 51) ÷ 2 = 48.5, which is nowhere in the list. That is normal and not a rounding artefact. The line under the headline shows the two positions and the division, so you can see which pair the answer came from.
Median or mean: which one should I use?
The mean adds every value up and divides by the count, so every value pulls on it in proportion to its size. The median only counts positions, so a single extreme value moves it by at most one place. For 2, 4, 5, 9, 100 the mean is 24, which is larger than four of the five values, while the median is 5. Use the mean for quantities that genuinely add up, such as a total bill split between people, and the median when a few outliers would otherwise describe the whole set. Both are on screen at once here: the mean is the first row under the headline, so the two can be read against each other.
Do I have to sort the numbers before I paste them in?
No. The tool sorts a copy of your values into ascending order before it picks the middle, and it prints the sorted line it used, shortened to its first three values and its last when the list is long. Your typing order stays exactly as you left it in the box. Commas, spaces, tabs, semicolons, pipes and new lines all separate values, so a column copied straight out of a spreadsheet works, and currency symbols, percent signs and accounting parentheses for negatives are understood.
What happens to entries that are not numbers?
They are skipped and named above the results, never treated as zero, because a zero quietly added to the list would move the middle position and change the median without changing anything you can see. Paste 10, 20, n/a, 30 and the page reports that it skipped one entry, quotes it, and gives the median of the other three as 20. If nothing in the box is a number at all, the message says so and shows how to separate values.
Can I make something other than the median the big figure?
Yes. The Featured result menu holds nine: mean, median, mode, range, standard deviation, variance, geometric mean, harmonic mean and sum, and switching it moves that statistic to the headline while the rest stay listed below. This page always opens on the median, even if you last chose another statistic or last used the weighted mean, because the page you asked for wins. Your last list of numbers does come back, so you can carry on where you left off.

Exact for median, mode, minimum, maximum and range. The mean, variances and standard deviations use compensated summation and are accurate to roughly 15 significant digits, not claimed as exact, because double-precision arithmetic is not.