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.
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
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
| n | H(n) | Approx. ln(n) + γ | Last term 1/n |
|---|---|---|---|
| 1 | 1 | 0.577216 | 1 |
| 2 | 1.5 | 1.270363 | 0.5 |
| 5 | 2.283333 | 2.186654 | 0.2 |
| 10 | 2.928968 | 2.879801 | 0.1 |
| 20 | 3.59774 | 3.572948 | 0.05 |
| 50 | 4.499205 | 4.489239 | 0.02 |
| 100 | 5.187378 | 5.182386 | 0.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.