Harmonic Mean Calculator
Average speeds and rates the correct way — paste your values and see the reciprocals and every step.
Separate values with commas, spaces or line breaks — a column pasted from Excel or Google Sheets works as-is. Anything that is not a number is ignored, never counted as zero.
What is the harmonic mean?
The harmonic mean is the average designed for rates — speeds, prices per unit, anything expressed as "per" something — when each rate applies over the same distance or amount. Instead of averaging the rates directly, it averages their reciprocals and flips the result back. The effect is to weight the slower rates more heavily, which is physically correct: on any journey you spend more time travelling slowly than quickly, so the slow leg should count for more.
Harmonic mean formula
Take the reciprocal of each value, add the reciprocals, and divide the count by that sum.
How to calculate it
Step 1 — Reciprocals. For 60 mph and 40 mph: 1/60 ≈ 0.0167 and 1/40 = 0.025.
Step 2 — Add them. Σ(1/x) ≈ 0.0417.
Step 3 — Divide the count by the sum. 2 ÷ 0.0417 ≈ 48 mph. The steps panel above shows this working for your numbers.

The average-speed problem
Drive to a town 60 miles away at 60 mph (one hour), then drive home at 40 mph (an hour and a half). Your gut says the average speed is 50 mph. But average speed means total distance ÷ total time: 120 miles ÷ 2.5 hours = 48 mph — exactly the harmonic mean. The arithmetic mean fails because the two speeds lasted for different amounts of time; the harmonic mean's reciprocal trick quietly converts speeds into times, where the weighting is correct. The same logic fixes average price-per-unit when you spend equal money at different prices, and average fuel economy over equal distances.
Harmonic vs arithmetic vs geometric mean
For any set of positive numbers that are not all equal, the three means line up in a fixed order: harmonic ≤ geometric ≤ arithmetic. For 40 and 60: harmonic 48, geometric ≈ 48.99, arithmetic 50. The arithmetic mean answers additive questions, the geometric mean multiplicative ones, and the harmonic mean rate questions — picking the right one is most of the skill. If your numbers are plain measurements rather than rates, the mean calculator is the right tool.
Another place it hides: equal spending
You spend $60 on fuel at $2 per unit and another $60 at $3 per unit. What is your average price per unit? Not $2.50. The first $60 bought 30 units, the second bought 20 — 50 units for $120, which is $2.40 per unit: exactly the harmonic mean of 2 and 3, since 2 ÷ (1/2 + 1/3) = 2.4. Equal money at different prices is the same shape as equal distance at different speeds: the cheaper rate (like the slower speed) quietly applies to more of the total. The same structure appears in average fuel economy over equal distances, in the F1 score used to grade machine-learning models, and in parallel electrical resistances. Whenever the fixed quantity is the numerator's partner — distance per speed, money per price — suspect the harmonic mean.
Frequently asked questions
Why is the average of 60 mph and 40 mph not 50 mph?
Because you spend longer at the slower speed. The harmonic mean accounts for that: 2 ÷ (1/60 + 1/40) = 48 mph.
Where is the harmonic mean used?
Averaging rates over equal distances or amounts — speeds, prices per unit, and the F1 score in machine learning.
What is the formula for the harmonic mean?
Harmonic mean = n ÷ Σ(1/x): divide the count by the sum of the reciprocals of the values.
When should I NOT use the harmonic mean?
When the amounts differ — for example, driving 10 miles at 60 mph and 100 miles at 40 mph. Then the correct average is total distance ÷ total time, a weighted calculation rather than a plain harmonic mean.