Mean, Median, Mode & Standard Deviation

The four numbers that summarise any dataset. Here's what each means, how to calculate it, and — most importantly — when to use which.

QUICK ANSWER

For the dataset [3, 7, 7, 9, 12]: Mean = (3+7+7+9+12)/5 = 7.6. Median = middle value = 7. Mode = most frequent = 7. Range = 12−3 = 9. Standard deviation2.94 (measures spread). Use median for skewed data like salaries; mean for symmetric data like test scores.

Mean (Average)

Formula: Mean = Sum of all values ÷ Count of values

Example: test scores [72, 85, 91, 68, 94]

  1. Add all values: 72 + 85 + 91 + 68 + 94 = 410
  2. Divide by count (5): 410 ÷ 5 = 82

Weakness: A single outlier skews the mean dramatically. Add one score of 0 → mean drops to 68.3.

Median (Middle Value)

Odd count: Sort values, pick the middle one. Even count: Sort, average the two middle values.

Example: salaries [$30k, $200k, $35k, $40k, $45k]

  1. Sort: $30k, $35k, $40k, $45k, $200k
  2. Count = 5 (odd). Middle position = 3rd. Median = $40k
  3. Mean = ($30k + $35k + $40k + $45k + $200k) ÷ 5 = $70k — misleading!

The median ($40k) is more representative. Government income statistics always report median for this reason.

Mode (Most Frequent Value)

The mode is the value that appears most often. There can be no mode, one mode, or multiple modes.

Examples:

  • [1, 2, 3, 3, 4, 5] → Mode = 3
  • [2, 4, 4, 6, 8, 8] → Bimodal: Mode = 4 and 8
  • [1, 2, 3, 4, 5] → No mode (all appear once)
  • Shoe sizes sold: [38, 40, 42, 42, 42, 44] → Mode = 42 (most popular — useful for inventory!)

Standard Deviation (Spread)

Standard deviation measures how spread out values are from the mean. Small SD = values clustered near the mean. Large SD = values spread wide.

Steps (population SD):

  1. Find the mean.
  2. Subtract the mean from each value, then square the result.
  3. Find the average of those squared differences (this is the variance).
  4. Take the square root of the variance.

Sample SD: divide by (n − 1) in step 3, not n. Use sample SD when your data is a sample from a larger population (which is almost always).

Measure Use when Real-world example
Mean Data is symmetric, no outliers Average temperature over a month
Median Data is skewed or has outliers Median household income, median house price
Mode Most frequent value matters Most popular product size, most common response
Std Dev Measuring variability or risk Investment portfolio volatility, exam score consistency

Frequently Asked Questions

What is the difference between mean and median?
The mean (average) adds all values and divides by count. The median is the middle value when sorted. The mean is pulled by outliers; the median is not. Example: five salaries of $30k, $35k, $40k, $45k, $200k. Mean = $70k (misleading — skewed by the outlier). Median = $40k (more representative of a typical person). For incomes and house prices, median is usually more informative.
How do you calculate standard deviation?
Population SD: (1) Find the mean. (2) Subtract the mean from each value and square the result. (3) Average those squared differences. (4) Take the square root. Sample SD uses (n−1) instead of n in step 3. Example: data [2, 4, 4, 4, 5, 5, 7, 9]. Mean = 5. Squared differences: 9, 1, 1, 1, 0, 0, 4, 16. Average = 4. SD = √4 = 2.
When should I use mean vs median vs mode?
Use the mean when data is symmetrically distributed without outliers (test scores, temperatures). Use the median when data has skew or outliers (incomes, house prices, response times). Use the mode when the most frequent value matters (shoe sizes, election results, categorical data). In practice: report all three for a complete picture.
What does a standard deviation of 10 mean?
It means the typical data point is about 10 units away from the mean. In a normal distribution: 68% of values fall within 1 standard deviation of the mean; 95% within 2 SDs; 99.7% within 3 SDs. If exam scores have mean 70 and SD 10: roughly 68% of students scored 60-80, 95% scored 50-90.
What is the difference between population and sample standard deviation?
Population SD uses n in the denominator (dividing by total count). Sample SD uses (n−1) — called Bessel's correction. Use sample SD when your dataset is a sample from a larger population (which is almost always the case in practice). Population SD is only appropriate when you have measured every member of the complete group. Most calculators use sample SD by default.

Try the Statistics Calculator

Open Statistics Calculator →