Mean, Median, and Mode — What They Are, How to Calculate Them, and When to Use Each

Learn how to calculate mean, median, and mode with clear formulas, worked examples, and practical guidance on choosing the right measure of central tendency for your data.

Mean, median, and mode are three ways to describe the "center" of a dataset. They're called measures of central tendency — each one answers the question "what's a typical value?" in a different way.

Understanding when each measure is appropriate matters more than memorizing the formulas. Using the wrong one can produce misleading results.

Quick Definitions

  • Mean — the sum of all values divided by the count. What most people call "the average."
  • Median — the middle value when data is sorted from smallest to largest.
  • Mode — the value that appears most often.

For a symmetric dataset with no outliers, all three will be similar. For skewed data, they can differ significantly — and that difference tells you something important about your data.

How to Calculate the Mean

The mean (arithmetic mean) is the most commonly used average.

Formula: Mean = Sum of all values ÷ Number of values = Σx ÷ n

Worked Example

Dataset: 4, 8, 6, 5, 3, 8, 9

  1. Add all values: 4 + 8 + 6 + 5 + 3 + 8 + 9 = 43
  2. Count the values: 7
  3. Divide: 43 ÷ 7 = 6.14

The mean is 6.14.

When the Mean Works Well

The mean uses every data point, which makes it the most informative average — when the data cooperates. It works best for:

  • Symmetric distributions (test scores in a large class, heights, measurement errors)
  • Data without extreme outliers
  • Continuous numeric data
  • Situations where you need a single number that accounts for all values

When the Mean Misleads

Consider five employees' salaries: $42,000, $45,000, $48,000, $51,000, $350,000.

Mean = $107,200.

No one in this group actually earns anywhere near $107,200. The single high salary pulled the mean far from the typical value. This is why news reports about "average income" can be misleading — they often use the mean when the median would be more representative.

Use our mean, median, mode calculator to see how adding a single outlier shifts the mean while the median barely moves.

How to Calculate the Median

The median is the middle value after sorting.

Steps

  1. Sort the data from smallest to largest
  2. If the count is odd, the median is the single middle value
  3. If the count is even, the median is the average of the two middle values

Worked Example (Odd Count)

Dataset: 12, 3, 7, 9, 15

  1. Sort: 3, 7, 9, 12, 15
  2. Count = 5 (odd)
  3. Middle position: (5 + 1) ÷ 2 = position 3
  4. Median = 9

Worked Example (Even Count)

Dataset: 12, 3, 7, 9, 15, 20

  1. Sort: 3, 7, 9, 12, 15, 20
  2. Count = 6 (even)
  3. Middle positions: 3rd and 4th values → 9 and 12
  4. Median = (9 + 12) ÷ 2 = 10.5

Why the Median Resists Outliers

Back to the salary example: $42,000, $45,000, $48,000, $51,000, $350,000.

Median = $48,000 (the middle value when sorted).

This represents the "typical" salary far better than the mean of $107,200. The $350,000 outlier doesn't affect the median at all because the median only cares about position, not magnitude.

This property — called robustness — is why real estate reports use median home prices and economists report median household income.

How to Find the Mode

The mode is the most frequently occurring value.

Rules

  • A dataset can have one mode (unimodal)
  • A dataset can have multiple modes (bimodal, multimodal)
  • If every value appears exactly once, there is no mode

Worked Examples

One mode: 2, 4, 4, 4, 5, 7, 9 → Mode = 4 (appears 3 times)

Two modes (bimodal): 1, 2, 2, 3, 5, 5, 8 → Modes = 2 and 5 (each appears twice)

No mode: 3, 7, 11, 15, 22 → No mode (all values appear once)

When to Use the Mode

The mode is the only measure of central tendency that works for categorical (non-numeric) data:

  • Most popular shirt color sold: Blue, Red, Blue, Green, Blue → Mode = Blue
  • Most common blood type in a sample
  • Most frequently ordered menu item

