Skip to content

How to Find the Median: Formula with Examples

All Calculators Practice Questions

The median is the middle value of the sorted data. It answers the question “what does a typical value look like?” without letting one extreme value decide the answer.

The rule

  • Odd count: sort the values, then take the one in the middle position, which is (n + 1) ÷ 2.
  • Even count: sort the values, take the two in the middle, and average them.

Worked example: odd count

For 12, 15, 15, 18, 20 the sorted list is 12, 15, 15, 18, 20. Position (5 + 1) ÷ 2 = 3 holds 15, so the median is 15.

Worked example: even count

For 1, 2, 3, 4 the sorted list is 1, 2, 3, 4. The middle positions are 2 and 3, holding 2 and 3, so the median is (2 + 3) ÷ 2 = 2.5.

Notice that 2.5 is not one of the values in the dataset. That is completely normal: with an even count the median is often a value that was never entered.

Worked example: negative numbers

For −5, −10, 3, 7 the sorted list is −10, −5, 3, 7, because negative numbers sit to the left of zero. The middle positions are 2 and 3, so the median is (−5 + 3) ÷ 2 = −1.

Why sorting matters

Without sorting, the middle of the list you typed means nothing. The order you enter values in never affects the mean, but it decides everything about the median, which is why every median result shows the sorted data beside it.

Common mistakes

  • Forgetting to sort first, and taking the middle of the typed order instead.
  • Taking one of the two middle values instead of averaging them when the count is even.
  • Placing negative numbers after positive numbers. They are smaller, so they come first.
  • Assuming the median must be a whole number. It can be a decimal, including when every value you typed was a whole number.

Finding the middle after sorting

The median describes the middle of an ordered list. For 9, 2, 6, 4, 11, first sort the values to 2, 4, 6, 9, 11. There are five values, so the third value, 6, is the median. If there are six values, take the average of the third and fourth values. For 2, 4, 6, 9, 11, 15, that is (6 + 9) divided by 2, or 7.5.

Why the median resists extreme values

The median can be useful when a single extreme number would pull the mean away from most observations. For example, 10, 11, 12, 13, 100 has median 12, even though the mean is 29.2. Sorting is the most important first step. Repeated numbers still occupy their own positions.

Frequently asked questions

Should I sort before finding the median?

Yes. Put all observations in numerical order first.

Can the median be between two values?

Yes. For an even count, it may not be in the original list.

Do repeated numbers count separately?

Yes. Each observation counts as one position.

Sort and test a fresh list with the median calculator to see the middle value.

For extra study, see the printable statistics formulas cheat sheet.

Last updated:

How are these results calculated?

The calculator uses the median-of-halves method for quartiles. For an odd number of values, the middle value is included in both halves. Percentiles use linear interpolation with position (p ÷ 100) × (n − 1). Other tools may use different rules.

Method and references

For an independent explanation of statistical methods, see the NIST/SEMATECH e-Handbook of Statistical Methods. This is a reference for general methods, not a claim of endorsement or external review. Check the calculator’s displayed steps for the exact operation used.

Scroll to Top