Ad Space
Math Calculators

Harmonic Number Calculator

Calculate the nth harmonic number — the sum of the reciprocals of the first n positive integers.

Harmonic number Hₙ
Approximation (ln n + γ)
Ad Space — 300×250

About the Harmonic Number Calculator

The nth harmonic number is the sum of the reciprocals of the first n positive integers: 1 + 1/2 + 1/3 + ... + 1/n. Harmonic numbers grow without bound as n increases, but only very slowly — roughly like the natural logarithm of n.

Formula: Hn = Σk=1n (1 ÷ k) ≈ ln(n) + γ

The approximation uses the Euler–Mascheroni constant γ ≈ 0.5772156649, and it gets more accurate as n grows — it's remarkably close even for fairly small n. Because the harmonic series 1 + 1/2 + 1/3 + ... diverges (it has no finite sum as n approaches infinity), harmonic numbers are a classic example of a series whose individual terms shrink toward zero while the running total keeps growing forever.

Harmonic numbers show up in the analysis of algorithms (such as the expected number of comparisons in quicksort), in the coupon collector's problem, and in physics problems involving stacking and resonance.

Ad Space