The formula and intuition
For n positive values x₁, x₂, …, xₙ, the harmonic mean is HM = n / (1/x₁ + 1/x₂ + … + 1/xₙ). Each value contributes its reciprocal to the sum; the more reciprocals you sum, the smaller the result — so large values have less influence on the harmonic mean than on the arithmetic mean.
Intuitively, the harmonic mean answers "what single rate gives the same total output if applied uniformly?" For the speed example: covering 1 mile at 60 mph takes 1/60 hour; at 40 mph it takes 1/40 hour. Total time = 1/60 + 1/40 = 1/24 hour per mile. Rate = 1/(1/24) / 2 = 24 miles/(hour per mile) / 2 = 48 mph.