Harmonic Number Calculator
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Enter a whole number n to get the harmonic number Hₙ, the sum of the reciprocals of the first n whole numbers.
Result
Hₙ
ln n + γ (approximation)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- n (whole number, 1 or more): enter 1 or more.
- Read the result: Hₙ; the panel also shows ln n + γ (approximation).
How this calculator works
The nth harmonic number is Hₙ = Σ 1/k for k = 1 to n. It grows like ln n + γ, where γ ≈ 0.5772156649 is the Euler-Mascheroni constant (NIST Digital Library of Mathematical Functions, 5.2 and 5.11).
The calculator uses the asymptotic expansion H_m = ln m + γ + 1/(2m) − 1/(12m²) + 1/(120m⁴) − 1/(252m⁶) at m = n + 6, then subtracts the six terms 1/(n + 1) … 1/(n + 6); the result is accurate to better than 10⁻⁹ for every n.
Worked example
| n (whole number, 1 or more) | 10 |
|---|
| Hₙ | 2.929 |
|---|---|
| ln n + γ (approximation) | 2.8798 |
Frequently asked questions
What is H₁₀?
H₁₀ = 7381/2520 ≈ 2.929.
Does the harmonic series converge?
No. Hₙ keeps growing without limit, but very slowly: H₁₀₀ is only about 5.1874.