Harmonic Mean
calculator.
The harmonic mean is the fair average of rates such as speeds, prices and fuel use.
| # | Value |
|---|---|
| 1 | |
| 2 |
- Geometric mean
- 48.9898
- Arithmetic mean
- 50
- Combined, as in parallel
- 24
The value 40 makes up 60% of the bottom of the formula, which pulls the mean to 48 and away from the arithmetic 50.
What the last value does to each mean
Drag the point to change the last valueWith the last value at 40 the harmonic mean is 48, the geometric mean 48.9898 and the arithmetic mean 50. Raising the last value lifts the arithmetic mean in a straight line, while the harmonic mean flattens out and never passes 120.
Where the three means sit
Dots are your values. H is harmonic, G is geometric and A is arithmetic.
Set a target for the last value
- The last value needs to be
- 42.8571
- Highest mean this list can approach
- 120
Against the other two means
The arithmetic mean is 4.17% above the harmonic mean here. It would be the right one only if the same time, not the same distance, went with each speed.
Each value and its share
| Value | 1 ÷ value | Share |
|---|---|---|
| 60 | 0.016667 | 40% |
| 40 | 0.025 | 60% |
The mean if one value moves by 10%
| Value | 10% lower | 10% higher |
|---|---|---|
| 60 | 45.9574 | 49.8113 |
| 40 | 45 | 50.7692 |
The row that moves the mean most is the one to measure with the most care.
Working
- 1Take the reciprocal of each value160= 0.016667140= 0.025
- 2Add themSum = 0.041667, exactly124
- 3Divide the count by that sumH=20.041667= 48
- 4Compare with the other two meansH 48 ≤ G 48.9898 ≤ A 50
- 5Check: the top over the answer gives the sum back248= 0.041667
How it's worked out
Take the reciprocal of each value, which means 1 divided by it. Average those, then flip the result back. NIST writes it as the count of values over the sum of the reciprocals.
Here n is how many values you have, and each x is a value above 0. Small values have large reciprocals, so they count for more. That is what happens on a road: you spend longer at the slow speed, so the slow speed has more say in the result.
When the amounts differ, give each rate a weight equal to its amount of the top quantity. For a trip, the rate is km per hour and the top quantity is km, so the weight is the length of the leg.
Each w over x is the time spent on one leg, so this is total distance over total time. Take 120 km at 60 km/h and 60 km at 30 km/h. That is 180 km in 4 hours, or 45 km/h. The plain average of the two speeds is also 45 here, but only by chance: each leg happens to take 2 hours.
Worked examples
Maya drives out at 60 km/h and back at 40 km/h
Maya drives to a town and back on the same road, so each speed covers the same distance. The harmonic mean is 48 km/h, not 50.
Test it with a 120 km road. The way out takes 2 hours and the way back takes 3, so she covers 240 km in 5 hours, which is 48 km/h. The slow leg takes 60% of the time, which is why the answer sits nearer 40.
She wanted to average 50 km/h. With 60 on the way out, she needed 42.86 km/h on the way back, not 40. A 10% rise in her slow speed lifts the result to 50.77, while a 10% rise in her fast speed lifts it only to 49.81.
Reading a car rated 25 mpg city and 36 mpg highway
US rules set combined fuel economy by harmonically averaging the city and highway figures, weighted 0.55 and 0.45. Miles per gallon is a rate, and the top quantity is miles, so these weights say 55 of every 100 miles are city miles.
Enter 25 with a weight of 55 and 36 with a weight of 45. Those 100 miles burn 3.45 gallons, and the result is 28.99 mpg. The weighted plain average would say 29.95 mpg, which is too high.
City driving takes 64% of the fuel here, more than its 55% of the miles. As an exact fraction the answer is 2,000 over 69.
Putting $1,000 into each of three stocks
Three stocks have price to earnings ratios of 15, 25 and 10. With $1,000 in each, the money buys $66.67, $40.00 and $100.00 of yearly earnings. Each dollar buys earnings at the rate of 1 over the ratio.
So $3,000 buys $206.67 of earnings, and the group has a ratio of 14.52. The plain average of 16.67 overstates it, because the costly stock adds little in earnings for its dollars.
This only holds for equal dollars in each stock. With unequal amounts, enter the dollars as weights.
Reading your result
Ask what stays the same. Use this mean when each rate goes with the same amount of the top quantity: the same distance at each speed, or the same dollars at each price. If the bottom quantity stays the same, use the arithmetic mean. An hour at 60 km/h and an hour at 40 km/h does average 50 km/h.
Expect it to be the lowest of the three common means. For positive numbers the harmonic mean is at most the geometric mean, and that is at most the arithmetic mean. They match only when every value is the same, and the gap grows as the values spread out.
| Values | H | G | A |
|---|---|---|---|
| 60, 40 | 48 | 48.99 | 50 |
| 1, 4, 4 | 2 | 2.52 | 3 |
| 10, 20, 30 | 16.364 | 18.171 | 20 |
| 5, 5, 5 | 5 | 5 | 5 |
| 1, 100 | 1.98 | 10 | 50.5 |
Know where the top is. On a round trip you cannot pass twice the speed of the leg you have already driven, however fast you go on the other one. The target solver shows that limit. Maya's trip, with 60 km/h on the way out, can never reach 120 km/h.
Watch one small value. Run 1 and 100 and you get 1.98, close to the 1 and far from the 100. Check that a tiny entry is real and not a unit slip before you trust the answer.
Common mistakes
- Using it with equal times. If you drive for one hour at each speed, the plain average is correct and this one is too low.
- Weighting by the wrong amount. Weights must be the top quantity. For speed, that means distance, not time. If you only know the time at each speed, use the time as a weight in an ordinary weighted average instead.
- Using it for growth. Yearly returns compound, so they call for the geometric mean, not this one. For an everyday list of scores or prices, use the average calculator.
- Mixing units. Do not list 60 km/h next to 40 mph. Convert first, or the small figure takes too much of the result.
Questions people ask
Sources
- NIST Dataplot reference manual, Harmonic Mean
- MRC Cognition and Brain Sciences Unit statistics wiki, Using harmonic means to average rates
- Wolfram MathWorld, Pythagorean Means
- 40 CFR 600.002, Definitions (Legal Information Institute, Cornell Law School)
- OpenStax, University Physics Volume 2, section 10.2, Resistors in Series and Parallel