How to Find Mean, Median, Mode, and Range Step-by-Step
In descriptive statistics, Mean, Median, and Mode summarize the "typical" center of a dataset (measures of central tendency), while Range and Interquartile Range (IQR) describe how widely the numbers spread out (measures of dispersion). Let's walk through each calculation using a practical example dataset of 7 quiz scores: [18, 24, 15, 24, 21, 32, 27] (sorted ascending as [15, 18, 21, 24, 24, 27, 32]):
1. Mean (Arithmetic Average)
Sum of all values divided by total count
Example: For [15, 18, 21, 24, 24, 27, 32], add all 7 scores (Σx = 161) and divide by n = 7 to get x̄ = 23.
2. Median (50th Percentile)
Exact middle value of the sorted dataset
Example: Sorted ascending, item (7 + 1) / 2 = 4th value in [15, 18, 21, 24, 24, 27, 32] is 24. If n is even, average the two middle numbers.
Count Value Frequencies: Scan the sorted list for repeating numbers. In [15, 18, 21, 24, 24, 27, 32], 24 appears twice while all others appear once, making it Unimodal (Mode = 24). Two tied peaks create a Bimodal set; equal frequencies across all distinct values yield No Mode.
Subtract Minimum from Maximum: Range = Max − Min = 32 − 15 = 17. Range gives a quick snapshot of total width, though a single outlier can stretch it dramatically.
Find the Middle 50% Spread: Split the sorted data at the median. The median of the lower half [15, 18, 21] is Q1 = 18, and the median of the upper half [24, 27, 32] is Q3 = 27. Thus, IQR = 27 − 18 = 9.
Multiplicative Growth Average: For strictly positive numbers (xi > 0), the Geometric Mean is the n-th root of their product: GM = (x₁ × x₂ × … × xₙ)1/n, widely used for compound investment returns and biological growth rates.
When to Use Median vs. Mean: Skewed Data & Outliers
A critical skill in data analysis is knowing when the arithmetic mean misleads. Consider 5 employees at a startup earning $52k, $55k, $58k, $60k, and a founder earning $975k:
- The Mean is $240,000: Pulled upward by the single outlier, $240k represents none of the employees accurately—80% of the team earns less than a quarter of the "average."
- The Median is $58,000: Unaffected by whether the top earner makes $150k or $10M, the median pinpoints the true typical salary right in the center of the workforce.
| Metric | Best Data Type & Distribution | Sensitivity to Outliers | Real-World Examples |
|---|---|---|---|
| Mean (x̄) | Continuous / numerical data with a symmetric (normal) distribution | High — pulled toward extreme highs or lows | Standardized exam scores, manufacturing tolerances, daily temperatures |
| Median (M) | Numerical or ordinal data with skewed distributions or outliers | Very Low (Robust) — resistant to extreme values | Household income, real estate prices, web server response latency |
| Mode (Mo) | Categorical, nominal, or discrete data with repeating peaks | None — depends strictly on peak frequency | Most popular shoe size sold, most common defect code, customer rating |
| IQR vs. Range | Pair IQR with Median for skewed data; pair SD / Range with Mean | IQR ignores top/bottom 25%; Range uses 2 extremes | Salary bands (25th to 75th percentile), medical reference ranges |
Frequently Asked Questions (FAQ)
[4, 9, 12, 17] where each appears once, or [2, 2, 5, 5] where every distinct value appears twice), no single value stands out as most frequent, so there is No Mode.
n / 2 and (n / 2) + 1, add them together, and divide by 2. For example, in the 6-number dataset [8, 12, 15, 21, 24, 30], the 3rd and 4th numbers are 15 and 21, giving a median of (15 + 21) ÷ 2 = 18.
Explore Our Free Calculator Series
Fast, privacy-first math & statistical utilities running 100% in your browser.