Harmonic Mean Calculator

Find the harmonic mean of a set of numbers, ideal for averaging rates like speeds or price-to-earnings ratios.

Result

48.6486
3

How it is calculated

The harmonic mean divides the number of values by the sum of their reciprocals.

H = n ÷ (1/x₁ + 1/x₂ + … + 1/xₙ)

n is how many numbers you entered and x are the numbers themselves, in any unit as long as they are all in the same one (for example km/h). Separate them with commas or spaces. Every number must be strictly greater than zero; a zero, a negative number or any entry that is not a number gives no result, since 1/0 is undefined. The mean is shown to 4 decimals together with the count of values. One value alone returns itself.

Worked example

Three legs of equal length are driven at 40, 60 and 50 km/h. Reciprocals: 1/40 = 0.025, 1/60 ≈ 0.016667, 1/50 = 0.02. Their sum is about 0.061667. Divide the count by it: 3 ÷ 0.061667. The harmonic mean is 48.6486 km/h from 3 values. The ordinary average would be 50, which is too high because more time is spent at the slow speeds.

Try this example →

Common mistakes

  • Using the harmonic mean for speeds over equal times. If you drive for equal hours at each speed, the plain average is right; the harmonic mean applies to equal distances.
  • Including a zero, for example a stopped phase at 0 km/h. The tool rejects zero and negative values instead of returning a number.
  • Typing the numbers with a decimal comma inside the list, such as 2,5. A comma separates values here, so write 2.5.
  • Mixing units in one list, such as km/h with mph, or averaging price-to-earnings ratios with earnings-to-price ratios.
  • Expecting the result to sit near the arithmetic mean. It is always at or below it, and lies closer to the smallest values.

About this calculator

The harmonic mean is the reciprocal of the arithmetic average of a set of numbers' reciprocals — for a list of n values, it is n divided by the sum of 1÷x for each value. Unlike the arithmetic mean, it gives proportionally more weight to smaller values, which makes it the mathematically correct way to average rates and ratios rather than simple counts.

The classic example is averaging speeds over equal distances: if you drive the first half of a trip at 60 mph and the second half at 30 mph, your true average speed is the harmonic mean of the two, 40 mph, not their arithmetic average of 45 mph, because you spend more time at the slower speed. Financial analysts apply the same logic to average price-to-earnings ratios across a portfolio of stocks, since P/E is itself a ratio of price over earnings, and the harmonic mean avoids the upward bias a simple average would introduce from high-P/E outliers.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators