Median Calculator
Find the median of any data set with step-by-step explanation. Learn how to calculate the median for both odd and even-sized data sets, and understand why the median is often better than the mean for skewed data.
Table of Contents
- 1What Is the Median?
- 2How to Find the Median
- 3Step-by-Step Examples
- 4More Examples
- 5Mean vs. Median — When to Use Which
- 6Median and Skewed Data
- 7Median, Quartiles, and the Five-Number Summary
- 8Common Mistakes to Avoid
- 9Real-World Applications
- 10Practice Problems with Solutions
- 11Tips for Mastering the Median
- 12Final Thoughts
Find the Median
Enter your data values as comma-separated numbers. Click Calculate to find the median with step-by-step working.
Want to Truly Master Statistics and Data Analysis?
This calculator is great for quick checks — but real mastery comes from practice. Get the interactive workbook with 130 exercises covering mean, median, mode, range, quartiles, and data interpretation.
One-time purchase. No subscriptions. Free updates for life.
Median – Complete Explanation
The median is the middle value in a sorted data set. It divides the data into two equal halves — half the values are below the median and half are above. As a measure of central tendency, the median is often more robust than the mean because it is not affected by extreme outliers.
Median Definition
For an odd number of values (n): Median = value at position (n + 1) / 2 For an even number of values (n): Median = average of values at positions n/2 and n/2 + 1
1. What Is the Median?
The median is one of the three main measures of central tendency in statistics, alongside the mean (average) and mode (most frequent value). It represents the 50th percentile of the data — the point at which exactly half the data lies below and half lies above.
Think of the median as the "middle ground" of your data. If you line up all your values from smallest to largest, the median is the one standing in the center. Unlike the mean, it doesn't care how far away the extremes are — only their position matters.
2. How to Find the Median
Finding the median is a two-step process:
- Sort the data from smallest to largest. This step is crucial — the median only makes sense with ordered data.
- Find the middle:
- If there are an odd number of values, pick the exact middle value.
- If there are an even number of values, take the average of the two middle values.
3. Step-by-Step Examples
Example 1: Odd Number of Values
Find the median of: 3, 7, 1, 9, 5
Step 1: Sort the data from smallest to largest:
1, 3, 5, 7, 9
Step 2: Count the values: n = 5 (odd)
Step 3: Find middle position:
(n + 1) / 2 = (5 + 1) / 2 = 3rd position
Step 4: The 3rd value in the sorted list is 5.
Result: Median = 5
Example 2: Even Number of Values
Find the median of: 12, 8, 15, 6, 10, 4
Step 1: Sort the data from smallest to largest:
4, 6, 8, 10, 12, 15
Step 2: Count the values: n = 6 (even)
Step 3: Find the two middle positions:
Position 1: n/2 = 3 → 3rd value = 8
Position 2: n/2 + 1 = 4 → 4th value = 10
Step 4: Average the two middle values:
Median = (8 + 10) / 2 = 9
Result: Median = 9
4. More Examples
Example 1: 22, 18, 30, 25, 20
Sorted: 18, 20, 22, 25, 30 | n = 5 (odd) | Middle: 3rd value
Median = 22
Example 2: 45, 52, 38, 41, 49, 55
Sorted: 38, 41, 45, 49, 52, 55 | n = 6 (even) | Middle: 3rd & 4th values
Median = (45 + 49) / 2 = 47
Example 3: 7, 7, 7, 7, 7
Sorted: 7, 7, 7, 7, 7 | n = 5 (odd)
Median = 7 (all values are the same — median equals the value)
Example 4: 100, 2, 50, 75, 25, 10
Sorted: 2, 10, 25, 50, 75, 100 | n = 6 (even)
Median = (25 + 50) / 2 = 37.5
5. Mean vs. Median — When to Use Which
The choice between mean and median depends on the nature of your data:
Use the Mean when:
• Your data is symmetric with no extreme outliers.
• You need a value that incorporates every data point.
• You're performing further statistical calculations (the mean has better mathematical properties).
• Example: Heights of adult women in a population.
Use the Median when:
• Your data is skewed or contains outliers.
• You want the "typical" value that isn't distorted by extremes.
• You're reporting on income, housing prices, or other economic data.
• Example: Household income in a country (a few billionaires skew the mean).
6. Median and Skewed Data
In a skewed distribution, the mean is pulled toward the tail while the median stays near the center of the data. This makes the median the preferred measure for skewed data.
Skewness and Central Tendency
Right-skewed (positive skew): Mean > Median > Mode Left-skewed (negative skew): Mean < Median < Mode Symmetric: Mean ≈ Median ≈ Mode
Example — Income Data:
Five people earn: $30K, $35K, $40K, $45K, $2M
Mean = ($30K+$35K+$40K+$45K+$2000K) / 5 = $430,000
Median = $40,000
The median ($40K) accurately represents the "typical" income. The mean ($430K) is heavily distorted by the outlier and doesn't represent anyone in the group.
7. Median, Quartiles, and the Five-Number Summary
The median is the second quartile (Q₂) — the 50th percentile. Together with Q₁ (25th percentile) and Q₃ (75th percentile), it forms the core of the five-number summary:
Five-Number Summary
Minimum — Q₁ — Median (Q₂) — Q₃ — Maximum
This summary is used to create box plots and understand data distribution.
Example: Data: 4, 6, 8, 10, 12, 15
Sorted: 4, 6, 8, 10, 12, 15
Min = 4 | Q₁ = 6.5 | Median = 9 | Q₃ = 11.5 | Max = 15
8. Common Mistakes to Avoid
- Forgetting to sort the data: The median of unsorted data is meaningless. Always sort first.
- Using the wrong formula for even n: For even-sized data sets, you must average the two middle values — not just pick one.
- Confusing position with value: The median is a value from the data (or average of two values), not the index or position number.
- Assuming median = mean: They are different measures and coincide only in perfectly symmetric distributions.
- Ignoring duplicate values: Duplicates don't change the median calculation — they just sit next to each other in the sorted list.
9. Real-World Applications
- Economics: Median household income is reported instead of mean income to avoid distortion by extreme wealth.
- Real Estate: Median home price gives a better picture of the market than the average, which can be skewed by luxury properties.
- Education: Median test scores show how the "typical" student performed, unaffected by a few very high or very low scores.
- Healthcare: Median survival time in clinical trials — more informative than mean when a few patients live much longer.
- Sports Analytics: Median player salary reflects what the typical athlete earns, as opposed to the average inflated by superstar contracts.
- Data Science: Median is used in robust scaling and outlier detection algorithms.
- Demographics: Median age of a population is a key demographic indicator.
10. Practice Problems with Solutions
Problem 1: Find the median of 13, 19, 7, 25, 16.
Solution: Sorted: 7, 13, 16, 19, 25 → Middle (3rd): 16
Problem 2: Find the median of 42, 31, 56, 28, 37, 49.
Solution: Sorted: 28, 31, 37, 42, 49, 56 → Avg of 3rd & 4th: 39.5
Problem 3: Test scores: 88, 92, 75, 85, 95, 78, 82. Find the median.
Solution: Sorted: 75, 78, 82, 85, 88, 92, 95 → Middle (4th): 85
Problem 4: Which is larger — the mean or median of 1, 2, 3, 4, 100?
Solution: Median = 3, Mean = 22 → Mean is larger (right-skewed data)
11. Tips for Mastering the Median
- Always sort first — this is the most common mistake students make.
- For odd n, the median position is (n+1)/2 — count carefully from the beginning of the sorted list.
- For even n, identify both middle positions, then average their values.
- Use the median when you want to know what's "typical" in the presence of outliers.
- Remember that the median is not affected by how far the extremes are — only their rank matters.
- When reporting data, consider reporting both the mean and median to give a complete picture of central tendency.
- If mean and median are very different, your data is likely skewed — the median is usually more representative.
12. Final Thoughts
The median is a powerful and intuitive measure of central tendency that stands strong where the mean falls short. In a world full of outliers and skewed distributions — from income inequality to housing markets — the median cuts through the noise to reveal the true center of your data. It's no coincidence that economists, data scientists, and statisticians reach for the median when they need a robust, honest summary of what's "typical."
Mastering the median is a fundamental step in your statistics journey. Combined with the mean, mode, and quartiles, it gives you a complete toolkit for understanding and describing any data set. Use this calculator to check your work, but practice finding medians by hand until sorting and identifying middle values becomes second nature.
🚀 Ready to Go from Understanding to Mastery?
This article taught you the theory. The interactive workbook gives you the practice.
130 exercises • Instant feedback • Step-by-step solutions • Progress tracking
📚 Get the Workbook — $5.49Works offline in any browser. One-time purchase, free updates for life.