ใ€ฐ Median Calculator

Median

What is Median?

The median is the middle value in a sorted dataset. It divides the data into two equal halves and is less affected by extreme values (outliers) than the mean.

For odd count: Median = middle value
For even count: Median = average of two middle values

Example

Dataset: 3, 7, 1, 9, 4 โ†’ Sorted: 1, 3, 4, 7, 9 โ†’ Median = 4 (middle value)

Dataset: 2, 4, 6, 8 โ†’ Median = (4 + 6) / 2 = 5 (average of two middles)

Median for Odd vs Even Count

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

Example odd: {3, 7, 12, 18, 25} โ†’ Median = 12 (3rd value)
Example even: {4, 8, 11, 15, 20, 30} โ†’ Median = (11+15)/2 = 13

Median vs Mean โ€” When They Differ

When mean and median are far apart, it signals a skewed distribution:

ScenarioMeanMedianBetter Measure
Salaries: $30k,35k,32k,40k,$500k (CEO)$127.4k$35kMedian
Home prices with luxury mansionInflatedTypicalMedian
Test scores (no outliers)FairFairEither
Symmetric bell curve= Median= MeanEither

Quartiles and Percentiles

The median is the 50th percentile (Qโ‚‚). Quartiles divide sorted data into 4 equal parts:

Q1 (25th percentile) = median of lower half
Q2 (50th percentile) = median of whole dataset
Q3 (75th percentile) = median of upper half
IQR (Interquartile Range) = Q3 โˆ’ Q1

Real-World Uses of Median

  • Housing market: Median home price is the standard measure (not mean, which is skewed by mansions)
  • Household income: Government statistics use median income to represent a "typical" household
  • Medical research: Median survival time in clinical trials
  • Education: Standardized test score percentiles (SAT, GRE)

Frequently Asked Questions

What is the difference between mean and median? โ–ผ
Mean is the arithmetic average (sum รท count), while median is the middle value when data is sorted. Median is more robust to outliers. For example, in income data, median better represents typical income.
When should I use median instead of mean? โ–ผ
Use median when your data has outliers or skewed distribution. For example, house prices, salaries, or any dataset where extreme values could distort the average.
What if two numbers are in the middle? โ–ผ
When there is an even count of numbers, the median is the average (mean) of the two middle numbers.