The guide
Harmonic numbers: a sum that never stops growing, and how slowly it climbs
Add 1, then 1/2, then 1/3, and the total passes any limit you name. It still needs 12367 terms to pass 10, and a short formula tracks that climb with startling accuracy.
- 7381/2520 H(10) as a reduced fraction, which is 2.92896825397
- 12367 the first n at which the sum passes 10
- 8.29e-7 error of the estimate at n = 10 before its last term
- 866 digits in the denominator of H(2000)
- 14.7 draws to collect all six kinds of coupon on average
Read the full guide Fold the guide
Stack blocks end to end: the first one unit tall, the second half as tall, the third a third. The tower rises forever, yet every block adds less than the last.
The sum and its exact value
The n-th harmonic number, written H(n), is the sum of the reciprocals of the first n whole numbers: 1 + 1/2 + 1/3 and on up to 1/n. The Wikipedia article on harmonic numbers lists the start of the sequence as 1, 3/2, 11/6, 25/12 and 137/60. Each value is an exact fraction, and that is where a careless calculator goes wrong.
Write H(10) as 2.929 and you are close but not right. The exact value is 7381/2520, which is 2.92896825397 to eleven decimals. The OEIS entries for the numerators and denominators of harmonic numbers list 7381 and 2520 in the tenth place, so the fraction can be checked against a published sequence rather than trusted on faith.
One property makes these fractions behave. Except for n = 1, the denominator of H(n) is always even, so no harmonic number past the first is a whole number. The Wikipedia article on the harmonic series gives the reason: take the highest power of two up to n. Over a common denominator, only one numerator is odd, so the total can never cancel to an integer.
Exactness has a cost. The denominator of H(2000), once reduced, runs to 866 digits. The MDN page on BigInt says to use it when values beyond 2 to the power 53 are expected, which is only about sixteen digits, and warns that coercing back and forth between BigInt and Number can lose precision. That warning is the whole reason an exact harmonic calculator keeps everything as big-integer fractions until the last step of printing.
Growth that is endless and yet slow
The harmonic series diverges. The Wikipedia article on it credits the proof to Nicole Oresme in the 14th century, and notes that the integral test gives another. Euler later used that divergence, in 1737, to show there are infinitely many primes.
Divergence only says the total passes every bound. It does not say when. The numbers grow like the natural logarithm, and a logarithm is patient. The OEIS sequence of the least k for which H(k) passes n runs 1, 2, 4, 11, 31, 83, 227, 616, 1674, 4550, 12367 for n from 0 to 10, and 33617 and 91380 for n of 11 and 12.
Read that list as a rule of thumb. Passing 9 takes 4550 terms and passing 10 takes 12367, which is 7817 more. Each extra unit of height costs about 2.7 times as many terms as the one before, because e is roughly 2.718. The tool turns this into a search: give it a target such as 5, and it returns 83.
A rough rule predicts the answer without any search. If H(n) is about ln n plus the constant gamma, then the first n past a target m is close to e to the power (m minus gamma). For m = 10 that gives 12366.97, against the true 12367. For m = 12 it gives 91380.22, against 91380. In the tool’s own checks the rule never missed by as much as half a unit for any whole target from 2 to 12.
What gamma measures
The gap between the sum and the logarithm settles down. The Wikipedia article on harmonic numbers says H(n) minus ln n decreases steadily toward a limit, and that limit is Euler’s constant, gamma, about 0.5772156649. Think of it as the permanent head start the staircase of reciprocals holds over the smooth curve.
Gamma is a strange constant. The Wikipedia article on it lists its decimal as 0.57721 and marks its rationality as unknown. Nobody has proved whether it is a fraction. A number that shows up in so many places, and whose basic nature is still open, deserves care when a calculator prints it, so the tool holds gamma to forty decimals and says which digits it typed.
Gamma also ties harmonic numbers to a famous function. The article on the digamma function and the harmonic number page both give the relation psi(n) = H(n-1) minus gamma, and the NIST library lists psi(1) = minus gamma. At n = 11 the digamma value is 2.35175258907, which is H(10) minus gamma, and the tool shows that difference on every result.
Why the correction terms shrink so fast
Using only ln n plus gamma at n = 10 gives 2.879800758. That sits 0.0491675 below the exact 2.92896825397, which is a poor match for a formula that looks so tidy. The cure is a short series. The Wikipedia article states it as H(n) is about ln n + gamma + 1/(2n) - 1/(12 n^2) + 1/(120 n^4) and so on.
Add the terms one at a time and watch the error. After 1/(2n), the estimate overshoots by 8.33e-4. After the 1/(12 n^2) term it falls short by only 8.29e-7. The 1/(120 n^4) term overshoots by 3.93e-9, and one more term, minus 1/(252 n^6), leaves 4.09e-11. Each term cuts the error by a factor of 59, 1004, 211 and 96 in turn, at n = 10.
The coefficients are not arbitrary. They come from the Bernoulli numbers, and the general term is minus B(2k) over (2k n^(2k)). The Wikipedia table gives B(2) = 1/6, B(4) = -1/30 and B(6) = 1/42, which produce 1/12, 1/120 and 1/252 once the signs are sorted out. The NIST library prints the same Bernoulli structure in its expansion of the digamma function, so the pattern is documented from two directions.
Two cautions belong here. The series is asymptotic, which the NIST library marks with its symbol for a Poincare expansion: a few terms match superbly, but adding terms without end is not the goal. And a claim that an error is smaller than the next term is something to measure, not assume. The tool checks it for the n you pick: at n = 10 the error after the 1/(12 n^2) term is positive and smaller than 1/(120 n^4) = 8.33e-7. A separate run of the same exact arithmetic confirmed the bound for every n from 1 to 2000.
Collecting a full set
Harmonic numbers turn up in an everyday puzzle. A box of cereal holds one of n kinds of coupon, each equally likely. How many boxes until you hold all n? The Wikipedia article on the coupon collector’s problem answers with n times H(n), which grows like n log n.
Work it for six kinds. The first draw is always new. The next gives a new kind five times in six, so it takes 6/5 draws on average, then 6/4, 6/3, 6/2 and 6/1. Adding those up gives 6 H(6) = 147/10, which is 14.7 draws. For a 52-card deck the figure is 235.97829. The article itself works the case of 50 coupons and gets 224.9603.
The asymptotic series earns its keep here. Multiply it through by n and the average becomes n ln n + gamma n + 1/2 plus a term that shrinks like 1/n, as the same article states. For 50 coupons that approximation gives 224.9619 against the exact 224.9603. Add the minus 1/(12n) correction and the gap closes to the fourth decimal place.
A relative worth knowing
Raise each denominator to a power r and you get the generalised harmonic number, the sum of 1/k^r. For r = 1 it diverges. For r = 2 it converges, and the Wikipedia article on the Basel problem and the NIST library both give the limit as pi squared over six. At n = 10 the sum is 1968329/1270080, about 1.5497677, and the shortfall to pi squared over six is 0.09517.
How big should that shortfall be? Comparing the sum with an integral traps it between 1/(n+1) and 1/n, here 0.0909 and 0.1. The tool checks that trap for your n, so the claim is verified on each run and not left as a remembered fact.
What the tool can and cannot show
The tool computes H(n) exactly for n up to 2000, the generalised sum for r from 1 to 6, the estimate with its measured error after each term, the first n past any target up to 12, and the coupon average with a table to n = 100. It does the heavy sums in a background worker, which the MDN page on Web Workers describes as a thread separate from the main one, so the page stays responsive.
It does not cover the zeta function beyond the stated limit for r = 2, non-integer harmonic numbers or proofs. The first n past a target is searched only up to n = 400,000, and targets stop at 12. Past those caps, the rough rule e to the power (m minus gamma) is the honest answer.
The lesson of the tower is that slow is not the same as bounded. A sum can climb forever while taking longer for each step, and the exact fraction keeps count better than any rounded figure can. When someone says the harmonic series converges, or quotes a rounded sum as if it were exact, the numbers above are the quickest corrective.
Sources
Every source consulted for this guide. Links checked November 10, 2026.
- Harmonic number - Wikipedia Wikipedia (CC BY-SA 4.0)
- Euler's constant - Wikipedia Wikipedia (CC BY-SA 4.0)
- Coupon collector's problem - Wikipedia Wikipedia (CC BY-SA 4.0)
- Harmonic series (mathematics) - Wikipedia Wikipedia (CC BY-SA 4.0)
- Basel problem - Wikipedia Wikipedia (CC BY-SA 4.0)
- Bernoulli number - Wikipedia Wikipedia (CC BY-SA 4.0)
- Digamma function - Wikipedia Wikipedia (CC BY-SA 4.0)
- DLMF: 5.4 Special Values and Extrema NIST Digital Library of Mathematical Functions (US government)
- DLMF: 5.11 Asymptotic Expansions NIST Digital Library of Mathematical Functions (US government)
- DLMF: 25.6 Integer Arguments NIST Digital Library of Mathematical Functions (US government)
- A001008 - OEIS The On-Line Encyclopedia of Integer Sequences (CC BY-SA 4.0)
- A002805 - OEIS The On-Line Encyclopedia of Integer Sequences (CC BY-SA 4.0)
- A002387 - OEIS The On-Line Encyclopedia of Integer Sequences (CC BY-SA 4.0)
- BigInt - JavaScript | MDN MDN Web Docs (Creative Commons licence)
- Web Workers API - Web APIs | MDN MDN Web Docs (Creative Commons licence)