Harmonic Mean Calculator

The right average for rates and speeds, from the reciprocals.

Harmonic mean
Adjust the inputs

Your result updates live as you type.

The harmonic mean is the reciprocal of the average of the reciprocals. It is the correct average whenever the values are rates measured against a fixed amount of something else — speeds over equal distances, prices per unit when you buy equal quantities, or resistances in parallel.

The standard illustration is driving to a town at 40 mph and back at 60 mph. The average speed for the round trip is not 50 but 48, because you spend longer at the slower speed. The harmonic mean gets this right automatically. It is always the smallest of the three classical means, sitting below the geometric which sits below the arithmetic.

The harmonic, geometric and arithmetic means table below carries 6 pre-computed rows, from 40 and 60 to 2 and 200, so a figure can be checked against this page without typing anything into it. The page opens with your rates already set to 40, 60, so there is a finished result on screen before anything is typed. Alongside the number, 4 bands label it — low rate through very high rate — because a bare figure rarely tells you whether it is unusual. Coefficient of Variation Calculator and Geometric Mean Calculator are the nearest neighbours to this one.

The formula

HM = n ÷ (1/x1 + 1/x2 + ... + 1/xn)
x<sub>i</sub>
Each rate, which must be non-zero
n
How many values there are
HM
The harmonic mean

How it works, step by step

  1. Enter your rates, separated by commas or spaces.
  2. Use consistent units throughout — all speeds or all prices.
  3. The gauge shows the harmonic mean.
  4. The other two classical means appear below for comparison.

Worked examples

Forty out, sixty back

Two divided by (1/40 + 1/60) is 48 mph. The arithmetic mean of 50 overstates it because more of the journey time is spent at 40.

How one slow value dominates

The harmonic mean of 10, 90 and 90 is 24.5455, far closer to 10 than to 90. The arithmetic mean would be 63.3333. Small values pull the harmonic mean down hard, which is exactly the behaviour rates require.

Checking the 1 and 2 and 4 row

The reference table lists Values = 1 and 2 and 4, giving Harmonic: 1.7143, Geometric: 2.0000, Arithmetic: 2.3333. Entering that above should reproduce the same figures — if it does not, the input is being read differently to the way the table assumes.

How to read your score

0–10Low rateThe average rate is small, dominated by the slowest values.
10–45Moderate rateA middling average.
45–80High rateA fast average despite the reciprocal weighting.
80–—Very high rateEvery value in the set must be large.

Frequently asked questions

When should I use this rather than a plain average?

When each value is a rate applied over an equal amount of the denominator — equal distances, equal quantities purchased, equal work done. If the times or amounts differ, use a weighted mean instead.

Why is it always the smallest mean?

Because reciprocals amplify small values. The relationship harmonic ≤ geometric ≤ arithmetic holds for any set of positive numbers, with equality only when they are all the same.

Can I include a zero?

No. A rate of zero has an infinite reciprocal, so the harmonic mean collapses to zero. Non-positive entries are dropped.

What is the F1 score in machine learning?

It is the harmonic mean of precision and recall, chosen precisely because it punishes a low value in either far more than a plain average would.

What do the bands under the harmonic mean mean?

They label the figure so it can be read without a reference point of your own: Low rate from 0 to 10; Moderate rate from 10 to 45; High rate from 45 to 80; Very high rate from 80 upwards. The band is a reading aid only — the number itself is exact, and a value sitting just over a boundary is not meaningfully different from one just under it.

What formula does the Harmonic Mean Calculator use?

It computes HM = n ÷ (1/x_1 + 1/x_2 + ... + 1/x_n), where x<sub>i</sub> is each rate, which must be non-zero; n is how many values there are; HM is the harmonic mean. The same expression is printed on the page above the inputs, so the result can be reproduced by hand or in a spreadsheet.

The three classical means compared

Harmonic, geometric and arithmetic means
ValuesHarmonicGeometricArithmetic
40 and 6048.000048.989850.0000
10 and 9018.000030.000050.0000
50 and 5050.000050.000050.0000
1 and 2 and 41.71432.00002.3333
30 and 40 and 5038.297939.148740.0000
2 and 2003.960420.0000101.0000

The harmonic mean never exceeds the geometric, which never exceeds the arithmetic.

Related calculators