Harmonic Series Calculator

The harmonic series is infinity approached at a crawl: 1 + 1/2 + 1/3 + 1/4 + …, growing without bound yet so slowly that the crawl itself becomes the lesson. Enter a number of terms for the exact partial sum, or a target total for the number of terms it demands — this calculator computes both, exactly, and shows the Euler–Mascheroni approximation alongside for the large cases.





Divergence at a Walking Pace, Forever

The medieval scholar Nicole Oresme proved around 1350 that this series diverges, with a grouping argument of deathless simplicity: 1/3 + 1/4 exceeds 1/2, the next four terms exceed another 1/2, the next eight another — infinitely many halves, so the sum exceeds any bound. But the pace mocks the proof: the partial sums overtake each successive integer about e ≈ 2.718 times later than the one before (H(n) tracks ln n + γ, and integers of the sum correspond to multiplications of n by e), so the series passes 5 at 83 terms, 10 at 12,367 terms, 20 at some 272 million, and 100 at roughly 1.5 × 10⁴³ terms — a count of terms that exceeds the atoms available to write them with. The calculator’s two directions embody the paradox symmetrically: the sum direction computes patience (a million terms for a sum of about 14.39), and the target direction computes humility (a modest target like 10 demands twelve thousand terms; like 20, a quarter-billion). Infinity is present, and it is in no hurry whatsoever.

Worked Values and the Gamma Constant

The defaults demonstrate the approximation’s uncanny accuracy: H(100) computed exactly is 5.187378, while ln(100) + γ + 1/200 gives 5.187386 — agreement to five decimal places, from a formula that replaces a hundred additions with one logarithm. The γ in it, the Euler–Mascheroni constant ≈ 0.5772156649, is the permanent gap between the series and the natural logarithm: plot H(n) against ln n and the curves approach a fixed separation of γ forever, never closing, never widening. Nobody knows whether γ is irrational — it is one of mathematics’ most familiar strangers, defined entirely by this series’ behaviour. The target direction shows the machinery in reverse for the default target 5: about 83 terms (the exact crossing: H(82) ≈ 4.990, H(83) ≈ 5.002), found by inverting the approximation and walking the last few terms exactly, as the widget does.

Where the Harmonic Series Works for a Living

This is no museum series. Its partial sums price the coupon collector’s problem (expect to buy n × H(n) packs to complete a set of n cards — for 50 cards, about 225 packs), the expected record-breakings in random sequences, the worm-on-the-rubber-band puzzle (the worm arrives, because the band’s stretching is harmonic too), the overhang of a stacked deck of cards or books (the maximum lean of n books is H(n)/2 book-lengths — two full lengths of overhang from 31 books, a bar bet with a proof), the Jeep desert-crossing problem, and the average-case analysis of quicksort, whose expected comparisons are 2(n+1)H(n) − 4n. A series that diverges this politely turns up wherever accumulation is counted in reciprocals — which is to say, wherever patience is the currency and the bill arrives one shrinking fraction at a time, addressed to whoever keeps careful enough accounts to notice it growing.

The Alternating Cousin Behaves

Change every second sign and the same terms produce a model citizen: 1 − 1/2 + 1/3 − 1/4 + … converges to ln 2 ≈ 0.6931, proved by the alternating series test (terms shrinking monotonically to zero suffices) and countable by hand to insulting slowness of its own — a hundred terms for two reliable decimals. The contrast is the calculus course’s paired parable: the harmonic series diverges with all terms positive and converges with them alternating, though the two series differ term-by-term by nothing but a sign — convergence is a property of arrangements, not of magnitudes alone. Rearrangement drives the moral home (the alternating series can be reordered to converge to any value whatsoever, Riemann’s unsettling theorem), and the harmonic series stands at the centre of the web: the boundary sum, whose partial sums this page computes, around which the whole theory of convergence arranges its warnings.

The Zeno Connection

