In short

The harmonic mean (HM) of two positive numbers a and b is \dfrac{2ab}{a + b} — the reciprocal of the arithmetic mean of the reciprocals. It is the natural "average" for rates, speeds, and per-unit quantities. The HM is always the smallest of the three classical means: \text{HM} \leq \text{GM} \leq \text{AM}, with equality throughout if and only if a = b. This chain is one of the most powerful tools in inequality theory.

A car drives from Delhi to Agra (a distance of 200 km) at 80 km/h, and returns the same 200 km at 120 km/h. What is the car's average speed for the round trip?

The tempting answer is \dfrac{80 + 120}{2} = 100 km/h. But that is wrong. The car spent more time at the slower speed, so the slower leg should weigh more heavily.

Total distance: 200 + 200 = 400 km. Time for the first leg: \dfrac{200}{80} = 2.5 hours. Time for the return leg: \dfrac{200}{120} = \dfrac{5}{3} hours. Total time: 2.5 + \dfrac{5}{3} = \dfrac{25}{6} hours.

Average speed: \dfrac{400}{25/6} = \dfrac{400 \times 6}{25} = 96 km/h.

That 96 is not the arithmetic mean of 80 and 120. It is the harmonic mean:

H = \frac{2 \times 80 \times 120}{80 + 120} = \frac{19200}{200} = 96

Whenever you travel equal distances at different speeds, the average speed is not the AM — it is the HM. The harmonic mean handles rates naturally because rates are reciprocals of per-unit times, and the HM is built from reciprocals.

Round trip between Delhi and Agra at two different speedsA horizontal path with Delhi on the left and Agra on the right, 200 km apart. An arrow pointing right is labelled 80 km per h. An arrow pointing left is labelled 120 km per h. Below, the average speed is shown as 96 km per h, the harmonic mean, not 100 which would be the arithmetic mean. Delhi Agra 200 km 80 km/h → 2.5 h 120 km/h → 5/3 h Average speed = HM = 96 km/h (not 100)
Delhi to Agra at 80 km/h, return at 120 km/h. The AM of the two speeds is 100, but the actual average speed is $96$ — the harmonic mean. The car spends $2.5$ hours at the slow speed but only $\dfrac{5}{3}$ hours at the fast speed, so the slow leg dominates.

The HM of two numbers

Take two positive numbers a and b. Their harmonic mean is

H = \frac{2ab}{a + b}

This formula looks different from the AM (\dfrac{a+b}{2}) and the GM (\sqrt{ab}), but it has a clean structure. Rewrite it:

\frac{1}{H} = \frac{a + b}{2ab} = \frac{1}{2}\left(\frac{1}{a} + \frac{1}{b}\right)

The reciprocal of the HM is the AM of the reciprocals. The HM takes reciprocals, averages them, and takes the reciprocal back. This is exactly the flip-solve-flip pattern from harmonic progressions.

The three numbers \dfrac{1}{a}, \dfrac{1}{H}, \dfrac{1}{b} form an AP. Equivalently, a, H, b form an HP. So the HM of two numbers is the middle term of a three-term HP, just as the AM is the middle term of a three-term AP and the GM is the middle term of a three-term GP.

The three classical means of two numbers a and b on a number lineA number line with five marked points from left to right: a, HM, GM, AM, b. The HM is the smallest mean, the GM is in the middle, and the AM is the largest. All three fall between a and b. a b HM GM AM For a = 4, b = 16: HM = 6.4, GM = 8, AM = 10 HM ≤ GM ≤ AM, with equality iff a = b
The three classical means of $a$ and $b$ on the number line. The HM is always closest to $a$ (the smaller number), the AM is closest to $b$ (the larger number), and the GM sits between. For $a = 4, b = 16$: $\text{HM} = 6.4$, $\text{GM} = 8$, $\text{AM} = 10$.

Harmonic Mean of two numbers

For any two positive real numbers a and b, the harmonic mean is

H = \frac{2ab}{a + b}

Equivalently, \dfrac{1}{H} = \dfrac{1}{2}\left(\dfrac{1}{a} + \dfrac{1}{b}\right) — the reciprocal of the HM is the AM of the reciprocals. The three numbers a, H, b form a harmonic progression.

