Average 60 km/h outbound and 40 km/h home and your average speed is not 50. It is 48 — because you spent longer at the slower speed, and time is the weighting the plain average cannot see. The harmonic mean is the average built for exactly this: rates, speeds, and ratios where the honest weighting is by the denominator. This harmonic mean calculator computes it for any list of values and prints the arithmetic mean alongside, so the difference is visible every time.



The Harmonic Mean Formula

Harmonic mean = n ÷ (1/x₁ + 1/x₂ + … + 1/xₙ) — the count divided by the sum of the reciprocals, or equivalently the reciprocal of the average reciprocal. For 60 and 40: reciprocals 1/60 and 1/40 sum to 0.041667, and 2 ÷ 0.041667 = 48. The reciprocal step is what performs the correct weighting: slow speeds have large reciprocals, so they dominate the sum — exactly as they dominate your travel time.

Why Rates Demand It: The Speed Proof

Drive 100 km at 60 km/h (taking 1.667 h), then 100 km back at 40 km/h (taking 2.5 h). Total: 200 km in 4.167 h, an average speed of 200 ÷ 4.167 = 48 km/h — the harmonic mean, delivered by physics. The arithmetic mean of 50 pretends the two speeds were held for equal times; they were held for equal distances, and over fixed distance, time is what accumulates. Whenever the quantity being averaged is "per unit of something" and the units are held equal in the denominator's terms, the harmonic mean is the truthful average.

The Other Classic Cases

Fuel economy: averaging miles-per-gallon figures across equal fuel purchases takes the harmonic mean (this is why the EPA's combined ratings surprise people). Investing: the average price paid per share when buying fixed dollar amounts — dollar-cost averaging — is the harmonic mean of the prices, always kinder than the arithmetic mean: buying 100 dollars' worth at 10 and at 20 yields shares at a harmonic-mean cost of about 13.33, not 15. Parallel resistors: two resistances in parallel combine to half their harmonic mean. F1 score in machine learning is the harmonic mean of precision and recall, chosen because it punishes lopsided performance the way the formula punishes a lopsided speed.

The Inequality Chain: HM ≤ GM ≤ AM

For positive numbers, the three classical means always line up in the same order: harmonic ≤ geometric ≤ arithmetic, with equality only when every value is identical. For 60 and 40: HM 48, GM √2400 ≈ 48.99, AM 50. The gaps widen as the values spread — with 1, 2, 4 the harmonic mean is 1.714 against an arithmetic 2.333. Knowing the chain is a free error check: if your harmonic mean ever comes out above your arithmetic mean, an input or a reciprocal went wrong, and this calculator prints both so the check makes itself.

When Not to Use It

The harmonic mean is wrong for ordinary additive quantities — test scores, temperatures, weights — where the arithmetic mean is the honest summary. It is also fragile near zero: a single tiny value drags it down violently (a data-entry 0.01 in a list of 50s pulls the mean toward the typo), and it is undefined at zero outright. Use it for rates averaged over equal denominators — speeds over fixed distance, prices over fixed spend, densities over fixed volume — and check every small value twice.

Common Mistakes

Reaching for the arithmetic mean on the speed problem is the founding error — 50 feels right and is wrong by construction. Forgetting that the harmonic mean requires equal weighting of the underlying unit (equal distances, equal dollars) is the subtle one: speeds over equal times do average arithmetically. Entering a zero or negative rate crashes the reciprocal logic, which the calculator blocks with an explanation rather than a NaN. And comparing harmonic means computed over different counts of values — the n in the formula is doing work; lists must be complete.

Related Tools

Its inequality-chain partner is the Geometric Mean Calculator, and the whole averages family sits in the Math Calculators hub alongside the Percentage Increase Calculator.

Frequently Asked Questions

How do you calculate the harmonic mean?

Divide the count of values by the sum of their reciprocals. For 60 and 40: 2 / (1/60 + 1/40) = 2 / 0.041667 = 48.

Why is the average of 60 and 40 km/h equal to 48, not 50?

Over equal distances you spend more time at the slower speed — 2.5 hours at 40 versus 1.667 at 60 — so the trip average (total distance over total time) is the harmonic mean, 48. The arithmetic mean would be right only for equal times.

When should I use the harmonic mean instead of the arithmetic mean?

When averaging rates whose denominator is held fixed: speeds over the same distance, prices paid with the same dollar amount, fuel economy over the same fuel volume. For plain additive quantities, use the arithmetic mean.

Is the harmonic mean always less than the arithmetic mean?

Yes, for positive values that are not all equal — the chain HM ≤ GM ≤ AM always holds, with equality only when every value is the same.

What is the harmonic mean of 1, 2 and 4?

3 / (1 + 0.5 + 0.25) = 3 / 1.75 = 1.714 — noticeably below the arithmetic mean of 2.333, because the small value 1 dominates the reciprocal sum.

Why is the F1 score a harmonic mean?

Because it should punish a classifier that trades one metric off against the other. A model with precision 1.0 and recall 0.0 gets an F1 of 0 under the harmonic mean, versus a flattering 0.5 under the arithmetic mean.

Can the harmonic mean handle zero?

No — a zero value makes its reciprocal infinite and the mean collapses to zero, which rarely describes the data honestly. Zero entries signal that the harmonic mean is the wrong tool, or that the zero is a data error.