Home · Everyday · Sequences & Series · Harmonic Number Calculator

Harmonic Number Calculator

Sum the reciprocals 1 + 1/2 + … + 1/n — the nth harmonic number — with its logarithmic approximation alongside.

Your figures

Example result — edit the figures to make it yours

2.928968

H(n)

Computed from the inputs on this page with the formula below — change any figure and every result updates.

Approx. ln(n) + γ2.879801
Last term 1/n0.100000

What this calculator does

Sum the reciprocals 1 + 1/2 + … + 1/n — the nth harmonic number — with its logarithmic approximation alongside. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.

The formula and method

H(n) = Σ 1/k for k = 1..n; H(n) ≈ ln(n) + γ

The nth harmonic number is the sum of the first n unit fractions, H(n) = 1 + 1/2 + … + 1/n. It grows without bound but extremely slowly, tracking ln(n) + γ where γ ≈ 0.5772156649 is the Euler–Mascheroni constant.

The approximation overestimates slightly for small n and improves as n grows; the gap H(n) − ln(n) settles towards γ. n must be a positive whole number — the sum is only defined term by term.

Worked example

With the example inputs this page opens with (n 10), the result is 2.928968 — h(n). Computed from the inputs on this page with the formula below — change any figure and every result updates.

Quick reference

Quick reference — varying n
nH(n)Approx. ln(n) + γLast term 1/n
110.5772161
21.51.2703630.5
52.2833332.1866540.2
102.9289682.8798010.1
203.597743.5729480.05
504.4992054.4892390.02
1005.1873785.1823860.01

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

How does the Harmonic Number Calculator work?

Sum the reciprocals 1 + 1/2 + … + 1/n — the nth harmonic number — with its logarithmic approximation alongside. N → Harmonic number H(n). The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Harmonic Number Calculator need?

N → Harmonic number H(n). Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.

Is the Harmonic Number Calculator free to use?

Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.