Home / Statistics

Mean, Mode and Median

Three different answers to “what is a typical value?” — and they disagree more often than you would think. Add one billionaire to the room and watch only one of them survive.

Controls


Click the chart to add a value there. Each bar is a count of data points.

Distribution with All Three Averages

click to add a value

Live Calculation

mean
0
median
0
mode
0
n
0

Overview

The three measures

The arithmetic mean is the total of the values divided by how many values there are. The median is the middle value after sorting; with an even number of values, it is the average of the two middle values. The mode is the most frequent value. These answer related but different questions: balance point, halfway point, and most common value.

For 2, 3, 3, 4, 18, the mean is 6, the median is 3, and the mode is 3. The value 18 pulls the mean above the other summaries. Changing the mean, median, or mode is not a disagreement about arithmetic: each measure defines “centre” differently.

Mean, Median and Mode

Mean, median, and mode are three different summaries of a dataset’s centre. They can disagree, and that disagreement often tells you something about the data.

Work through an example

For the sorted data 2, 3, 3, 4, 18:

  1. Add the five values: 2 + 3 + 3 + 4 + 18 = 30. Divide by 5 to get the mean, 6.
  2. The third value is in the middle, so the median is 3.
  3. The value 3 appears twice and every other value appears once, so the mode is 3.

Now replace 18 with 100. The mean rises from 6 to 22.4, but the median remains 3 and the mode remains 3. This is why the mean is sensitive to extreme values, while the median is resistant: one very large or small observation usually moves the mean more. Resistance does not mean the median is always more accurate; it means it responds differently to extremes.

Which one should I use?

SummaryWhat it tells youOften useful whenMain limitation
MeanThe arithmetic balance point; every value contributesValues are numerical and a typical deviation from the centre matters, especially for roughly symmetric dataA few extreme values can move it substantially
MedianThe halfway point in the ordered dataNumerical data are skewed or contain extreme observations; it is also useful for ordinal rankingsIt does not use the exact distances between all values
ModeThe value or category that occurs most oftenYou need the most common category, size, response, or repeated valueA dataset can have several modes or no informative mode

For a roughly symmetric set of measurements without strong outliers, the mean often gives a useful centre and works naturally with variance and many statistical models. For a strongly right-skewed quantity such as income, the median often better describes the middle person because a few very large values pull up the mean. For nominal categories such as transport type, the mean and median may not make sense, but the mode identifies the most frequent category. For ordered ratings, a median can be meaningful even if the gaps between rating levels are not equal.

Do not choose by a slogan. Ask what “typical” should mean for the decision, whether distances between values are meaningful, and whether the distribution has a long tail or separate clusters. A mean and median can both hide multiple groups; inspect a plot or report the groups when that structure matters.

Modes, ties, and small samples

There can be no mode that is useful when every value occurs once, or several modes when values tie for highest frequency. Some books call such a dataset “no mode”; others report all tied modes. State the convention if the distinction matters. A category may be modal even though its numeric code has no arithmetic meaning—for example, the mode of labels 1, 2, and 3 can be reported, but averaging those labels usually cannot.

With two middle values, the median need not be an observed value. For 2, 3, 8, 10, the median is (3 + 8) / 2 = 5.5. It marks the midpoint of the two central observations, not a claim that anyone scored 5.5.

Try this above

Add a very large value and watch which measure changes most. Then make a second category as frequent as the current mode and check how the displayed mode handles a tie. Compare the result with quantiles and percentiles, which generalise the median to other positions, and mean, variance, and standard deviation, which pair the mean with measures of spread.

Sources and next steps

Predict, then reveal

About to run: switch Distribution shape to Flat / uniform. Before it does — what happens to the readout?

Committing to an answer first is the point — the reveal runs the experiment on the visualisation above and reads the real value back, so nothing here is scripted.

Check yourself

0 of 2

Answer without scrolling back up.

  1. Which measure is usually least affected by one extreme outlier?

  2. Which measure can summarise a categorical variable?

Cheat sheet

Mean, Mode and Median

Compare three measures of typical: the mean that outliers drag, the median that resists them, and the mode that works on categories.

MATHS · vizlearn.in/maths/mean_mode_and_median.html

About the author

Ashish Jangra builds and maintains VizLearn. Every module here is written and the visualisation behind it hand-built, so the numbers in a readout come from the same code that draws the picture. Corrections are genuinely welcome and get priority over everything else — if a page states something wrong, or an animation misrepresents what the algorithm does, get in touch.