CalculatorFree.net

Mean, Median, Mode Calculator

Enter your numbers in the box below. The calculator finds mean, median, and mode with step-by-step work including a sorted dataset view and frequency table.

Results

Count (n):9
Sum:39
Mean (average):4.3333
Median:3
Mode:2
Min:1
Max:9
Range:8
Step-by-step work:
Step 1 — Original values (n = 9):
  [5, 2, 8, 3, 2, 9, 1, 7, 2]

Step 2 — Mean (average):
  Mean = Sum / n
  Mean = (5 + 2 + 8 + 3 + 2 + 9 + 1 + 7 + 2) / 9
  Mean = 39 / 9
  Mean = 4.3333

Step 3 — Sort values for median:
  Sorted: [1, 2, 2, 2, 3, 5, 7, 8, 9]
  n = 9 (odd) → middle value at position 5
  Median = middle value at position 5
  Median = 3

Step 4 — Frequency table for mode:
  1 appears 1 time
  2 appears 3 times
  3 appears 1 time
  5 appears 1 time
  7 appears 1 time
  8 appears 1 time
  9 appears 1 time
  Highest frequency = 3 → Mode = 2

The Three Measures of Central Tendency

Mean, median, and mode are the three core measures of central tendency in descriptive statistics. Each answers the question "what is a typical value in this dataset?" in a different way. Understanding when each measure is appropriate — and what each one hides — is fundamental to interpreting data correctly.

Mean (Arithmetic Average)

The mean is the most familiar measure of center. You calculate it by adding all the values together and dividing by the count.

Formula:

Mean = Σxi / n

Where Σxi is the sum of all values and n is the number of values.

Worked example: dataset = 5, 2, 8, 3, 2, 9, 1, 7, 2

Sum = 5 + 2 + 8 + 3 + 2 + 9 + 1 + 7 + 2 = 39
n = 9
Mean = 39 / 9 = 4.3333

The mean uses every value in the calculation, which makes it sensitive to outliers. A single unusually high or low value can pull the mean significantly away from where most of the data lies. For heavily skewed data, the mean can be misleading.

Median (Middle Value)

The median is the middle value of a sorted dataset. Exactly half the values lie above it and half lie below it. The median is resistant to outliers because it depends only on the position of values, not their magnitudes.

How to find the median:

Odd count example: sorted dataset = 1, 2, 2, 2, 3, 5, 7, 8, 9

n = 9 (odd). Middle position = (9+1)/2 = 5th value = 3

Even count example: 2, 4, 6, 8

n = 4 (even). Average positions 2 and 3 = (4 + 6) / 2 = 5

Mode (Most Frequent Value)

The mode is the value that appears most often in a dataset. Unlike mean and median, the mode is the only measure of central tendency that can be used with categorical (non-numeric) data. For example, the mode of a list of colors would be the most common color.

A dataset may have one mode (unimodal), two modes (bimodal), or more (multimodal). If every value appears the same number of times, there is no mode. The mode is most useful for discrete data where specific values repeat, such as survey responses, test scores, or product sizes.

Example: 5, 2, 8, 3, 2, 9, 1, 7, 2

Frequency count: 1 appears once, 2 appears 3 times, 3 once, 5 once, 7 once, 8 once, 9 once.
Highest frequency = 3 (the value 2). Mode = 2

Comparing Mean vs. Median: The Outlier Test

The difference between mean and median reveals the shape of a distribution. When they are close together, the data is roughly symmetric. When they diverge, the data is skewed.

Distribution shape Relationship Best measure to report
Symmetric Mean ≈ Median ≈ Mode Either
Right-skewed (high outliers) Mean > Median Median
Left-skewed (low outliers) Mean < Median Median
Categorical data N/A Mode

Examples where median is clearly better than mean: household incomes in a city, home sale prices, time-to-load of websites (one slow server skews the average), salaries at a company where executives earn dramatically more than most employees.

Range: Measuring Spread

While mean, median, and mode all measure where data clusters, range measures how spread out it is. Range = maximum value − minimum value. It is the simplest measure of spread but is highly sensitive to outliers (a single extreme value changes it dramatically). For a more robust spread measure, use standard deviation or interquartile range (IQR).

Frequently Asked Questions

What is the difference between mean, median, and mode?

Mean is the arithmetic average: add all values and divide by the count. Median is the middle value when the data is sorted — half the values are above it and half below. Mode is the value that appears most frequently. For the dataset 1, 2, 2, 3, 10: Mean = 18/5 = 3.6; Median = 2 (middle value); Mode = 2 (appears twice). All three are measures of central tendency, but they respond differently to outliers.

When should I use median instead of mean?

Use median when your data is skewed or has extreme outliers that would distort the average. The most common example is income: if a group of people earns $30K, $35K, $40K, $45K, and one person earns $1,000,000, the mean is about $230K — a poor description of the typical person. The median ($40K) is far more representative. Similarly, house prices, medical costs, and response times often favor median reporting.

How do you find the median with an even number of values?

When the dataset has an even number of values, there is no single middle value. Instead, sort the data and average the two middle values. For example, with 8 values, the median is the average of the 4th and 5th values (after sorting). Example: 2, 3, 5, 7, 8, 10, 12, 15 → median = (7 + 8) / 2 = 7.5.

Can a dataset have no mode or more than one mode?

Yes to both. A dataset has no mode if every value appears the same number of times (usually once each) — there is no single most frequent value. A dataset is bimodal if two different values tie for the highest frequency, and multimodal if three or more values tie. Example with no mode: 1, 2, 3, 4, 5. Example with two modes: 1, 1, 2, 3, 3.

What is the relationship between mean, median, and the shape of a distribution?

The relationship reveals the skew of a distribution. In a perfectly symmetric distribution (like the normal bell curve), mean = median = mode. In a right-skewed (positively skewed) distribution with a long tail to the right, mean > median > mode. In a left-skewed distribution with a long tail to the left, mean < median < mode. Comparing mean to median is a quick way to detect skewness without drawing a chart.

Related Calculators