Ad Space — Top Banner

Harmonic Mean Calculator

Calculate the harmonic mean of any list of positive numbers.
Compare with arithmetic and geometric means.
Used for averaging rates, speeds, and ratios.

Harmonic Mean

Harmonic Mean

The harmonic mean is the type of average that handles rates correctly — speeds, frequencies, prices per unit, miles per gallon — anything expressed as one quantity per another. For these problems, the arithmetic mean gives a wrong answer, while the harmonic mean gives the right one.

Formula

H = n / (1/x₁ + 1/x₂ + … + 1/xₙ)

Equivalently: take the arithmetic mean of the reciprocals and invert it.

Worked Example — Round-Trip Speed

You drive 60 km at 30 km/h, then return at 60 km/h.

  • Arithmetic mean: (30 + 60) / 2 = 45 km/h ❌ (wrong)
  • Harmonic mean: 2 / (1/30 + 1/60) = 2 / (3/60) = 40 km/h ✓ (correct)

The total distance is 120 km and the total time is (60/30) + (60/60) = 3 hours, giving an average speed of exactly 40 km/h — matching the harmonic mean.

Why It Works for Rates

Rates have units of “x per unit y.” When you average them, you must hold the denominator quantity (distance, work, items) constant — and the harmonic mean does exactly that. The arithmetic mean instead holds the numerator quantity constant, which is rarely what you want for rate problems.

Inequality Chain

For any list of positive numbers (not all equal):

H ≤ G ≤ A

where H is harmonic, G is geometric, A is arithmetic. Equality holds only when every value is the same.

Common Uses

Field Example
Travel Average round-trip speed
Finance P/E ratio across multiple stocks (some prefer harmonic)
Engineering Parallel resistors: R_total = HM(resistors) ÷ n
Image processing Filter weights, perceptual color mixing
Sports analytics Sabermetric rate stats

Weighted Harmonic Mean

H = Σwᵢ / Σ(wᵢ / xᵢ)

This is the formula to use when each rate applies to a different amount of work, distance, or volume — the unweighted version assumes equal weights.

Caveat

The harmonic mean undefined for a list containing zero (the reciprocal blows up). It is also disproportionately sensitive to small values — a handful of low rates pulls the harmonic mean down sharply. This sensitivity is what makes it the right tool for rate problems but the wrong tool for ordinary averaging tasks.


Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.