For the speed example: a = 80, b = 120, and H = \dfrac{2 \times 80 \times 120}{80 + 120} = \dfrac{19200}{200} = 96.

Inserting n harmonic means

Inserting n harmonic means between a and b creates an HP of n + 2 terms starting at a and ending at b. The method follows the same flip-solve-flip pattern as always.

Take a = \dfrac{1}{2} and b = \dfrac{1}{14} with n = 2 means.

Step 1. Flip to reciprocals: \dfrac{1}{a} = 2 and \dfrac{1}{b} = 14. You need an AP of 2 + 2 = 4 terms from 2 to 14.

Step 2. Find the common difference of the AP:

d = \frac{14 - 2}{2 + 1} = \frac{12}{3} = 4

Step 3. The reciprocal AP is 2, 6, 10, 14.

Step 4. Flip back: the HP is \dfrac{1}{2}, \dfrac{1}{6}, \dfrac{1}{10}, \dfrac{1}{14}.

The two inserted harmonic means are \dfrac{1}{6} and \dfrac{1}{10}.

Two harmonic means inserted between one-half and one-fourteenthTwo rows. Top row: HP terms one-half, one-sixth in red, one-tenth in red, one-fourteenth. Bottom row: reciprocal AP 2, 6, 10, 14 with equal gaps of 4. Arrows connect corresponding terms. HP 1/2 1/6 1/10 1/14 ↕ reciprocals AP (d = 4) 2 6 10 14 +4 +4 +4
Two harmonic means (red) inserted between $\dfrac{1}{2}$ and $\dfrac{1}{14}$. The reciprocal AP $2, 6, 10, 14$ has common difference $4$. Flipping back gives the HP $\dfrac{1}{2}, \dfrac{1}{6}, \dfrac{1}{10}, \dfrac{1}{14}$.

The general recipe: to insert n harmonic means between a and b, form an AP of n + 2 terms from \dfrac{1}{a} to \dfrac{1}{b} with common difference d = \dfrac{1/(b) - 1/(a)}{n + 1}, then take the reciprocal of each AP term.

The inequality chain: HM \leq GM \leq AM

This is the centrepiece. For any two positive numbers a and b:

\frac{2ab}{a + b} \leq \sqrt{ab} \leq \frac{a + b}{2}

with equality throughout if and only if a = b.

You already know the right half of this chain from the geometric mean article: \text{GM} \leq \text{AM}. The left half — \text{HM} \leq \text{GM} — completes the picture.

Proof that HM \leq GM

Start from what you already know: \text{GM} \leq \text{AM}. Apply this to the reciprocals \dfrac{1}{a} and \dfrac{1}{b}:

\sqrt{\frac{1}{a} \cdot \frac{1}{b}} \leq \frac{1/a + 1/b}{2}

The left side is \dfrac{1}{\sqrt{ab}} = \dfrac{1}{\text{GM}}. The right side is \dfrac{1}{H} = \dfrac{1}{\text{HM}} (since the reciprocal of the HM is the AM of the reciprocals). So:

\frac{1}{\text{GM}} \leq \frac{1}{\text{HM}}

Since both means are positive, flipping the inequality gives:

\text{HM} \leq \text{GM}

Equality holds when \dfrac{1}{a} = \dfrac{1}{b}, i.e., when a = b.

Proof of the full chain (alternative: direct algebraic proof)

Here is a self-contained proof of \text{HM} \leq \text{GM} \leq \text{AM} using only the fact that squares are non-negative.

Part 1: GM \leq AM. From (\sqrt{a} - \sqrt{b})^2 \geq 0:

a - 2\sqrt{ab} + b \geq 0 \qquad \Longrightarrow \qquad \frac{a + b}{2} \geq \sqrt{ab}

Part 2: HM \leq GM. From (\sqrt{a} - \sqrt{b})^2 \geq 0:

a - 2\sqrt{ab} + b \geq 0 \qquad \Longrightarrow \qquad a + b \geq 2\sqrt{ab}

Multiply both sides of the original inequality \text{GM} \leq \text{AM} in a different way. Since a + b \geq 2\sqrt{ab}:

\sqrt{ab}(a + b) \geq 2ab
\sqrt{ab} \geq \frac{2ab}{a + b} = \text{HM}

In both parts, equality requires \sqrt{a} = \sqrt{b}, i.e., a = b.

