Mean, median and
standard deviation, explained
Three ways to summarise data, and when each one misleads.
Calcylator Editorial Team
Updated · 6 min read
Three ways to describe the middle
Mean, median and mode all try to answer the same question: what is a typical value? They can give different answers for the same data, and the difference is often the useful part.
- x₁ … xₙ:
- the values in the data set
- n:
- how many values there are
- Median: sort the values from smallest to largest. With an odd count, it is the middle value. With an even count, it is the average of the two middle values.
- Mode: the value that appears most often. A set can have one mode, several, or none.
The mode is the only one of the three that works for categories, such as the most common shoe size sold. The data set below has no mode, because no value repeats.
One data set, one outlier
Take six delivery times in minutes: 12, 15, 11, 18, 14 and 40. The 40 is an outlier, perhaps a day with a traffic jam. Here is what it does.
| Measure | Without 40 (5 values) | With 40 (6 values) |
|---|---|---|
| Mean | 14 | 18.33 |
| Median | 14 | 14.5 |
| Population standard deviation | 2.45 | 9.94 |
| Sample standard deviation | 2.74 | 10.89 |
The working: the six values add up to 110, so the mean is 110 ÷ 6 = 18.33. Sorted, the data reads 11, 12, 14, 15, 18, 40, and the two middle values are 14 and 15, so the median is 14.5.
One extra value pushed the mean up by 4.33 minutes, about 31 per cent, but moved the median by only 0.5. The standard deviation roughly quadrupled.
Quote the mean alone and a typical delivery sounds slower than it was: five of the six deliveries took 18 minutes or less, yet the mean is 18.33.
How standard deviation works
Standard deviation measures how far values typically sit from the mean. A small number means the values cluster tightly; a large one means they are spread out. It is in the same units as the data, here minutes.
- Σ:
- add up the terms
- x:
- each value
- μ:
- the mean of the whole population
- n:
- the number of values
- x̄:
- the mean of the sample
- n − 1:
- one fewer than the number of values
- Find the mean: 18.33.
- Subtract the mean from each value and square the result. In the order 12, 15, 11, 18, 14, 40 the squares are 40.11, 11.11, 53.78, 0.11, 18.78 and 469.44.
- Add the squares: 593.33.
- Divide by n = 6 for the population (variance 98.89), or by n − 1 = 5 for the sample (variance 118.67).
- Take the square root: 9.94 for the population, 10.89 for the sample.
Notice that the outlier alone supplies 469.44 of the 593.33, about 79 per cent. Squaring makes standard deviation very sensitive to extreme values.
Population or sample: n or n − 1?
Use the population version when your data is every value you care about, such as all six deliveries this week. Use the sample version when the data is a subset standing in for a larger group, such as 200 customers surveyed out of 50,000.
Dividing by n − 1 gives a slightly larger result. A sample tends to sit closer to its own mean than to the true mean of the whole group, and the smaller divisor corrects for that. The gap shrinks as the sample grows.
Which measure should you use?
- Mean: best for fairly symmetric data without extreme values, and when you need totals, since mean × n gives the sum back.
- Median: best for skewed data such as incomes, house prices and waiting times, where a few large values drag the mean.
- Mode: best for categories or the most common option.
- Standard deviation: use it beside the mean to show consistency. A spread of 10 minutes means a lot on a 15-minute delivery and little on a 3-hour journey.
Common questions
What is the difference between mean and median?
The mean is the sum of all values divided by how many there are. The median is the middle value once the data is sorted. Extreme values pull the mean towards them but barely move the median, so the two can tell different stories about the same data.
When should I use the median instead of the mean?
Use the median when the data is skewed or has outliers, such as incomes, house prices or waiting times. A few very large values can drag the mean far above what most people experience, while the median stays near the typical case.
What does standard deviation tell you?
It shows how far values typically fall from the mean. A low standard deviation means the values are close together; a high one means they are widely spread. It uses the same units as the data, so compare it with the mean for context.
Should I use population or sample standard deviation?
Use population (divide by n) when your data covers everyone or everything you care about. Use sample (divide by n − 1) when the data is only a subset used to estimate a larger group. The sample version is slightly larger, especially for small data sets.
How do outliers affect mean, median and standard deviation?
Outliers pull the mean and inflate the standard deviation, because squaring magnifies large distances. The median moves very little. In our example, adding one value of 40 raised the mean from 14 to 18.33 but the median only from 14 to 14.5.
Was this guide helpful?
Continue reading
View all blogsCAGR explained: growth rate made simple
See how CAGR smooths uneven returns into one yearly rate, with a formula and a worked example.
5 min read
Percentage changes made simple
Learn how to calculate percentage increase and decrease with easy examples you can use every day.
4 min read
Plan your budget, step by step
Learn how to plan a simple budget, track your spending and make informed decisions with your money.
6 min read






