Median Calculator

Paste numbers to find the median — the middle of the sorted list. With an even count it averages the two middle values.

Mean11.1667
Median10.5
Modenone
Range18

Step by step

  1. Mean: add the values and divide by the count: x̄ = 67 ÷ 6 = 11.1667
  2. Sort the data: 3, 7, 9, 12, 15, 21
  3. The median is the average of the two middle values (positions 3 and 4): 10.5
  4. Mode: every value appears once, so there is no mode
  5. Range = maximum − minimum = 21 − 3 = 18
mean5101520
values mean box plot (Q1–Q3, median)
Sorted data

3, 7, 9, 12, 15, 21

How the median is found

  1. Sort the values from smallest to largest.
  2. Odd count: the median is the middle value, at position (n + 1) ÷ 2.
  3. Even count: average the two middle values.

12, 3, 7, 21, 9, 15 sorted is 3, 7, 9, 12, 15, 21; the middle pair is 9 and 12, so the median is 10.5.

Median vs mean

The median ignores how extreme the largest and smallest values are, so it is the better “typical value” for skewed data — incomes, home prices, wait times. When the median and the mean are far apart, the data is skewed toward the mean. Step-by-step guide: how to find the median. Quartiles split the data further — see the IQR calculator.

Frequently asked questions

How do you find the median?

Sort the numbers; take the middle one, or the average of the two middle ones when the count is even.

What is the median of 12, 3, 7, 21, 9, 15?

10.5.

Can the median be a decimal?

Yes, when the count is even and the two middle values have an odd sum.

Is the median affected by outliers?

Very little — that is its main advantage over the mean.

Last reviewed November 2026. Results are rounded to 4 decimal places; all math runs in your browser.