For numeric data, the mode is most useful when values naturally cluster — shoe sizes, number of children per household, survey ratings on a 1–5 scale.

Mean vs. Median: Choosing the Right One

This is the most practically important decision. Here's how to think about it:

Data Characteristic Better Measure Why
Symmetric, no outliers Mean Uses all data, most precise
Skewed distribution Median Not distorted by the tail
Contains extreme outliers Median Resistant to extreme values
Measuring total impact Mean Mean × count = total
Small sample, uncertain shape Median Safer default
Need to do further calculations Mean Mathematical properties are richer

The Skewness Rule of Thumb

In a right-skewed distribution (long tail toward high values): Mean > Median.

Examples: income, home prices, hospital stays. A few very high values pull the mean upward.

In a left-skewed distribution (long tail toward low values): Mean < Median.

Examples: age at retirement, exam scores on an easy test (most score high, a few score very low).

When Mean ≈ Median, the data is roughly symmetric.

Worked Example: Comparing All Three

Dataset: 2, 3, 4, 4, 5, 5, 5, 6, 7, 100

Mean: (2 + 3 + 4 + 4 + 5 + 5 + 5 + 6 + 7 + 100) ÷ 10 = 141 ÷ 10 = 14.1

Median: 10 values → average of 5th and 6th → (5 + 5) ÷ 2 = 5

Mode: 5 appears 3 times → 5

The mean (14.1) is nearly three times the median (5) because of the single outlier (100). In this case, the median and mode both give a better picture of the "typical" value.

Try entering this dataset into the mean, median, mode calculator to see the step-by-step breakdown and visual comparison.

Common Mistakes

1. Forgetting to Sort Before Finding the Median

The median requires sorted data. Without sorting, you'll pick the wrong position.

Wrong: Dataset 8, 3, 12, 1, 7 → "the middle value is 12" ❌ Right: Sort first → 1, 3, 7, 8, 12 → median is 7

2. Confusing "Average" with "Mean"

In everyday language, "average" almost always means "mean." But in statistics, "average" can refer to mean, median, or mode. When precision matters, specify which one.

3. Using the Mean for Skewed Data

If someone says "the average home price in this neighborhood is $1.2 million," ask whether that's the mean or median. A single mansion can dramatically inflate the mean.

4. Ignoring That the Mode Can Be Meaningless for Continuous Data

For measured data like heights (5.41, 5.42, 5.43...), every value may be unique, making the mode useless. The mode works best with discrete or grouped data.

5. Thinking More Data Always Fixes the Mean

Adding more data points near the center will pull the mean back, but a single extreme outlier in a small dataset can dominate. With 5 values, one outlier affects the mean by up to 20%.

Other Measures Worth Knowing

Range

Range = Maximum − Minimum. The simplest measure of spread.

For the dataset 3, 7, 7, 9, 15: Range = 15 − 3 = 12.

Limitation: sensitive to outliers. One extreme value makes the range appear larger than the "typical" spread.

Variance and Standard Deviation

These measure how spread out the data is around the mean:

  • Variance = average of squared differences from the mean
  • Standard Deviation = square root of variance

Standard deviation is in the same units as your data, making it easier to interpret. For normally distributed data, about 68% of values fall within one standard deviation of the mean.

Use the standard deviation calculator for step-by-step variance and standard deviation calculations.

Percentiles

The median is actually the 50th percentile. Percentiles tell you what percentage of data falls below a given value. The 25th percentile (Q1) and 75th percentile (Q3) together with the median give a more complete picture than any single average.

Calculate any percentile with the percentile calculator.

Real-World Applications

Education

Teachers use the mean for grade averages, but the median is more informative for understanding class performance. If most students score 70–85 but two score 15, the mean drops significantly while the median stays near the center.

Business

  • Mean transaction value — useful for revenue forecasting (mean × count = total revenue)
  • Median response time — better than mean for support metrics because a few very slow responses inflate the mean
  • Mode — most popular product, most common complaint category

Data Science

