Harmonic Series Calculator

Calculate a finite harmonic sum, its final reciprocal term, and useful logarithmic bounds.

Harmonic Number Calculator
Enter how many reciprocal terms to add, from 1 through 1,000,000.

About the harmonic series calculator

The harmonic series is formed by adding the reciprocals of the positive integers: one, one-half, one-third, one-fourth, and so on. A finite sum through the nth reciprocal is called the nth harmonic number and is usually written H followed by n. This calculator evaluates that finite sum directly, preserving the contribution of every term up to the requested limit. To calculate a harmonic number, begin with zero and add 1 divided by each integer from one through n. For five terms, the calculation is 1 + 1/2 + 1/3 + 1/4 + 1/5, which equals approximately 2.2833333333. For ten terms, the result is approximately 2.9289682540. Each new term is smaller than the previous one, so the partial sums grow steadily but increasingly slowly. Although every added fraction approaches zero, the infinite harmonic series diverges. Its partial sums have no finite upper limit. This famous result illustrates that terms tending to zero are necessary but not sufficient for an infinite series to converge. Growth is logarithmic: reaching substantially larger totals requires dramatically more terms. The harmonic number is close to the natural logarithm of n plus the Euler-Mascheroni constant, approximately 0.57721. Simple integral comparisons provide useful checks on the exact finite result. The natural logarithm of n plus one is less than the nth harmonic number, and the harmonic number is less than one plus the natural logarithm of n. The calculator displays these lower and upper bounds. They become relatively tight as n grows and help explain the logarithmic growth pattern without replacing direct summation. Harmonic numbers appear throughout mathematics and computer science. They describe expected costs in randomized algorithms, the average number of comparisons in some data structures, coupon-collector behavior, divisor sums, and probability models. In physics and engineering, related reciprocal sums arise in resonance and signal analysis. Musicians may recognize the word harmonic in another context, but this calculator concerns the mathematical reciprocal series rather than acoustic harmonic frequencies. Enter a positive whole number no larger than one million. The displayed sum uses ten decimal places, while computation uses JavaScript double-precision arithmetic. For extremely large indices, specialized approximations can be faster and may control floating-point error more carefully. Within this calculator's stated range, direct summation provides a transparent and dependable educational result.

Harmonic series examples

TermsPartial sumExpanded form
11.0000000000The first harmonic number is exactly one.
52.28333333331 + 1/2 + 1/3 + 1/4 + 1/5.
102.9289682540The tenth reciprocal is 0.1.

How to calculate a harmonic sum

  1. Enter a positive whole number for the number of reciprocal terms.
  2. Select Calculate Harmonic Sum to add each term from one through one divided by n.
  3. Read the partial sum rounded to ten decimal places.
  4. Compare the result with its final term and logarithmic bounds.

Harmonic series FAQ

What is the nth harmonic number?

It is the finite sum of reciprocals from one through one divided by n. Unlike the infinite series, every harmonic number is finite.

Does the harmonic series converge?

No, the infinite harmonic series diverges even though its individual terms approach zero. Its partial sums grow without bound, but they grow very slowly.

Why does the calculator require a whole number?

The input counts a finite number of discrete terms. Generalized harmonic functions can extend the idea, but they are outside this calculator's scope.

How accurate is the displayed result?

The tool directly sums the requested terms using double-precision arithmetic and displays ten decimal places. Very large scientific calculations may require arbitrary-precision software and formal error bounds.

What is the Euler-Mascheroni constant?

It is the limiting difference between a harmonic number and the natural logarithm of its index. Its value begins 0.57721 and helps approximate large harmonic numbers.