Mean / Median / Mode Comparison Visualizer
Dataset A
Dataset B
Example Datasets
Click any example to load it into the visualizer above
Mean, Median, and Mode: The Three Measures of Central Tendency
Central tendency describes the center of a dataset — where values cluster. Three statistics measure it: the mean (arithmetic average), the median (middle value in sorted order), and the mode (most frequently occurring value). Each answers the same question — "what is a typical value?" — but from a different angle, and each has real advantages depending on your data's shape and what you need to communicate.
In a perfectly symmetric, bell-shaped distribution, all three sit at the same point. Real data rarely behaves that way. A single extreme value can drag the mean far from the bulk of the data while leaving the median unchanged. That one difference determines which statistic belongs in a news headline, a research paper, or a business report.
Arithmetic Mean
The mean sums every value and divides by the count. It uses every data point, which gives it high statistical efficiency — but also makes it sensitive to outliers. Remove or add one extreme value and the mean shifts. That's why income reports use median household income rather than mean: a handful of billionaires would pull the average far above what most families earn.
Median
Sort the dataset from smallest to largest. If the count is odd, the median is the exact middle value. If even, it is the mean of the two middle values. The median is resistant to outliers because extreme values only count as "one observation" — they cannot pull the median toward the tail. Real estate professionals, economists, and epidemiologists favor the median for this reason.
| n (count) | Median position | Example dataset | Median |
|---|---|---|---|
| Odd (n = 5) | Position (n+1)/2 = 3rd value | 2, 4, 7, 11, 15 | 7 |
| Even (n = 6) | Average of positions n/2 and n/2+1 | 2, 4, 7, 11, 15, 20 | (7+11)/2 = 9 |
| Even with outlier (n = 6) | Same positions — outlier ignored | 2, 4, 7, 11, 15, 9,000 | 9 (unchanged) |
Mode
The mode is the value that appears most often. Unlike the mean and median, it can be used with non-numeric data — survey responses, colors, product categories. A dataset can have no mode (all values unique), one mode (unimodal), or multiple modes (bimodal, multimodal). A bimodal distribution often signals two distinct subgroups in the data, which is itself an important finding.
How Skewness Separates the Three Measures
Skewness is the key to reading which measure matters. In a right-skewed (positively skewed) distribution — common in income, property prices, and waiting times — the long tail stretches to the right and pulls the mean in that direction. The sequence becomes mode < median < mean. In a left-skewed distribution the tail pulls left and the order reverses: mean < median < mode. This pattern, known as Pearson's empirical relationship, is captured in the approximation: Mode ≈ 3·Median − 2·Mean.
| Distribution type | Order of measures | Best measure | Real-world examples |
|---|---|---|---|
| Symmetric / Normal | Mean = Median = Mode | Mean or median (equal) | Exam scores, heights, measurement errors |
| Right-skewed (positive) | Mode < Median < Mean | Median | Income, housing prices, reaction times |
| Left-skewed (negative) | Mean < Median < Mode | Median | Age at retirement, test score floors |
| Bimodal | Two modes; mean between peaks | Mode (both peaks) | Mixed populations, two product price points |
Worked Examples: When the Choice of Measure Changes the Story
Decision Matrix: Choosing the Right Measure
| Measure | Best for | Sensitive to outliers? | Data types | When to avoid |
|---|---|---|---|---|
| Mean | Symmetric distributions, hypothesis testing, inferential stats | Yes — high sensitivity | Continuous, interval, ratio | Skewed data, extreme outliers present |
| Median | Skewed data, income/price distributions, ordinal data | No — outlier-resistant | Ordinal, interval, ratio | When every data point's magnitude matters |
| Mode | Categorical data, inventory, most popular item | No | Nominal, ordinal, discrete | Continuous data with no repeating values |
Related Topics on Statistics Fundamentals
Sources & further reading:
- NIST/SEMATECH e-Handbook of Statistical Methods — Measures of Location
- Khan Academy — Mean, Median, and Mode Review
- Gravetter, F.J. & Wallnau, L.B. (2016). Statistics for the Behavioral Sciences, 10th ed. Cengage Learning.
- U.S. Census Bureau — Why the Census reports median household income
Frequently Asked Questions
The mean is the sum of all values divided by the count — it uses every data point. The median is the middle value when the dataset is sorted in ascending order; half the data falls above it, half below. The mode is the value that appears most frequently. In a symmetric distribution all three are equal; in a skewed distribution they diverge, with the mean pulled toward the long tail while the median remains anchored near the center.
Use the median whenever your data is skewed or contains outliers that could distort the mean. Income distributions, housing prices, and test scores with hard ceilings or floors are classic examples. The U.S. Census Bureau reports median household income precisely because a small number of very high earners would push the mean well above what most families actually bring home.
Yes. When two values share the highest frequency, the dataset is bimodal. Three or more equally frequent peak values make it multimodal. If every value appears exactly once, there is no mode at all. Bimodal distributions often reveal that two distinct groups are mixed together in the data — for example, measuring heights of a combined male and female population.
The mean is the arithmetic average, so every value — including an extreme one — contributes its full magnitude to the sum. One very large or very small observation shifts the mean substantially. The median only cares about position (which value sits in the middle), not magnitude. Adding a single extreme outlier to a dataset moves it from position n to position n+1 in the sorted list, but the middle value shifts by only half a position — a negligible change. This resistance to outliers is the median's defining statistical property.
If mean > median, the distribution is right-skewed (positive skew) — there are a few high values pulling the mean up. If mean < median, the distribution is left-skewed (negative skew). When mean ≈ median, the distribution is roughly symmetric. This relationship is formalized in Pearson's empirical rule: Mode ≈ 3·Median − 2·Mean, which works well for moderately skewed unimodal distributions. The visualizer above shows this separation on the histogram in real time as you change your dataset.
The median is the standard choice for salary and income data. Salary distributions are almost always right-skewed: most workers cluster around lower to middle pay, with a smaller number of high earners extending the tail. The mean gets pulled toward those high earners and overstates what a typical worker makes. The median gives the value that splits the workforce exactly in half — a far more representative figure for most purposes. For the most common salary at a firm, the mode is also informative alongside the median.