Statistics & Probability
Basic

Median

The middle value separating the higher and lower halves.

Formula

M=middle value of ordered dataM = \text{middle value of ordered data}

Variables

x_iOrdered data values

Example

For 3, 1, 4, 1, 5 sorted to 1, 1, 3, 4, 5, the median is the middle value, 3.

How it works

The median is the central value in a data set after the numbers are put in order from smallest to largest. Because it depends on position rather than the size of every value, it gives a stable measure of center even when there are very large or very small outliers. If there is an odd number of values, the median is the single middle value; if there is an even number, it is found by averaging the two middle values.

When to use it

Use the median when you want a typical value that is not strongly affected by extreme numbers, such as incomes, house prices, or test scores with outliers. It is especially useful for skewed data where the mean may be misleading.

Worked example, step by step

Data: 8, 2, 10, 6, 4, 12 Step 1: Order the data from least to greatest: 2, 4, 6, 8, 10, 12 Step 2: There are 6 values, so the median is the average of the 3rd and 4th values Step 3: Middle values = 6 and 8 Step 4: Median = (6 + 8) / 2 = 14 / 2 = 7 Final answer: M = 7

Common mistakes to avoid

  • Forgetting to sort the data before finding the middle value
  • Using the mean instead of the median when there are an even number of values
  • Picking the middle number from the original list instead of the ordered list

Did You Know?

The median resists outliers: one billionaire walking into a room barely moves it, but wrecks the mean.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026