No ads, no sign-upChecked 2026-08-24

Harmonic Mean of Two Numbers

Result

2.400000

Result: 2.400000
How the result moves

For two values the harmonic mean is 2ab ÷ (a + b): for 2 and 3 that is 12 ÷ 5 = 2.4. This calculator takes exactly two numbers, not a whole list. Drive equal distances at 40 and 60 km/h and your average speed is 48, not 50 — that gap is what the harmonic mean is for.

Worked examples

How it's calculated

H = 2ab ÷ (a + b)

  1. StepEnter two positive numbers; zero and negatives have no harmonic mean.
  2. StepMultiply them and double the product.
  3. StepDivide that by the sum of the two values.
  4. ResultCompare with the arithmetic mean (a + b) ÷ 2 — it is never larger.

Reference table

a, bArithmetic meanHarmonic mean
1, 111
0.5, 21.250.8
2, 32.52.4
3, 64.54
10, 201513.333333
40, 605048

Questions

How do I calculate the harmonic mean of two numbers?

Multiply the two values, double the result and divide by their sum: H = 2ab ÷ (a + b). The harmonic mean of 2 and 3 is 12 ÷ 5 = 2.4.

What is the harmonic mean?

It is the reciprocal of the average of the reciprocals, which for two numbers simplifies to 2ab ÷ (a + b). It is the correct way to average rates and ratios, most famously the average speed of a trip that covers equal distances at two speeds.

How does it differ from the arithmetic mean?

The arithmetic mean is the plain (a + b) ÷ 2. The harmonic mean gives more weight to the smaller value, so it is always less than or equal to the arithmetic one, equal only when a and b match. For 2 and 3 that is 2.4 against 2.5.

Why is the harmonic mean used for average speed?

Over the same distance you spend more time at the slower speed, so a plain average overstates the result. Equal distances at 40 and 60 km/h give 2 × 40 × 60 ÷ (40 + 60) = 48 km/h, not 50.

Does it work for more than two numbers?

The harmonic mean itself does — it is n divided by the sum of the reciprocals of n values. This calculator is built for exactly two inputs, which is why it uses the short form 2ab ÷ (a + b).

Sources and last check

  1. mathworld.wolfram.com

Information, not professional advice.