Mean, Median, and Mode
Learn the basics of mean, median, and mode with clear examples and bar chart visualizations.
Understanding Mean, Median, and Mode
When studying statistics, three key concepts always appear: mean, median, and mode.
They are all measures of “central tendency,” but each has a different meaning and method of calculation.
In this article, we’ll cover:
- The definition and calculation of mean, median, and mode
- The differences between them
- How they behave when there are outliers
Let’s explore what makes them different!
1. Mean
The mean is the most commonly used measure of central tendency.
It is calculated by summing all data values and dividing by the number of values:
Example: If the data is ,
On a bar chart, the mean is shown as a vertical line that often falls near the center of the bars.
2. Median
The median is the “middle value” when the data is arranged in order.
The calculation depends on whether the number of data points is odd or even:
- If odd: the single middle value
- If even: the average of the two middle values
Example 1: Data (5 values, odd) → Median =
Example 2: Data (6 values, even) → Median =
On a bar chart, the median is shown as a vertical line splitting the dataset into two halves.
3. Mode
The mode is the value that appears most frequently.
It corresponds to the tallest bar in a bar chart.
Example: For ,
the tallest bar is at 4, so the mode = 4.
4. Example Showing the Differences
Consider the dataset :
- Mean =
- Median = 2 (middle value)
- Mode = 2 (most frequent value)
On a bar chart:
- The mode appears clearly as the tallest bar at 2.
- The median is at the middle of the distribution.
- The mean is shifted far to the right because of the outlier (100).
This shows how mean can be misleading in skewed data, while median and mode remain more representative.
5. Summary
- Mean: Good for overall balance, but sensitive to outliers.
- Median: More robust against outliers.
- Mode: Useful when identifying the most common value.
Interactive Demo
The tool below comes with three preset datasets:
- Preset 1: Evenly spaced data →
[2, 4, 6, 8, 10] - Preset 2: With an outlier →
[1, 2, 2, 2, 100] - Preset 3: Strong mode →
[2, 2, 3, 4, 4, 4, 5]
Switch between them to see how mean, median, and mode behave.
The results will be displayed on a bar chart, making the differences easy to spot.
Once comfortable, try entering your own dataset!
Interactive Mean, Median, and Mode Demo
Frequency Bar Chart
Mean (Average)
Sum of all values ÷ number of values
Red dashed line on chart
Median (Middle)
Middle value when sorted
Blue solid line on chart
Mode (Most Frequent)
Most frequently occurring value(s)
Green bars on chart
Chart Elements:
Key Observations:
- • Preset 1: Evenly distributed data shows all measures close together
- • Preset 2: The outlier (50) pulls the mean far right, but median stays at the center of the main data
- • Preset 3: The mode (4) is clearly visible as the tallest green bar
- • Bar spacing: Shows actual numerical distances between values
- • Green highlighting: Makes the mode(s) easy to identify at a glance