🧮
🧮 Math & statistics

Harmonic Number Calculator (Hₙ = 1 + 1/2 + … + 1/n)

Results update as you type.

Your numbers

Understanding the harmonic number calculator — concept and principle

This calculator finds the harmonic number Hₙ = 1 + 1/2 + 1/3 + … + 1/n, as an exact fraction for small n, together with the approximation ln n + γ + 1/(2n), the gap Hₙ − ln n and the average term. It also finds the smallest n for which Hₙ reaches a target. Use it in calculus (the harmonic series), algorithm analysis and probability puzzles such as the coupon collector.

H₁₀H₁₀terms shrink, sum keeps growingH₁₀ = sum of the 10 barsln 10 + γ + 1/202.929800758H₁₀ − ln 100.626383161First n with Hₙ ≥ 583H₁₀ = 7381/25202.928968254
The harmonic series grows like ln n, so it diverges, but very slowly.

How it is calculated

Hₙ = Σ_(k=1)^n 1/k

Approximation: Hₙ ≈ ln n + γ + 1/(2n) − 1/(12n²) + …, with γ ≈ 0.5772156649

The principle

Each term 1/k is the area of a strip of width 1 and height 1/k, and these strips sit just above the curve y = 1/x. The area under that curve from 1 to n is ln n, so Hₙ grows like ln n, slowly but without limit: the harmonic series diverges. The leftover pieces between the strips and the curve add up to a fixed amount, the Euler–Mascheroni constant γ, which is why Hₙ − ln n approaches 0.5772.

Worked example

Default inputs: n = 10, target 5.

  1. H₁₀ = 1 + 1/2 + … + 1/10 = 7381/2520 = 2.928968254.
  2. Approximation: ln 10 + 0.5772157 + 1/20 = 2.302585 + 0.577216 + 0.05 = 2.929800758.
  3. H₁₀ − ln 10 = 0.626383161, on its way down toward γ.
  4. Average of the terms = 2.928968254 ÷ 10 = 0.2928968254.
  5. Smallest n with Hₙ ≥ 5 = 83.

How to read the result

Growth is extremely slow: it takes 83 terms to pass 5 and about 12,367 to pass 10. In the coupon-collector problem, collecting all n different coupons takes on average n·Hₙ draws; for 10 coupons that is about 29.3 draws.

Common mistakes

Keep in mind: For very large n the value comes from an asymptotic series; it is accurate to the digits shown, not beyond.

Frequently asked questions

Does the harmonic series converge?

No, it grows without bound, roughly like ln n.

What is H₁₀?

7381/2520 ≈ 2.929.

What is the Euler–Mascheroni constant?

The limit of Hₙ − ln n, about 0.5772.

Sources: E. W. Weisstein, "Harmonic Number", Wolfram MathWorld

Checked 9 Nov 2026. Weisstein, E. W., “Harmonic Number”, Wolfram MathWorld (definition Hₙ = Σₖ₌₁ⁿ 1/k, eq. 1; asymptotic series Hₙ ~ ln n + γ + 1/(2n) − 1/(12n²) + 1/(120n⁴) − 1/(252n⁶), eq. 4; Hₙ is never an integer for n > 1). γ = 0.5772156649… (standard value).

🧮 All math & statistics tools →🌍 Calculators by country →