Harmonic Mean Calculator
Find the harmonic mean of any set of non-zero numbers. Enter comma-separated values to get H = n ÷ (1/x₁ + … + 1/xₙ) — the correct average when values represent rates or ratios.
n ÷ (1/x₁ + 1/x₂ + … + 1/xₙ) — best average for rates
- 1
Count (n)
3 - 2
Sum of reciprocals 1/x₁ + … + 1/xₙ
1 ÷ 40 + 1 ÷ 60 + 1 ÷ 120 = — - 3
Harmonic mean = n ÷ Σ(1/xᵢ)
3 ÷ — = 60The correct average for rates — smaller values have greater pull on the result.
How does this calculator work?
The harmonic mean H = n / (1/x₁ + … + 1/xₙ) is the correct average for rates and ratios. For {40, 60, 120} the HM = 3 / (1/40 + 1/60 + 1/120) = 3 / 0.05 = 60. It always satisfies HM ≤ GM ≤ AM, and is especially useful for average speed, fuel economy, and cost-per-unit problems.
Formula
How this is calculated
The harmonic mean is the reciprocal of the arithmetic mean of reciprocals. You sum all 1/xᵢ values, divide that sum by the number of values n to get the arithmetic mean of the reciprocals, then take the reciprocal of that result: H = n / Σ(1/xᵢ). All input values must be non-zero, because dividing by zero is undefined.
The harmonic mean gives the correct average whenever you are averaging rates — quantities of the form "amount per unit". For example, if you drive 60 km at 40 km/h and then 60 km at 120 km/h, the average speed over the whole trip is the harmonic mean of 40 and 120 (not the arithmetic mean of 80). Similarly, if you buy shares at different prices per share, the harmonic mean of the prices gives the correct average cost per share for equal-value purchases.
The three classical means satisfy the AM-GM-HM inequality: arithmetic mean ≥ geometric mean ≥ harmonic mean, with equality only when all values are identical. This calculator shows all three for comparison. A wide spread between H and the arithmetic mean signals that a few extreme values are pulling the simple average away from the rate-correct answer.
Frequently asked questions
Use the harmonic mean when averaging rates or ratios where the denominator is the quantity being held constant — speed (distance per time), fuel economy (km per litre), cost per unit. If equal distances are driven at different speeds, the harmonic mean gives the correct average speed for the trip.
Mathematically yes, provided all values share the same sign (all positive or all negative), so the reciprocal sum is non-zero and meaningful. Mixing positive and negative values can cause the reciprocal sum to cancel to zero, which is undefined. In practical applications the values are almost always positive.
For any set of positive numbers: arithmetic mean ≥ geometric mean ≥ harmonic mean. All three are equal only if all values are identical. The harmonic mean is always the smallest of the three, because it is sensitive to small values — even one very small number strongly reduces the harmonic mean.
Also known as
TG we-Calculate Editorial Team. (2026). Harmonic Mean Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/harmonic-mean-calculator
TG we-Calculate Editorial Team. "Harmonic Mean Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/harmonic-mean-calculator.
TG we-Calculate Editorial Team, "Harmonic Mean Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/harmonic-mean-calculator
@misc{wecalculate_harmonic_mean_calculator, title = {Harmonic Mean Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/harmonic-mean-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
