The arithmetic mean uses every number, while the median is the central sorted value. If one unusual value is much larger than the others, the mean can move substantially even when most observations stay the same.
Formula
Mean = sum / count; for an even-sized dataset, median = (middle-left + middle-right) / 2.
How to calculate
- Sort all observations from smallest to largest.
- Add all values and divide by their count to get the mean.
- Read the middle value, or average the two middle values, for the median.
Worked examples
| Scenario | Calculation | Answer |
|---|---|---|
| 10, 20, 30 | Sum 60 / 3 | Mean 20; median 20 |
| 10, 20, 30, 40 | 100 / 4; median (20+30)/2 | Both 25 |
| 10, 20, 30, 100 | 160 / 4; median (20+30)/2 | Mean 40; median 25 |
Important limitation
If observations have different weights (for example, course credits), do not use a simple mean. Use a weighted mean with the actual weights.
Common question
Is the median always better than the mean?
No. Both are useful; choose according to the distribution and the question.
Try the calculator: Average Calculator – Mean, Median, Mode & Std Dev