Category

Harmonic Number Calculator: nth Harmonic Number & Sum of the Harmonic Series

Find the n-th harmonic number Hₙ and the sum of the harmonic series of the first n terms. Works for integers (with the exact fraction) and non-integers (via the digamma function), plus the ln(n) + γ approximation.

0 calculations

Parameters

Enter the value of n

Enter n to compute the n-th harmonic number and the sum of the harmonic series of the first n terms.

Harmonic Number Calculator

Our harmonic number calculator is the perfect solution for anyone seeking to find the n-th harmonic number or to calculate the sum of the harmonic series of the first n terms. It is common to have misconceptions about harmonic numbers and the harmonic series, so below we walk through the core ideas step by step. Whether you're a novice or an advanced reader, we hope you'll learn something interesting today.

What is a harmonic number? Harmonic number equation

We define the n-th harmonic number as the sum of the reciprocals of the first n natural numbers:

Hₙ = 1/1 + 1/2 + 1/3 + … + 1/n = Σ (1/k),  k = 1 … n

where:

  • Hₙ is the n-th harmonic number; and
  • n is any natural number.

As a consequence of Bertrand's postulate, Hₙ is never an integer for any n > 1 — the only integer harmonic number is H₁ = 1.

🔎 Notice that the harmonic numbers are a close approximation of the natural logarithm, given by ln n = ∫₁ⁿ (1/x) dx. In fact Hₙ ≈ ln n + γ, where γ ≈ 0.5772156649 is the Euler–Mascheroni constant.

How do you calculate a harmonic number for integers?

To calculate the harmonic number Hₙ for any integer n, use the following steps:

  1. Divide 1 by the first n natural numbers to get the sequence 1/1, 1/2, 1/3, …, 1/n.
  2. Add every number in this sequence to get Hₙ = 1 + 1/2 + 1/3 + … + 1/n.
  3. Verify your answer using our harmonic number calculator above.

For example, to calculate the 5th harmonic number H₅, we evaluate the sum:

H₅ = 1 + 1/2 + 1/3 + 1/4 + 1/5 = 137/60 ≈ 2.2833333333

How do you find the harmonic number of a non-integer?

Harmonic numbers extend naturally to non-integer (and even real) values of n through the digamma function ψ(x):

Hₙ = ψ(n + 1) + γ

This generalized definition agrees with the sum formula whenever n is a positive integer, but it also lets us evaluate quantities such as H₂.₅ or H₀.₇₅. Our calculator automatically switches to the digamma formula when you enter a non-integer value.

Calculating harmonic series sums and harmonic numbers

The sum of the harmonic series of the first n terms is exactly the n-th harmonic number — the two are the same quantity. The full harmonic series 1 + 1/2 + 1/3 + … diverges: its partial sums Hₙ grow without bound, but very slowly (roughly like ln n). For large n a handy asymptotic approximation is:

Hₙ ≈ ln n + γ + 1/(2n) − 1/(12n²)

How to use this harmonic number calculator

  1. Enter the value of n — the index (or number of terms). It can be an integer such as 10, or a non-integer such as 2.5.
  2. Press Calculate.
  3. Read off the results: the n-th harmonic number Hₙ (with its exact fraction for small integer n), the ln n + γ approximation, the approximation error, the governing formulas, and a term-by-term breakdown of the harmonic series.

FAQs

What is the 10th harmonic number?

H₁₀ = 7381/2520 ≈ 2.9289682540.

Is the harmonic series convergent?

No. The harmonic series diverges — its partial sums Hₙ increase without limit as n grows, even though each added term becomes smaller and smaller.

What is the relation between the harmonic number and the natural logarithm?

The difference Hₙ − ln n approaches the Euler–Mascheroni constant γ ≈ 0.5772 as n → ∞, so Hₙ ≈ ln n + γ is an excellent estimate for large n.

Can a harmonic number be a whole number?

Only H₁ = 1. For every n > 1 the harmonic number Hₙ is a non-integer fraction.

Calculation History

Loading...