Definition
The harmonic mean is an average you get by flipping each value into its reciprocal (1 divided by the value), taking the ordinary average of those, and then flipping the result back. It's mainly used to average rates with time in the denominator, like speed, when each value covers the same amount of the thing on top, such as the same distance.
The Round-Trip Speed Trap
Imagine a round trip by car to a place 60 km away. On the way there, you crawl along at 20 km/h. On the way back, you zoom home at 60 km/h. If you just add the two speeds and divide by 2, you get 40 km/h. That looks right. But once you check the actual time, the answer changes.
The trip there took 3 hours (60 km ÷ 20 km/h). The trip back took only 1 hour (60 km ÷ 60 km/h). So you covered 120 km in 4 hours total. Divide total distance by total time, and your true average speed is 30 km/h.
Why is it lower than the simple average? You spent much more time going slowly (3 hours) than going fast (1 hour). The tool that finds the true average when you cover the same distance at different speeds is the harmonic mean.
Why Flipping the Numbers Works
The steps are a little unusual, but they make a lot of sense. First, turn every value into its reciprocal (swap the top and bottom of the fraction). 20 km/h becomes 1/20, and 60 km/h becomes 1/60. This flip changes "distance covered in 1 hour" (speed) into "time needed to cover 1 km."
Next, take the ordinary average (arithmetic mean) of those reciprocals. Add 1/20 and 1/60, then divide by 2, and you get 1/30. That means it takes an average of 1/30 of an hour to travel 1 km.
Finally, flip the result back to return to the original unit. Flip 1/30 and you get exactly 30 km/h. The harmonic mean follows this idea: turn speeds into times, average them, then turn the result back into a speed.
A Bit More Precisely
The harmonic mean isn't just for speed. It also shows up in work-rate and resource-sharing problems. Say Sam takes 2 hours to clean a room alone, and Mia takes 6 hours. The harmonic mean of their times is 3 hours. That's the average time per person, and if they team up, the job takes 3 hours divided by 2 people, or just 1.5 hours.
More precisely, for positive numbers the harmonic mean is always less than or equal to both the arithmetic mean and the geometric mean. That's because a single extremely small value drags the whole average down hard.
Thanks to this trait, it's also widely used to evaluate modern artificial intelligence (AI) models. When you need to combine two measures that are only useful if both are high, like precision and recall, the harmonic mean creates a balanced performance score (the F1 score).
Common misconceptions
To average speeds, you can always just add the two speeds and divide by 2.
When you cover the same distance at different speeds, each speed lasts a different amount of time. So you need the harmonic mean, not the simple arithmetic mean.
Where you meet it
Finding the round-trip average speed of a car that drives out at 20 km/h and back at 60 km/h over the same distance
Finding the average work rate of two people, one who takes 2 hours alone and one who takes 6 hours, to work out how long they'd take together
In one sentence
The harmonic mean is the average you get by using reciprocals, and it's the right tool for rates like speed over the same distance.