Mean, Median, Mode Calculator
Calculate central tendency measures for a data set
How It Works
Overview
The mean, median, and mode are the three classic measures of central tendency — different ways to answer the question, "what is a typical value in this dataset?" Each one looks at the data differently, and the right choice depends on the shape of your data and what you're trying to communicate.
The mean averages every value equally, the median takes the middle of the sorted values, and the mode picks the most common value. They often disagree, and that disagreement is itself informative: when mean and median differ a lot, the data is skewed; when there are several modes, the data may be a mixture of groups. Reporting all three gives a much fuller picture than any one alone.
The Formula
The three measures, defined precisely:
- Mean — sum of all values divided by the count of values.
- Median — sort the values; for an odd count, take the middle one; for an even count, average the two middle values.
- Mode — the value (or values) that appear most often. If every value appears exactly once, there is no mode.
Mean uses every data point and is the most "efficient" estimator for symmetric distributions. Median uses only the order of the data, making it robust to outliers. Mode works for any data type including non-numeric categories.
Worked Example
Consider seven employee salaries (in thousands): 42, 45, 48, 50, 52, 55, 250.
- Sum = 542; Mean = 542 / 7 ≈ 77.4 ($77,400)
- Sorted middle value = Median = 50 ($50,000)
- Every salary is unique, so Mode = none
The mean ($77.4K) is much higher than the median ($50K) because of one executive at $250K. If you described "typical pay" using the mean you'd mislead — six of seven employees earn less than the mean. The median is the honest answer here. This is why publications report median household income, not mean household income.
For a different kind of dataset, dice rolls of {3, 5, 2, 5, 6, 1, 5, 4}: mean ≈ 3.875, median = 4.5, mode = 5. With low-outlier discrete data, all three are close.
When to Use This
- Symmetric data without outliers — the mean is the natural choice (test scores, heights).
- Skewed data (incomes, prices, response times) — report the median; the mean misrepresents the typical case.
- Categorical data (favorite color, product variant) — only the mode makes sense; means don't apply.
- Comparing two groups — comparing medians is more robust if either group has outliers.
- Detecting skew quickly — compute mean and median; their gap signals the direction and severity of skew.
Common Mistakes to Avoid
- Forgetting to sort before finding the median. The middle value of sorted data, not raw input order.
- Using the mean on a few salaries with one CEO. Outliers wreck the mean; one executive can quadruple it.
- Reporting "the average" without saying which. "Average" is ambiguous in everyday English; specify mean or median.
- Assuming no mode means a problem. Continuous data often has no mode; that's expected, not an error.
- Treating a bimodal dataset as one group. Two clear modes often mean two populations mixed together — investigate before averaging.
Frequently Asked Questions
Ad Space