Harmonic Mean of Two Numbers

H=2aba+bH = \frac{2ab}{a + b}

Enter your known values, leave one input blank, and solves for the missing one. Try different units for next level excitement!

Learning zone

The harmonic mean averages the reciprocals and then flips the result: 1/H = ½(1/a + 1/b), which rearranges to H = 2ab/(a + b). It is the correct average whenever the quantities are rates measured against a fixed amount of something else. Worked example: drive out at 60 km/h and back at 20 km/h over the same road and the average speed for the round trip is 2(60)(20)/80 = 30 km/h, not 40 — you spend three times as long crawling home as you did driving out, so the slow leg dominates.

The Pythagoreans gave it its name because of music: the harmonic mean of a string length and its half is 4/3 of the half, the interval of a perfect fourth, and the three classical means together generate the ratios of the diatonic scale. The same formula turns up as the combined focal length of two thin lenses, as parallel resistors doubled, and as the F₁ score that machine-learning practitioners use to balance precision against recall — all situations where reciprocals add. For positive numbers H ≤ G ≤ A always, so the harmonic mean is the most pessimistic of the three. The trap is reaching for it too often: it applies when the numerator is held fixed (equal distances, equal budgets), while equal times or equal quantities call for the plain arithmetic mean.

Harmonic Mean of Two Numbers
H=2aba+bH = \frac{2ab}{a + b}
Where
  • HH= Harmonic mean
  • aa= First number
  • bb= Second number
Missing one of these? Work it out first, then come back