Interactive: HM, GM, and AM as b varies with a fixed at 4A coordinate plane with b on the horizontal axis from 1 to 25 and mean value on the vertical axis from 0 to 16. Three curves are plotted for a equals 4: the AM which is a straight line, the GM which is a square root curve, and the HM which is a curve that starts at 4 when b equals 4 and decreases for b much larger. The HM is always below the GM, which is always below the AM. All three meet at b equals 4. 1 5 10 15 20 25 0 4 8 12 16 a = 4 (fixed) AM GM HM drag to change b
With $a = 4$ fixed, the three means are plotted as $b$ varies. The AM (dark) is always on top, the GM (soft red) is in the middle, and the HM (red) is always on the bottom. All three curves meet at the single point $b = 4$ where $a = b$ and all means are equal. Drag the point to see how the gap between the means grows as $b$ moves away from $4$.

When equality holds

The condition for \text{HM} = \text{GM} = \text{AM} is a = b. In that case, all three means equal a. As soon as a \neq b, strict inequalities hold: \text{HM} < \text{GM} < \text{AM}.

The more unequal a and b are, the larger the gaps between the three means. For a = 1, b = 100: \text{HM} = \dfrac{200}{101} \approx 1.98, \text{GM} = 10, \text{AM} = 50.5. The HM is pulled strongly toward the smaller number, the AM toward the larger number, and the GM sits between them.

Two worked examples

Example 1: Find the harmonic mean of 12 and 15

Step 1. Take the reciprocals.

\frac{1}{12} \quad \text{and} \quad \frac{1}{15}

Why: the HM is defined as the reciprocal of the AM of the reciprocals.

Step 2. Compute the AM of the reciprocals.

\frac{1}{2}\left(\frac{1}{12} + \frac{1}{15}\right) = \frac{1}{2} \cdot \frac{5 + 4}{60} = \frac{1}{2} \cdot \frac{9}{60} = \frac{9}{120} = \frac{3}{40}

Why: finding a common denominator for the fractions, then averaging.

Step 3. Take the reciprocal to get the HM.

H = \frac{1}{3/40} = \frac{40}{3} \approx 13.33

Why: the HM is the reciprocal of the AM of the reciprocals.

Step 4. Verify using the formula: H = \dfrac{2 \times 12 \times 15}{12 + 15} = \dfrac{360}{27} = \dfrac{40}{3}. Confirmed. Also check the ordering: \text{AM} = \dfrac{12 + 15}{2} = 13.5 and \text{GM} = \sqrt{12 \times 15} = \sqrt{180} \approx 13.42. So \text{HM} \approx 13.33 < \text{GM} \approx 13.42 < \text{AM} = 13.5. The chain holds.

Result: The harmonic mean of 12 and 15 is \dfrac{40}{3} \approx 13.33.

Number line showing HM, GM, and AM of 12 and 15A zoomed-in number line from 12 to 15 with three marked points: HM at approximately 13.33, GM at approximately 13.42, and AM at 13.5. All three are clustered between 12 and 15, with HM closest to 12 and AM closest to 15. 12 15 HM ≈ 13.33 GM ≈ 13.42 AM = 13.5 HM < GM < AM (since 12 ≠ 15)
The three means of $12$ and $15$ on a zoomed number line. The HM ($\approx 13.33$) sits closest to the smaller number, the AM ($13.5$) sits closest to the larger, and the GM ($\approx 13.42$) is between them. Since $12$ and $15$ are close in value, the three means are also close — the gaps would widen if $a$ and $b$ were further apart.

The three means are tightly clustered because 12 and 15 are not very different. For numbers like 1 and 100, the three means spread far apart.

Example 2: A person cycles to school at 12 km/h and walks back at 4 km/h. Find the average speed for the round trip.

This is an equal-distance, different-speed problem — the harmonic mean applies directly.

Step 1. Identify the two speeds: a = 12 km/h and b = 4 km/h.

Why: the same distance is covered at two different speeds, so the average speed is the HM.

Step 2. Apply the HM formula.

H = \frac{2 \times 12 \times 4}{12 + 4} = \frac{96}{16} = 6

Why: H = \dfrac{2ab}{a + b} is the harmonic mean of the two speeds.

Step 3. Verify with a concrete distance. Let the one-way distance be 12 km (any value works).

