Harmonic Mean Calculator
Calculate the harmonic mean of up to 6 positive values. The harmonic mean is the correct average for rates, speeds, and any quantity where the denominator varies across samples.
The harmonic mean is the reciprocal of the arithmetic mean of reciprocals.
Formula: HM = n / (1/x₁ + 1/x₂ + ... + 1/xₙ)
When to Use:
- Average speed for equal-distance trips at different speeds
- Average price-to-earnings ratio
- F1 score in machine learning (harmonic mean of precision and recall)
- Any rate where the denominator varies
Example: Driving 60 mph for one leg and 40 mph for the return: HM = 2/(1/60 + 1/40) = 48 mph (not 50!).