The harmonic series is Zeno’s paradox with the bookkeeping done: cross a room by halves — half the distance, then half the remainder — and the distances form the geometric series that sums to the room; but count the time at constant speed per unit and nothing paradoxical remains. The harmonic trap is subtler: terms shrink (like Zeno’s remainders) yet the sum escapes (unlike Zeno’s), and the difference is the shrink rate — 1/2^k outruns accumulation, 1/k does not. Between them sits every convergence test in the calculus curriculum (ratio, root, integral, comparison), each a machine for deciding which family a given series belongs to. The harmonic series is the frontier post between the families: stand here, the syllabus says, and learn to tell a Zeno that arrives from one that merely approaches forever. This page’s two input boxes are the frontier post’s visitors’ centre, and the view from it — a sum escaping to infinity at walking pace, one reciprocal at a time — remains the single best corrective to the intuition that shrinking terms must mean a settling total.

Related Tools

More from the Other Calculators hub: the Chmod Calculator for a different beloved numbering system, and the Password Entropy Calculator — logarithms again, working the other side of the street.

Frequently Asked Questions

Does the harmonic series really never stop growing?

Really — Oresme’s grouping proof in the first section is airtight and seven centuries old: the blocks 1/3+1/4, then 1/5 through 1/8, then 1/9 through 1/16, each contribute more than 1/2, and there are infinitely many blocks, so the sum eventually exceeds any proposed bound. What intuition rebels against is the schedule, not the fact: the terms shrink to zero, which fools the eye into expecting convergence, while their accumulation outruns every total given enough terms. “Enough” can exceed the physical universe’s bookkeeping (the target-100 case), which makes the divergence a theorem about the series, not a promise about any attainable sum.

What is the Euler–Mascheroni constant?

γ ≈ 0.5772156649, defined as the limiting difference between H(n) and ln n as n grows — the asymptotic gap the worked section exhibits. It appears across number theory and analysis (the gamma function’s neighbourhood, integrals of logarithms, the Mertens theorems about primes) with a ubiquity that would suggest it is well understood; in fact its most basic nature — rational or irrational — remains unproven, and if it is irrational it is so with a denominator provably larger than 10^242,000 by modern computations. The calculator uses it as what it demonstrably is: the most accurate shortcut to H(n) ever found.

How many terms to reach a sum of 10 or 20?

Exactly 12,367 terms for the sum to first reach 10 (H(12,366) ≈ 9.99996, H(12,367) ≈ 10.00004 — a photo finish), and about 272 million terms for 20, the calculator’s target machinery verifying the small cases exactly and the approximation carrying the large ones. The pattern is the e-multiplication law: each additional unit of sum multiplies the required terms by roughly e, so the cost of ambition in this series is exponential while the reward is additive — the worst exchange rate in elementary mathematics, and the source of half its puzzles.

What is the harmonic mean, and is it related?

Related by name and by reciprocals: the harmonic mean of a set of numbers is the reciprocal of the average of their reciprocals — the correct average for rates (average speed over equal distances, average price per share bought with equal money) — and the musical naming both share descends from the harmonic proportions of vibrating strings, whose overtones the next section of this hub’s music tools also meets. The series and the mean are cousins through the reciprocal, not parent and child; this page computes the series, and the mean’s proper home is with the averages on the statistics side of the site.

Why do the terms use 1/n and not something faster?

Because 1/n is the knife’s edge, and the series is famous for standing exactly on it: replace 1/n by 1/n^p for any p greater than 1, however slightly (1.0001 suffices), and the series converges; at p = 1 and below it diverges. The integral test explains the edge’s location — the area under 1/x grows like ln x, the first function that grows at all while growing slower than everything — and the harmonic series is that boundary made into a sum. Edges of possibility are where mathematics keeps its teaching examples, and this is the canonical one.

How does the book-stacking overhang work?

Balance each new book against the stack’s combined centre of mass and the offsets accumulate as half the harmonic series: the top book overhangs 1/2 length, the pair’s combined centre allows 1/4 more, then 1/6 — so n books lean H(n) ÷ 2 lengths past the table’s edge, requiring 4 books for a full length of overhang, 31 for two, and 227 for three. The calculator’s target direction answers the parlour version directly (target 4 in units of half-lengths means H(n) = 4, n = 31), and the physical stack, unlike the sum, must also survive a sneeze — the mathematics assumes perfect rigidity and no draughts.