Article — Mean, Median, Mode Calculator
Mean, Median, Mode: The Three Measures of Central Tendency
Mean, median, and mode are the three classical measures of central tendency. The mean is the arithmetic average (sum ÷ count). The median is the middle value after sorting. The mode is the value that appears most often. They agree on symmetric data and diverge on skewed distributions.
Together they summarise a data set in a single number — sometimes the same number, sometimes three different numbers that each tell a different story. The mean drives most parametric statistics. The median dominates real-estate listings and salary reports. The mode is essential when data is categorical. This guide covers the math, the trade-offs, and the field-tested mistakes.
What is central tendency?
Central tendency is the technical term for the "centre" of a distribution. Given a list of numbers, what single value best represents the typical observation? There is no universal answer — only three candidate definitions, each with different properties.
The mean uses every value with equal weight. The median uses only rank order. The mode uses only frequency. Which one matters depends on what you want to know and how clean your data is.
The term "average" colloquially means the arithmetic mean, but historically it meant the median. The shift began in the 18th century when astronomers started averaging observations to reduce error. By the late 1800s, "average" and "mean" had merged in common usage.
Mean, median, mode formulas
Each measure has a precise definition. The mean is symbolic; the median is positional; the mode is frequency-based.
Mean x̄ = (∑ xi) / nMedian (odd n) middle value of sorted listMedian (even n) average of two middle valuesMode most frequent value(s)Mean vs median vs mode
The classic textbook example: the data set [2, 4, 4, 4, 5, 5, 7, 9].
- Mean = (2+4+4+4+5+5+7+9) / 8 = 40 / 8 = 5.0
- Median = (4 + 5) / 2 = 4.5 (average of 4th and 5th values when sorted)
- Mode = 4 (appears three times)
- Range = 9 - 2 = 7
- Standard deviation ≈ 2.0
For symmetric data, all three are similar. For skewed data, they spread apart. The order of magnitude of separation between them is itself a measure of skewness.
When to use mean, median, or mode
The choice depends on data type and distribution shape.
Mean is the default for normally-distributed continuous data, where mean and median coincide and the mean carries more information. Median is the default for income, home prices, response times, and any other variable with a long right tail. Mode is the default for categorical data — favourite colour, party affiliation, shoe size.
Skewed distributions and central tendency
In a perfectly symmetric distribution, mean = median = mode. As skew increases, these values pull apart in predictable ways.
- Right-skewed (income, home prices): mean > median > mode. A few high values pull the mean up.
- Symmetric (heights, test scores): mean ≈ median ≈ mode.
- Left-skewed (exam pass rates, lifespan): mean < median < mode. A few low values pull the mean down.
- Bimodal: two modes, no single central tendency. Often signals a mixed population.
A quick skew check: compute both mean and median. If they're within 5% of each other, the data is approximately symmetric. If they differ by more than 20%, the data is meaningfully skewed and you should use the median for typical summaries.
Beyond mean, median, and mode
For richer summaries, statisticians use additional measures.
Trimmed mean. Discard the top and bottom k% before averaging. Olympic judges use a trimmed mean (drop high and low score) to reduce judge bias.
Geometric mean. The nth root of the product of n values. Used for growth rates and returns. The geometric mean of 1.05 and 0.95 is 0.9987, not 1.0 — the right "average" for two consecutive percentage changes.
Harmonic mean. The reciprocal of the average of reciprocals. Used for rates (average speed across equal distances at different speeds).
Percentiles and quartiles. The median is the 50th percentile. The 25th and 75th percentiles bound the interquartile range, a popular robust spread measure.
Common mean-median-mode mistakes
Three patterns that lead to wrong conclusions.
The "average household income" frequently quoted as $80,000+ in the US is the mean, not the median. The median household income is closer to $80,610 (US Census Bureau, 2023 ACS). The mean is pulled up by very high earners. Always check which average is being reported.
- Using mean on skewed data — misleads about the typical value.
- Reporting mode for continuous data — unstable; group into bins first.
- Forgetting Bessel's correction — sample SD divides by (n-1), not n.
- Treating mode as unique — many data sets are amodal or multimodal.
- Mixing up mean of means — average of group means is only correct if groups are equal-sized.
- Ignoring outliers without justification — sometimes the outlier is the most important observation.
Worked examples
Three realistic data sets where the choice of measure matters.
Test scores [78, 82, 85, 89, 91]. Mean = 85, median = 85, mode = none. Symmetric, so any measure works. Mean is preferred because it can feed into further analysis (variance, hypothesis testing).
Household incomes [$40k, $45k, $48k, $52k, $1.2M]. Mean = $277k, median = $48k. The four typical households earn $40–52k. The mean is grossly misleading; the median represents the population fairly.
T-shirt sizes [S, M, M, L, M, L, S, M, XL]. No mean or median (categorical). Mode = M, the most frequent size. Restock M first.
One subtlety that catches people out: median doesn't require numeric data, only ordered data. Movie ratings (G, PG, PG-13, R, NC-17) can have a median rating because the categories have a clear order. Mean cannot be computed on ordinal data without first assigning numerical values, which introduces arbitrary distance assumptions.
Another mistake worth flagging: averaging averages. If you have three groups with mean test scores of 70, 80, and 90, the overall mean is only 80 if the groups are the same size. With group sizes 100, 50, and 10, the true mean is (100×70 + 50×80 + 10×90) / 160 = 74.4, not 80. Always use a weighted mean when group sizes differ.
A final consideration is the difference between population and sample statistics. The population mean μ is a parameter — a fixed but typically unknown number for the entire population of interest. The sample mean x̄ is a statistic computed from your observed data, an estimate of μ. The calculator above reports sample statistics by default. For inferential purposes (confidence intervals, hypothesis tests), the sample SD with Bessel's correction is the right input.