Ad Space — Top Banner

Median Formula

Find the median of a data set.
The median is the middle value when data is sorted.
Learn how to handle both odd and even data sets.

The Formula

Odd count: Median = value at position (n + 1) / 2
Even count: Median = average of values at positions n/2 and (n/2 + 1)

The median is the middle value in a sorted data set. Unlike the mean, the median is not affected by extreme outliers.

Variables

SymbolMeaning
nThe total number of data values
(n + 1) / 2Position of the median when n is odd
n/2 and n/2 + 1Positions of the two middle values when n is even

Example 1 — Odd Number of Values

Find the median of: 7, 3, 12, 5, 9

Step 1: Sort the data — 3, 5, 7, 9, 12

Step 2: n = 5 (odd), so median position = (5 + 1) / 2 = 3rd value

Median = 7 — The third value in the sorted list.

Example 2 — Even Number of Values

Find the median of: 4, 8, 15, 22, 30, 42

Step 1: Data is already sorted — 4, 8, 15, 22, 30, 42

Step 2: n = 6 (even), so take the 3rd and 4th values

Step 3: Median = (15 + 22) / 2

Median = 18.5 — The average of the two middle values.

When to Use It

Use the median when:

  • Your data has outliers that would distort the mean (e.g., income data)
  • You want to find the "typical" value in a skewed distribution
  • Reporting real estate prices, salaries, or other data with extreme highs or lows
  • You need a more robust measure of central tendency

Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.