The harmonic mean is the right average when you are averaging rates, such as speeds over equal distances. This calculator finds it for 2 to 5 positive values, and shows the arithmetic and geometric means next to it, so you can see why picking the wrong average can overstate a result.
How the calculation works
- Harmonic mean = n ÷ (1/x₁ + 1/x₂ + … + 1/xₙ)
- Arithmetic mean = (x₁ + x₂ + … + xₙ) ÷ n
- Geometric mean = (x₁ × x₂ × … × xₙ)^(1/n)
- For positive values, harmonic ≤ geometric ≤ arithmetic
Example
You drive to a town at 40 km/h and back at 60 km/h, the same distance each way. The arithmetic mean is 50 km/h, but that is not your average speed. The harmonic mean is 2 ÷ (1/40 + 1/60) = 48 km/h, which matches total distance divided by total time. The geometric mean is 48.99. With three values of 40, 60 and 80 the harmonic mean is 55.38 and the arithmetic mean 60.
Why it matters
Using the arithmetic mean of speeds, prices or ratios gives results that look reasonable but are wrong whenever the denominator is the quantity held fixed. The harmonic mean fixes this, and it is also the basis of the F1 score, the equivalent of parallel resistances and some valuation multiples like the price to earnings ratio of a portfolio.
Good to know
The values must all be positive and refer to the same fixed amount of the denominator, such as equal distances or equal spending. If distances differ, use a weighted harmonic mean. The result is dominated by the smallest values, so a single very small value pulls it down sharply. In statistics and finance it often appears when averaging ratios like price to earnings across a portfolio, where the arithmetic mean would let a few expensive stocks distort the result.
Related tools
The geometric mean calculator averages growth factors, the weighted average calculator weights each value, and the coefficient of variation calculator measures spread.