Median Calculator
Free median calculator: find the median, mean, mode, and range of any dataset. Enter numbers and get complete descriptiv
Calculator
Your Results
Enter your values and click Calculate to see results
How the Median Calculator Works
The median calculator finds the middle value of a data set after sorting it in order. For an odd number of values: the median is the exact middle value at position (n+1)/2. For an even number of values: the median is the average of the two middle values at positions n/2 and n/2+1.
Example (odd): Data set {3, 7, 2, 9, 4}. Sorted: {2, 3, 4, 7, 9}. Middle position: (5+1)/2 = 3rd value = 4. Example (even): Data set {3, 7, 2, 9, 4, 6}. Sorted: {2, 3, 4, 6, 7, 9}. Middle two values: 4 and 6. Median = (4+6)/2 = 5.
How to Find the Median: Step-by-Step
- Step 1: List all values in your data set
- Step 2: Sort them from smallest to largest (ascending order)
- Step 3: Count the total number of values (n)
- Step 4a: If n is odd → median = the value at position (n+1)/2
- Step 4b: If n is even → median = average of values at positions n/2 and (n/2)+1
Extended example: Test scores for 9 students: {88, 72, 95, 67, 83, 91, 79, 85, 77}. Sorted: {67, 72, 77, 79, 83, 85, 88, 91, 95}. n=9 (odd). Position = (9+1)/2 = 5. The 5th value = 83. The class median score is 83.
Mean Median Mode Calculator: When to Use Each Measure
The three measures of central tendency serve different purposes:
- Mean (average): Sum of all values ÷ count. Uses every data point; sensitive to outliers. Best for symmetric distributions without extreme values. Example: average test score across a class.
- Median: Middle value; ignores extreme outliers. Best for skewed distributions or when outliers would distort the average. Example: median household income is more representative than mean income because a few billionaires dramatically inflate the mean.
- Mode: Most frequently occurring value. Best for categorical data or finding the most common value. Example: most common shoe size sold, most popular answer on a survey.
Classic comparison: U.S. household income in 2023. Mean household income: approximately $105,000 (pulled up by high earners). Median household income: approximately $74,580 (half of households earn more, half less — much more representative of "typical" American experience). The difference between mean and median is a direct measure of income inequality and distribution skew.
Statistical Median Calculator: Range, Quartiles, and IQR
The median is the foundation for quartile analysis:
- Q1 (1st quartile / 25th percentile): Median of the lower half of data
- Q2 (2nd quartile / 50th percentile): The median itself
- Q3 (3rd quartile / 75th percentile): Median of the upper half of data
- IQR (Interquartile Range): Q3 − Q1. Measures the spread of the middle 50% of data, robust to outliers.
- Outlier detection: Values below Q1 − 1.5×IQR or above Q3 + 1.5×IQR are typically flagged as outliers (box plot whisker rule).
Example with data {2, 4, 5, 7, 8, 10, 12, 15, 18}: Median = 8. Q1 = median of {2,4,5,7} = (4+5)/2 = 4.5. Q3 = median of {10,12,15,18} = (12+15)/2 = 13.5. IQR = 13.5 − 4.5 = 9. Outlier threshold: below 4.5 − 13.5 = −9 (none) or above 13.5 + 13.5 = 27 (none). No outliers in this data set.
Frequently Asked Questions
When is the median equal to the mean?
The median equals the mean when the data distribution is perfectly symmetric — when the values are evenly distributed around the center point. A normal distribution (bell curve) has mean = median = mode. In practice, perfect symmetry is rare. Any skew causes divergence: right-skewed distributions (long tail to the right, like income) have mean > median. Left-skewed distributions have mean < median.
Can there be more than one median?
Technically, when n is even, the median is defined as the average of the two middle values — so there's still one median value. However, some statistical conventions define ANY value between the two middle values as a valid median, making it a range rather than a point. Most practical applications use the midpoint formula. For grouped frequency distributions, the median is estimated as a value within a class interval using interpolation.
Why is the median used for house prices instead of the average?
Real estate prices are right-skewed — a handful of extremely expensive luxury properties would dramatically inflate the average. If 9 houses sold for $300,000 and one sold for $3,000,000, the mean price is $570,000 — giving the impression of a much more expensive market than most buyers experience. The median ($300,000) accurately represents what the "typical" buyer paid. This is why real estate reports always lead with median sale price.