Skip to content
Omnikalc

Harmonic mean calculator: the right average for speeds and rates

Enter 2 to 5 positive values to get the harmonic mean next to the arithmetic and geometric means.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Results

Harmonic mean

48

Arithmetic mean
50
Geometric mean
48.99
Sum of the reciprocals
0.041667
Gap between the arithmetic and harmonic means
4.0%

The harmonic mean is the right average when you are averaging rates, such as speeds over equal distances. This calculator finds it for 2 to 5 positive values, and shows the arithmetic and geometric means next to it, so you can see why picking the wrong average can overstate a result.

How the calculation works

  • Harmonic mean = n ÷ (1/x₁ + 1/x₂ + … + 1/xₙ)
  • Arithmetic mean = (x₁ + x₂ + … + xₙ) ÷ n
  • Geometric mean = (x₁ × x₂ × … × xₙ)^(1/n)
  • For positive values, harmonic ≤ geometric ≤ arithmetic

Example

You drive to a town at 40 km/h and back at 60 km/h, the same distance each way. The arithmetic mean is 50 km/h, but that is not your average speed. The harmonic mean is 2 ÷ (1/40 + 1/60) = 48 km/h, which matches total distance divided by total time. The geometric mean is 48.99. With three values of 40, 60 and 80 the harmonic mean is 55.38 and the arithmetic mean 60.

Why it matters

Using the arithmetic mean of speeds, prices or ratios gives results that look reasonable but are wrong whenever the denominator is the quantity held fixed. The harmonic mean fixes this, and it is also the basis of the F1 score, the equivalent of parallel resistances and some valuation multiples like the price to earnings ratio of a portfolio.

Good to know

The values must all be positive and refer to the same fixed amount of the denominator, such as equal distances or equal spending. If distances differ, use a weighted harmonic mean. The result is dominated by the smallest values, so a single very small value pulls it down sharply. In statistics and finance it often appears when averaging ratios like price to earnings across a portfolio, where the arithmetic mean would let a few expensive stocks distort the result.

The geometric mean calculator averages growth factors, the weighted average calculator weights each value, and the coefficient of variation calculator measures spread.

Frequently asked questions

What is the harmonic mean?

It is the number of values divided by the sum of their reciprocals. It gives more weight to small values than the arithmetic mean does, and is the right average for rates when the quantity being divided, such as distance, is held constant.

When should I use it?

Use it for average speed over equal distances, average price paid when you spend equal amounts of money, parallel resistors and the F1 score in machine learning. In each case the values are rates of the form one thing per another.

Why is it smaller than the arithmetic mean?

For positive numbers that are not all equal, the harmonic mean is always less than or equal to the geometric mean, which is less than or equal to the arithmetic mean. The gap grows as the values spread out.

Can it handle zero or negative values?

No. A zero makes a reciprocal undefined, and mixing signs breaks the interpretation. Use positive values only.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.