Time cycling: \dfrac{12}{12} = 1 hour. Time walking: \dfrac{12}{4} = 3 hours. Total distance: 24 km. Total time: 4 hours. Average speed: \dfrac{24}{4} = 6 km/h. Confirmed.

Why: average speed is total distance divided by total time, and the result matches the HM.

Step 4. Check the chain: \text{AM} = \dfrac{12 + 4}{2} = 8, \text{GM} = \sqrt{12 \times 4} = \sqrt{48} \approx 6.93, \text{HM} = 6. So 6 < 6.93 < 8. The ordering holds.

Result: The average speed for the round trip is 6 km/h.

Bar chart comparing time spent cycling versus walkingTwo horizontal bars stacked vertically. The top bar represents cycling: narrow, labelled 1 hour at 12 km per h. The bottom bar represents walking: three times wider, labelled 3 hours at 4 km per h. Below, the average speed is shown as 6 km per h. Cycling 1 h at 12 km/h → 12 km Walking 3 h at 4 km/h → 12 km total: 4 h, 24 km avg speed = 24/4 = 6 km/h = HM
The walk takes three times as long as the cycle, even though the distance is the same. The slow speed dominates the average because more time is spent at that speed. The HM ($6$) is much closer to the walking speed ($4$) than to the cycling speed ($12$) — it is pulled toward the slower rate.

The bar chart shows why the arithmetic mean (8 km/h) would overestimate the average speed: it would treat the two speeds as equally weighted, ignoring the fact that the person spends 3 hours walking and only 1 hour cycling.

Common confusions

Going deeper

If you came here to learn the HM formula, the inequality chain, and the speed-averaging application, you have it. The rest of this section extends the HM to n numbers and proves a beautiful identity linking all three means.

The HM for n numbers

For n positive numbers x_1, x_2, \dots, x_n, the harmonic mean is

H = \frac{n}{\dfrac{1}{x_1} + \dfrac{1}{x_2} + \cdots + \dfrac{1}{x_n}} = \frac{n}{\displaystyle\sum_{i=1}^{n} \frac{1}{x_i}}

The denominator is the sum of all reciprocals. The full AM-GM-HM inequality for n numbers reads:

\frac{n}{\sum 1/x_i} \leq \sqrt[n]{\prod x_i} \leq \frac{\sum x_i}{n}

with equality if and only if all x_i are equal.

The identity \text{GM}^2 = \text{AM} \times \text{HM}

For two positive numbers a and b:

\text{AM} \times \text{HM} = \frac{a+b}{2} \cdot \frac{2ab}{a+b} = ab = (\sqrt{ab})^2 = \text{GM}^2

This says: the geometric mean of two numbers is also the geometric mean of their arithmetic and harmonic means. The GM sits at the exact multiplicative midpoint of the AM and HM — a fact that is both beautiful and useful.

One consequence: if you know any two of the three means, you can find the third. Given \text{AM} = 10 and \text{GM} = 8, the HM is \dfrac{\text{GM}^2}{\text{AM}} = \dfrac{64}{10} = 6.4. And you can recover a and b themselves: they are the roots of t^2 - 2(\text{AM})t + \text{GM}^2 = 0, i.e., t^2 - 20t + 64 = 0, giving t = 4 or t = 16.

Resistors in parallel revisited

When n equal resistors of resistance R are connected in parallel, the total resistance is \dfrac{R}{n} — which is the reciprocal of the sum of n copies of \dfrac{1}{R}. More generally, for unequal resistances R_1, R_2, \dots, R_n in parallel:

R_{\text{total}} = \frac{n}{\dfrac{1}{R_1} + \dfrac{1}{R_2} + \cdots + \dfrac{1}{R_n}} \cdot \frac{1}{1} = \frac{1}{\sum \dfrac{1}{R_i}}

This is not the HM (it would be the HM if there were an extra factor of n in the numerator), but the structure is the same — the total resistance is the reciprocal of the sum of conductances. The HM gives the "average resistance" in the sense that replacing every resistor by a single resistor of value equal to the HM would give the same total resistance as replacing them all by that value.

Where this leads next

The harmonic mean completes the trio of classical means. Together with the AM and GM, it forms an inequality chain that is the starting point for competition-level algebra.