Harmonic Number Calculator
- The harmonic number H(n) adds the reciprocals 1 + 1/2 + 1/3 + ... + 1/100. Summing all 100 terms gives H(100) = 5.18738.
- Euler's approximation replaces the sum with ln n + gamma + 1/(2n) = 5.18739, overshooting by only 8.33 x 10^-6 - the approximation is already excellent at n = 100.
- The gap H(n) - ln(n) = 0.58221 creeps toward Euler's constant gamma = 0.57722 as n grows, which is why the harmonic series diverges so slowly.
- The harmonic series diverges: its partial sums grow without bound, but only logarithmically - you need 12,367 terms just to pass 10.
A harmonic number calculator computes H(n), the sum of the reciprocals of the whole numbers from 1 through n. It is the fastest way to get an exact answer without adding dozens or thousands of fractions by hand. The tenth harmonic number, H(10), is 2.92897, and H(100) is 5.18738. The numbers grow slowly: the harmonic series first reaches a sum of 5 at term 83, where H(83) is 5.00207 and H(82) is still 4.99002. Passing a sum of 10 takes 12,367 terms.
The method behind the calculator is the accepted standard for this kind of calculation: summing the reciprocals directly, term by term, which gives exact values rather than estimates. Euler's approximation ln n + gamma + 1/(2n) is close but not exact. At n = 100 it gives 5.18739, an overshoot of 8.33 x 10^-6, and it predicts that 84 terms are needed to reach a sum of 5, one over the exact count of 83. The direct sum also shows how H(n) - ln(n) closes on Euler's constant gamma = 0.57722, standing at 0.62638 at n = 10 and 0.58221 at n = 100. This page shows the formula, step-by-step workings, worked examples and sources so you can check every result.
Worked examples
H(10)
(Harmonic number H(n) · 10 terms · 5)
| Harmonic number H(10) | 2.92897 |
| Euler approximation ln n + gamma + 1/(2n) | 2.92980 |
| Approximation overshoot | 8.33 x 10^-4 |
| H(n) - ln(n), closing on gamma | 0.62638 |
H(100)
(Harmonic number H(n) · 100 terms · 5)
| Harmonic number H(100) | 5.18738 |
| Euler approximation ln n + gamma + 1/(2n) | 5.18739 |
| Approximation overshoot | 8.33 x 10^-6 |
| H(n) - ln(n), closing on gamma | 0.58221 |
Terms to reach 5
(Terms needed to reach a target sum · 10 terms · 5)
| Terms needed | 83 |
| H(83), the first sum at or past the target | 5.00207 |
| H(82), the sum just before | 4.99002 |
| Euler estimate e^(target - gamma), rounded up | 84 |
How harmonic numbers are calculated
The nth harmonic number, written H(n), is the sum of the reciprocals of the first n whole numbers: H(n) = 1 + 1/2 + 1/3 + ... + 1/n. There is no closed-form shortcut that gives an exact answer, so a harmonic number calculator adds the terms one at a time — or uses an approximation when n is large. Each new term is smaller than the one before it, so the sum grows, but ever more slowly.
The tenth harmonic number makes the pattern concrete. Adding 1 + 0.5 + 0.33333 + 0.25 + 0.2 + 0.16667 + 0.14286 + 0.125 + 0.11111 + 0.1 term by term gives H(10) = 2.92897. Pushing to one hundred terms gives H(100) = 5.18738. Between the tenth and hundredth terms the sum gains only about 2.26, even though ninety more fractions were added — a clear sign of how slowly the harmonic series climbs.
For large n, Euler's approximation ln n + gamma + 1/(2n) stands in for the full sum. At n = 100 it returns 5.18739, which overshoots the exact H(100) of 5.18738 by 8.33 x 10^-6. That tiny error is why the approximation is useful: it avoids adding thousands of fractions while staying very close to the true value.
The slow growth has practical consequences. The harmonic series first reaches a sum of 5 at term 83, where H(83) is 5.00207; one term earlier, H(82) is still 4.99002. Euler's shortcut predicts the count to reach 5 as 84 — one over the exact 83. Reaching a sum of 10 takes 12,367 terms. As n grows, H(n) - ln(n) closes in on Euler's constant, gamma = 0.57722: the difference is 0.62638 at n = 10 and 0.58221 at n = 100.
- H(10) = 2.92897, built from ten reciprocal terms.
- H(100) = 5.18738; Euler's approximation gives 5.18739, an overshoot of 8.33 x 10^-6.
- The sum first passes 5 at term 83: H(83) = 5.00207, while H(82) = 4.99002.
- Euler's shortcut predicts 84 terms to reach 5, one more than the exact 83.
- A sum of 10 requires 12,367 terms.
- H(n) - ln(n) approaches gamma = 0.57722: 0.62638 at n = 10 and 0.58221 at n = 100.
Euler's approximation
Euler's approximation is the standard shortcut for estimating a harmonic number without adding every term. It reads ln n + gamma + 1/(2n), where gamma is Euler's constant, 0.57722. The formula combines the natural logarithm of n, the constant, and a small correction term, 1/(2n), that sharpens the estimate for modest values of n. A harmonic number calculator can apply this expression instantly, which is why it is worth understanding what the result does and does not tell you.
At n = 10 the approximation returns 2.92980, while the exact tenth harmonic number H(10) is 2.92897. The estimate is therefore slightly high. At n = 100 the approximation gives 5.18739 against an exact H(100) of 5.18738, an overshoot of 8.33 x 10^-6. Compare that with the gap at n = 10, which is 8.33 x 10^-4. The error has shrunk by a factor of roughly one hundred as n grew by a factor of ten, and the overshoot falls from 8.33 x 10^-4 to 8.33 x 10^-6.
The reason the approximation improves is visible in the related quantity H(n) - ln(n). That difference closes in on Euler's constant as n rises: it is 0.62638 at n = 10 and 0.58221 at n = 100, moving toward gamma = 0.57722. The 1/(2n) term accounts for the leading part of what remains, which is why the full expression lands so close to the exact sum even at small n.
The approximation is a guide, not a substitute for exact counting when a threshold matters. The harmonic series first reaches a sum of 5 at term 83, where H(83) is 5.00207 and H(82) is still 4.99002. Euler's shortcut predicts the count to reach 5 as 84, one over the exact 83. For larger targets the gap between estimate and exact count widens in absolute terms even as the relative error stays small: passing a sum of 10 takes 12,367 terms. Use the approximation to understand how harmonic numbers grow, and use exact summation when you need the precise term where a sum crosses a value.
Running the series backwards
A harmonic number calculator usually runs forward: you give it a term count and it returns the sum. The target mode runs the other way. You supply a sum, and the tool finds the first term at which the harmonic series reaches or passes it. This is the harder direction, because there is no clean formula that inverts H(n) exactly. The work is done by searching term by term, and the results show why shortcuts only get you close.
The first sum of 5 is a good example. The harmonic series first reaches a sum of 5 at term 83, where H(83) is 5.00207. One term earlier, H(82) is still 4.99002, just below the target. So the exact answer is 83, and any estimate that lands on 84 has overshot by one term. A common shortcut predicts the count to reach 5 as 84, one over the exact 83. That is the estimate e^(target - gamma) at work, and it is close but visibly off.
The reason for the gap is the correction term. Euler's approximation ln n + gamma + 1/(2n) is accurate for large n, but the 1/(2n) piece matters at small counts. At n = 83, that correction is small in absolute size yet large enough to shift a rounded answer by a full term. The same pattern shows up at other targets: passing a sum of 10 takes 12,367 terms, a count far beyond what a rough estimate suggests. Running a harmonic number calculator in target mode makes that difference concrete, because you see the exact term where the sum crosses the line rather than a number that is merely near it.
The approximation improves as n grows, which is why the shortcut is still worth knowing. H(100) is 5.18738, and Euler's approximation ln n + gamma + 1/(2n) gives 5.18739, an overshoot of 8.33 x 10^-6. The error shrinks, but it does not vanish, and near a threshold a tiny error can flip the term count. H(n) - ln(n) closes on Euler's constant gamma = 0.57722: it is 0.62638 at n = 10 and 0.58221 at n = 100. That slow drift toward gamma is the same effect that makes the reverse estimate land one term high at a target of 5.
For a sum like 5, where the crossing term is small, trust the search over the shortcut. The exact figures, H(83) = 5.00207 and H(82) = 4.99002, bracket the target and leave no ambiguity. The estimate of 84 is a useful sanity check, not the answer.
The slowest divergence in mathematics
The harmonic series grows, but it grows in a way that makes most growth look impatient. Each new term you add is smaller than the last, and the total creeps upward with painful slowness. A harmonic number calculator makes this visible in a way that adding terms by hand cannot: you can watch the sum inch forward and see how many terms each new milestone demands.
The first milestones already tell the story. The tenth harmonic number, H(10), is 2.92897. By the hundredth term you have only reached H(100) = 5.18738. Euler's approximation, ln n + gamma + 1/(2n), gives 5.18739 for the same point — an overshoot of just 8.33 x 10^-6. The shortcut is remarkably tight, yet the totals themselves stay stubbornly small.
To see the cost of each step, follow the sum to 5. The harmonic series first reaches a sum of 5 at term 83, where H(83) is 5.00207 while H(82) is still 4.99002 — one term carries the total across. Euler's shortcut predicts the count to reach 5 as 84, one over the exact 83. Passing a sum of 10 takes 12,367 terms, and passing 20 takes hundreds of millions. This is logarithmic growth in action: each fixed increase in the total requires a wildly larger number of terms. A harmonic number calculator turns that pattern into a set of counts you can compare side by side.
The same arithmetic explains the familiar book-overhang puzzle, where books stacked at the edge of a table lean out over the side. Each book's contribution to the overhang shrinks like the terms of the harmonic series, so the reach grows with the logarithm of the stack height. Getting a modest overhang takes a reasonable stack; doubling the reach takes enormously more books. The numbers above are the puzzle's price tag: 83 terms to pass 5, 12,367 to pass 10, hundreds of millions to pass 20.
The gap between the sum and the logarithm narrows toward Euler's constant, gamma = 0.57722. H(n) - ln(n) is 0.62638 at n = 10 and 0.58221 at n = 100, closing in slowly on that value. Even the difference between the sum and its smooth approximation converges at a crawl — which is exactly why this is the slowest divergence in mathematics.
FAQs
What is H(10)?
H(10) is 2.92897, the sum of the reciprocals of the whole numbers from 1 through 10: 1 + 1/2 + ... + 1/10. It is the tenth harmonic number, the value the calculator returns for n = 10.
What is H(100)?
H(100) is 5.18738. That is the exact sum of 1 + 1/2 + ... + 1/100. Euler's approximation gives 5.18739, a difference of 0.00001 from the exact value, which shows how close the approximation is even at n = 100.
How many terms until the harmonic series passes 5?
It takes 83 terms. H(83) = 5.00207, which is above 5, while H(82) = 4.99002, which is still below 5. So the partial sums first pass 5 when the 83rd term is added.
Does the harmonic series converge?
No, it diverges, but only logarithmically. The partial sums grow without bound, yet very slowly: passing 10 already takes 12,367 terms. Each new term adds less than the one before, so the sum creeps upward rather than leveling off at a finite value.
What is Euler's constant in this context?
Euler's constant, Gamma = 0.57722, is the limit of H(n) - ln(n) as n grows. It measures the gap between the harmonic number and the natural logarithm. At n = 100 that gap is 0.58221, still slightly above the limiting value of 0.57722.
How accurate is the ln n + gamma approximation?
Quite accurate, and adding 1/(2n) improves it further. With that extra term, the overshoot is only 8.33 x 10^-6 at n = 100. So ln n + gamma + 1/(2n) tracks the exact harmonic number to within a few millionths at that size.