Mean Median Mode Calculator

Calculate mean, median, and mode for any data set with step-by-step solutions

Drag & drop or click to add images or PDF

Math Input
Find the mean of 10, 20, 30, 40, 50
Find the median of 3, 7, 5, 9, 5, 2
Find the mode of 1, 2, 2, 3, 3, 3, 4

What are Mean, Median, and Mode?

Mean, median, and mode are the three primary measures of central tendency in statistics. They each describe the center of a data set in a different way.

Mean (Arithmetic Average)

The mean is the sum of all values divided by the number of values:

xˉ=i=1nxin=x1+x2++xnn\bar{x} = \frac{\sum_{i=1}^{n} x_i}{n} = \frac{x_1 + x_2 + \cdots + x_n}{n}

The mean is sensitive to outliers — a single very large or small value can shift the mean significantly.

Median

The median is the middle value when data is sorted in ascending order. For nn data points:

  • If nn is odd: median =xn+12= x_{\frac{n+1}{2}}
  • If nn is even: median =xn2+xn2+12= \frac{x_{\frac{n}{2}} + x_{\frac{n}{2}+1}}{2}

The median is robust to outliers and is preferred for skewed distributions.

Mode

The mode is the value that appears most frequently. A data set can be:

  • Unimodal — one mode
  • Bimodal — two modes
  • Multimodal — more than two modes
  • No mode — all values appear equally often

These three measures together give a comprehensive picture of where the "center" of a data set lies.

How to Calculate Mean, Median, and Mode

Calculating the Mean

  1. Add all data values together: xi\sum x_i
  2. Divide by the total count nn
  3. Result: xˉ=xin\bar{x} = \frac{\sum x_i}{n}

Weighted Mean: When values have different weights:

xˉw=wixiwi\bar{x}_w = \frac{\sum w_i x_i}{\sum w_i}

Calculating the Median

  1. Sort the data in ascending order
  2. Count the number of values nn
  3. If nn is odd: the median is the value at position n+12\frac{n+1}{2}
  4. If nn is even: the median is the average of values at positions n2\frac{n}{2} and n2+1\frac{n}{2}+1

Calculating the Mode

  1. Count the frequency of each value
  2. Identify the value(s) with the highest frequency
  3. If all values appear once, there is no mode

Comparison Table

MeasureBest ForAffected by Outliers?Unique?
MeanSymmetric dataYesAlways
MedianSkewed dataNoAlways
ModeCategorical dataNoNot always

When to Use Each Measure

  • Mean: Use for normally distributed data without extreme outliers (e.g., test scores in a large class).
  • Median: Use for skewed data or when outliers are present (e.g., household income).
  • Mode: Use for categorical data or to find the most common value (e.g., most popular shoe size).

Relationship Between Mean, Median, and Mode

For a perfectly symmetric distribution: mean == median == mode.

For a right-skewed distribution: mean >> median >> mode.

For a left-skewed distribution: mean << median << mode.

Common Mistakes to Avoid

  • Forgetting to sort data before finding the median — the median requires ordered data; using unsorted data gives an incorrect result.
  • Confusing mean and median for skewed data — the mean is pulled toward outliers, so for skewed distributions the median is a better measure of center.
  • Claiming "no mode" when there are tied frequencies — if multiple values share the highest frequency, they are all modes (bimodal or multimodal).
  • Dividing by the wrong count — ensure you divide by the total number of data points, not the number of distinct values.
  • Including outliers without consideration — always check for extreme values that might make the mean misleading.

Examples

Step 1: Mean: xˉ=3+7+5+9+5+26=3165.167\bar{x} = \frac{3+7+5+9+5+2}{6} = \frac{31}{6} \approx 5.167
Step 2: Sort data: 2,3,5,5,7,92, 3, 5, 5, 7, 9. Since n=6n=6 (even), median =5+52=5= \frac{5+5}{2} = 5
Step 3: Mode: 55 appears twice (most frequent)
Answer: Mean5.167, Median=5, Mode=5\text{Mean} \approx 5.167,\ \text{Median} = 5,\ \text{Mode} = 5

Step 1: Mean: xˉ=12+15+12+18+22+15+127=106715.14\bar{x} = \frac{12+15+12+18+22+15+12}{7} = \frac{106}{7} \approx 15.14
Step 2: Sort data: 12,12,12,15,15,18,2212, 12, 12, 15, 15, 18, 22. Since n=7n=7 (odd), median =x4=15= x_4 = 15
Step 3: Mode: 1212 appears three times (most frequent)
Answer: Mean15.14, Median=15, Mode=12\text{Mean} \approx 15.14,\ \text{Median} = 15,\ \text{Mode} = 12

Step 1: Mean: xˉ=100+200+300+400+100005=110005=2200\bar{x} = \frac{100+200+300+400+10000}{5} = \frac{11000}{5} = 2200
Step 2: Data is already sorted. Since n=5n=5 (odd), median =x3=300= x_3 = 300
Step 3: The mean (22002200) is much larger than the median (300300) due to the outlier 1000010000, showing why median is preferred for skewed data
Answer: Mean=2200, Median=300\text{Mean} = 2200,\ \text{Median} = 300

Frequently Asked Questions

The mean is the arithmetic average (sum divided by count), the median is the middle value when data is sorted, and the mode is the most frequently occurring value. They each measure the center of a data set differently.

Use the median when your data is skewed or contains outliers. For example, median household income is more representative than mean income because a few very wealthy households can inflate the mean.

Yes. A data set with two modes is called bimodal, and one with more than two modes is called multimodal. If all values appear with equal frequency, the data set has no mode.

Outliers strongly affect the mean by pulling it toward the extreme value. The median and mode are resistant to outliers and remain stable even when extreme values are present.

Related Solvers

Standard deviationProbabilityQuadratic
Try AI-Math for Free

Get step-by-step solutions to any math problem. Upload a photo or type your question.

Start Solving