Skip to content
FiftyCalc Free calculators for all 50 states

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

Sample figures

Hₙ—

ln n + γ (approximation) —

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Harmonic Number Calculator

n (whole number, 1 or more): enter 1 or more. Prefilled example: 10.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. n (whole number, 1 or more): enter 1 or more.
  2. 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.

Related calculators