Maths4 min readUpdated Apr 2, 2026

How to Calculate Mean, Median, and Mode

Learn the formulas for mean, median, and mode with worked examples, and discover when to use each measure of central tendency.

Key Takeaways

  • The mean (average) is calculated by dividing the sum of all values by the count of values.
  • The median is the middle value in a sorted dataset, unaffected by extreme outliers.
  • The mode is the most frequently occurring value and a dataset can have zero, one, or multiple modes.
  • Use the mean for symmetric data, the median for skewed data, and the mode for categorical data.
  • In a perfectly symmetric distribution, the mean, median, and mode are all equal.

What Is Central Tendency?

Central tendency is a statistical concept that identifies a single value representing the "center" or "typical value" of a dataset. The three most common measures of central tendency are the mean, median, and mode. Each measure answers the same question differently: "What is a typical value in this data?" Choosing the right one depends on the shape of your data and the question you are trying to answer.

How to Calculate the Mean

The mean, often called the arithmetic average, is found by adding all data points together and dividing by the total count.
Mean Formula
xˉ=i=1nxin\bar{x} = \frac{\sum_{i=1}^{n} x_i}{n}
Where x represents each data value and n is the total number of values. Worked Example: Find the mean of: 4, 8, 6, 5, 3, 2, 8, 9, 2, 5
#
Step-by-Step
3 steps
1
Add all values: 4 + 8 + 6 + 5 + 3 + 2 + 8 + 9 + 2 + 5 = 52
2
Count the values: n = 10
3
Divide: 52 / 10 = 5.2
The mean is 5.2. One important limitation is that the mean is sensitive to outliers. If one value in the dataset above were changed to 100, the mean would jump to 14.6, which no longer represents a "typical" value.

How to Find the Median

The median is the middle value when all data points are arranged in ascending order. It divides the dataset into two equal halves.
Median Formula
If n is odd:Median=(n+12)thvalue\text{If } n \text{ is odd:} \quad \text{Median} = \left( \frac{n + 1}{2} \right)\th \text{value}
If n is even:Median=(n2)th+(n2+1)th2\text{If } n \text{ is even:} \quad \text{Median} = \frac{ \left( \frac{n}{2} \right)\th + \left( \frac{n}{2} + 1 \right)\th }{2}

where n = number of values in the dataset

Worked Example (odd count): Find the median of: 3, 7, 1, 9, 5
#
Step-by-Step
4 steps
1
Sort the data: 1, 3, 5, 7, 9
2
Count: 5 values (odd)
3
Middle position: (5 + 1) / 2 = 3rd value
4
Median = 5
Worked Example (even count): Find the median of: 4, 8, 6, 2
#
Step-by-Step
4 steps
1
Sort the data: 2, 4, 6, 8
2
Count: 4 values (even)
3
Two middle values: 4 and 6
4
Median = (4 + 6) / 2 = 5
The median is especially useful when data contains outliers, because unlike the mean, a single extreme value cannot distort it.

How to Identify the Mode

The mode is the value that appears most frequently in a dataset. It is the only measure of central tendency that can be used with categorical (non-numeric) data.
Mode Definition
Mode=value with max(fi)\text{Mode} = \text{value with } \max(f_i)

where f is the frequency (count) of each value in the dataset

Worked Example: Find the mode of: 4, 2, 7, 2, 9, 4, 2, 5
#
Step-by-Step
3 steps
1
Count each value: 2 appears 3 times, 4 appears 2 times, others appear once
2
Highest frequency: 3 (the value 2)
3
Mode = 2
A dataset can be: - Unimodal: one mode (e.g., 2, 3, 3, 5 has mode 3) - Bimodal: two modes (e.g., 1, 2, 2, 5, 5, 7 has modes 2 and 5) - Multimodal: three or more modes - No mode: when no value repeats (e.g., 1, 2, 3, 4, 5) The mode is commonly used in market research ("What is the most popular shoe size?") and quality control ("What is the most common defect type?").

Mean vs Median vs Mode: Quick Comparison

The following table highlights the key differences between these three measures of central tendency:
FeatureMeanMedianMode
DefinitionSum divided by countMiddle value when sortedMost frequent value
Affected by outliersYes, heavilyNoNo
Best forSymmetric dataSkewed dataCategorical data
Always unique?YesYesNo, can have 0, 1, or many
Works with non-numeric data?NoNoYes
Easy to calculate?Yes, simple arithmeticRequires sorting firstRequires counting frequencies
Common real-world useAverage salary, GPAMedian home priceMost popular product

When to Use Each Measure

Choosing the right measure of central tendency depends on your data:
Use Mean   -> Symmetric data, no outliers (e.g., test scores, average revenue)
Use Median -> Skewed data or outliers present (e.g., home prices, income)
Use Mode   -> Categorical data or finding most common (e.g., popular product)
A practical rule of thumb:
Formula
If Mean and Median are far apart -> data is skewed -> use the MedianIf Mean and Median are close -> data is symmetric -> use the Mean
For example, U.S. household income has a median of about $75,000 but a mean of about $105,000. The large gap signals right-skewed data, making the median a more representative summary.

Frequently Asked Questions

What is the difference between mean and average?

In everyday language, "average" and "mean" are used interchangeably. Technically, "average" can refer to any measure of central tendency (mean, median, or mode), but the arithmetic mean is the most common type. When someone says "average," they almost always mean the arithmetic mean.

Can a dataset have no mode?

Yes. If every value in a dataset appears exactly once (for example, 3, 7, 12, 18), then no value repeats and the dataset has no mode.

Why is the median better than the mean for income data?

Income data is typically right-skewed because a small number of very high earners pull the mean upward. For instance, if 9 people earn $50,000 and 1 person earns $5,000,000, the mean is $545,000 but the median is $50,000. The median more accurately represents the typical earner.

How do you find the median of an even set of numbers?

Sort the numbers in ascending order, then take the two middle values and calculate their average. For example, in the sorted set 2, 4, 6, 8, the two middle values are 4 and 6 so the median is (4 + 6) / 2 = 5.

What does it mean when a dataset is bimodal?

A bimodal dataset has two values that appear with equal highest frequency. For example, in the set 1, 2, 2, 5, 5, 7, both 2 and 5 appear twice. Bimodal distributions often indicate that the data comes from two distinct groups mixed together.

Can the mean, median, and mode all be different?

Yes, and they often are. In a perfectly symmetric distribution (like a bell curve), all three are equal. In a skewed distribution, they diverge. For example, in the set 1, 2, 2, 3, 10, the mode is 2, the median is 2, and the mean is 3.6.

statisticsmeanmedianmodeaveragecentral-tendency