When visualizing data, start by computing all three. If mean and median diverge, your data is skewed — plot a histogram to see the shape before choosing which summary statistic to report.

Everyday Life

  • Comparing salaries? Use median (outliers are common).
  • Splitting a restaurant bill evenly? That's the mean.
  • Picking the most popular movie genre to watch with friends? That's the mode.

Frequently Asked Questions

What is the mean in math?

The mean is the sum of all values in a dataset divided by the number of values. It's the most common type of average. For example, the mean of 4, 8, and 12 is (4 + 8 + 12) ÷ 3 = 8.

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

Sort the numbers from smallest to largest. Then take the two middle values and calculate their average. For example, in the dataset 2, 5, 8, 11, the two middle values are 5 and 8, so the median is (5 + 8) ÷ 2 = 6.5.

Can a dataset have more than one mode?

Yes. A dataset with two modes is called bimodal (e.g., 1, 2, 2, 3, 5, 5, 8 has modes 2 and 5). A dataset with three or more modes is multimodal. If all values appear equally often, there is no mode.

What is the difference between mean and average?

In everyday language, they're the same thing. In statistics, "average" is a broader term that can refer to the mean, median, or mode. When someone says "average" without specifying, they almost always mean the arithmetic mean.

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

Income distributions are right-skewed — most people earn moderate amounts, but a small number earn extremely high incomes. These high incomes pull the mean upward, making it higher than what most people actually earn. The median sits at the 50th percentile, representing the income that half the population is above and half is below.

When should I use mean vs. median?

Use the mean when your data is roughly symmetric and has no extreme outliers. Use the median when your data is skewed or contains outliers. When in doubt, calculate both — if they're close, the data is fairly symmetric and either works. If they differ significantly, report the median (or both).

What is the mode used for in real life?

The mode identifies the most common value. It's used in retail (most popular size), healthcare (most common diagnosis), manufacturing (most frequent defect type), and surveys (most selected answer). It's the only measure of central tendency that works for categorical data.

How do outliers affect mean, median, and mode?

Outliers strongly affect the mean, slightly or not at all affect the median, and typically don't affect the mode. This is why the median is called a robust measure — it resists distortion from extreme values.

What is the geometric mean and when should I use it?

The geometric mean is the nth root of the product of n values. Use it for growth rates, ratios, and percentage changes. For example, if an investment grows 10% one year and 20% the next, the average annual growth rate is the geometric mean: √(1.10 × 1.20) − 1 ≈ 14.9%, not the arithmetic mean of 15%.

Is there a formula to find the position of the median?

Yes. For n values sorted in order: median position = (n + 1) ÷ 2. If n = 9, the median is at position 5 (the 5th value). If n = 10, the position is 5.5, meaning you average the 5th and 6th values.

How do I calculate mean, median, and mode in Excel?

Use =AVERAGE(A1:A10) for the mean, =MEDIAN(A1:A10) for the median, and =MODE(A1:A10) for the mode. For multiple modes, use =MODE.MULT(A1:A10) (entered as an array formula in older Excel versions).

What does it mean when mean equals median?

When the mean and median are equal (or very close), the data distribution is approximately symmetric — values are evenly spread around the center. In a perfectly symmetric distribution like the normal (bell) curve, mean = median = mode.

Can the mean be a number not in the dataset?

Yes, and it usually is. The mean of 1, 2, and 6 is 3, which isn't in the dataset. The mean of 4 and 7 is 5.5, which isn't either. The mean is a calculated value, not necessarily a data point. The median of an even-count dataset can also be a non-data-point value.

How many values do I need to calculate mean, median, and mode?

You need at least one value for the mean, one for the median, and at least two values (with at least one repeat) for the mode to exist. In practice, these measures become more meaningful with larger datasets — at least 5–10 values for basic analysis.

Try It Yourself

Enter any dataset into the mean, median, mode calculator to see all three measures computed instantly with step-by-step explanations, sorted data visualization, and a frequency table.

For deeper statistical analysis:

Related Tools