Mean, median, mode, and range
The mean is the sum divided by the count. Test scores, prices, temperatures, gas mileage.
- Count of values5
- Sum430
- Median (middle value)85
- Mode (most common)85
- Smallest value78
- Largest value92
- Range (largest − smallest)14
- Mean (average)86
How to calculate an average
Type or paste the numbers separated by commas, spaces, or line breaks. Use a period for decimals: 8.5 is eight and a half. Each tab uses a different formula.
To measure how spread out the numbers are around the average, use the standard deviation calculator. For course grades with different weights, including the score you need on a final, see the weighted average calculator.
Which average to use
| Average | When to use | Example |
|---|---|---|
| Mean | Values that matter equally | Three quiz scores with the same weight |
| Median | Data with extreme values | Home prices in a neighborhood |
| Mode | The most common value | Most popular shoe size sold |
| Weighted | Values with different importance | Exams worth 40%, homework worth 20% |
| Geometric | Compounded growth and rates | Average yearly return of +10% then +40% |
| Harmonic | Rates over equal distances | Round trip at 40 mph and 60 mph |
The geometric mean of 10% and 40% growth is not 25%. Use the growth factors 1.10 and 1.40: their geometric mean is about 1.241, which means 24.1% per period. The arithmetic mean overstates compounded growth.
Worked examples
| Type | Values | Math | Answer |
|---|---|---|---|
| Mean | 85, 92, 78, 90, 85 | 430 ÷ 5 | 86 |
| Mean | 7, 8.5, 6 | 21.5 ÷ 3 | 7.1667 |
| Weighted | scores 88, 94, 76 with weights 40, 20, 40 | (3,520 + 1,880 + 3,040) ÷ 100 | 84.4 |
| Geometric | 2, 8 | √(2 × 8) | 4 |
| Harmonic | 40, 60 | 2 ÷ (1/40 + 1/60) | 48 |
Drive 40 mph to the lake and 60 mph back, and the average speed for the whole trip is 48 mph (harmonic), not 50 mph, because more time goes by at the slower speed. For other ratios, the proportion calculator can help.
Median, mode, and common mistakes
Mean, median, and mode describe the center of the data in different ways. The median is the middle value of the sorted list, and the mode is the value that shows up most. The median resists extreme values: for 1, 2, 3, 4, and 100, the mean is 22 and the median is 3.
- Using the plain mean when values carry different weights, like course grades. Use the weighted average.
- Forgetting a weight: the number of weights has to match the number of values.
- Averaging percentages with the plain mean instead of using growth factors and the geometric mean.
- Typing a thousands separator inside the list: write 1500, not 1,500, because commas split the list.
Go deeper
Frequently asked questions
How do you calculate the average of a set of numbers?
Add all the numbers and divide by how many there are. For 85, 92, 78, 90, and 85, the sum is 430 and the average is 430 ÷ 5 = 86.
What is the difference between mean, median, and mode?
The mean is the sum divided by the count, the median is the middle value in sorted order, and the mode is the most frequent value. For 1, 2, 3, 4, and 100, they are 22, 3, and none.
How do you calculate a weighted average?
Multiply each value by its weight, add the products, and divide by the sum of the weights. Scores 88, 94, and 76 with weights 40, 20, and 40 give 8,440 ÷ 100 = 84.4.
How do you find the median?
Sort the numbers and take the middle one. With an even count, average the two middle numbers: for 1, 2, 3, and 4, the median is 2.5.
When should I use the geometric mean?
Use it for compounded growth and rates, like yearly percent changes. The geometric mean of 2 and 8 is 4, while the arithmetic mean is 5. All values must be positive.
When should I use the harmonic mean?
Use it to average rates over equal distances. A trip out at 40 mph and back at 60 mph averages 48 mph by the harmonic mean, not 50.
Sources and method
- Descriptive statistics: mean, median, mode, and weighted, geometric, and harmonic means