Harmonic Mean Calculator
Calculate the harmonic mean of any dataset — or find the true average speed for a round trip.
⟨⟩ What is Harmonic Mean?
The harmonic mean is a type of average calculated by dividing the count of values by the sum of their reciprocals. It is the reciprocal of the arithmetic mean of the reciprocals. For a set of values x₁, x₂, …, xₙ: HM = n ÷ (1/x₁ + 1/x₂ + … + 1/xₙ). Like all means, it produces a single representative value for a dataset — but it does so in a way that gives proportionally more weight to smaller values.
The harmonic mean is the correct average to use for rates — quantities measured as "something per unit of something else" — when the denominator quantity (the unit) is constant across measurements. The most intuitive example is average speed. If you drive 100 km at 60 km/h and 100 km at 40 km/h, you spend more time driving at 40 km/h (2.5 hours) than at 60 km/h (1.67 hours). The total is 200 km in 4.17 hours = 48 km/h. The harmonic mean gives exactly this: HM(60, 40) = 2 × 60 × 40 / (60 + 40) = 4800/100 = 48 km/h. The arithmetic mean of 50 km/h is wrong.
In the hierarchy of means, the harmonic mean is always the smallest: HM ≤ GM ≤ AM (AM-GM-HM inequality). The harmonic mean represents the "lower bound" of averages, and the gap between HM and AM grows as values become more spread out. This inequality is one of the fundamental results in classical mathematics, appearing in optimization, inequalities, and physics.
Practical applications of the harmonic mean include: average price-per-share in dollar-cost averaging, fuel efficiency averages (miles per gallon), parallel resistance in electronics, average P/E ratios in financial analysis, and pharmacokinetic averages in medicine. Any time equal portions are divided at different rates, the harmonic mean is the correct tool.