Stack twelve perfect fifths and you should arrive, seven octaves up, at the note you began on. You don't. You miss — every time, by the same small, sour amount.
Almost every musical tradition keeps two intervals. The octave — a string halved, a frequency doubled, a ratio of 2 : 1 — sounds so like the note below it that we give the two the same name. And the perfect fifth, the next-simplest agreement the ear will accept: a ratio of 3 : 2. From these two ratios, in principle, you can build a whole tuning. The trouble is that they do not fit together.
Go up by fifths and you climb in steps of 3/2. Twelve of them should, the old hope went, land you exactly seven octaves above where you started — back to the same note, a circle closed. Multiply it out and the hope breaks:
twelve just fifths = (3/2)12 = 531441/4096 ≈ 129.7463
seven octaves = 27 = 128
the ratio between them = 531441/524288 ≈ 1.013643
in cents ≈ 23.46 — the Pythagorean comma
Twenty-three and a half cents: not quite a quarter of a semitone. Small on paper, unmissable in air. Sound the note you arrived on against the note you meant to reach and they beat against each other about three times a second — the slow, seasick wobble of two pitches that are almost, but not, the same. The Hear the comma button above plays exactly that.
You cannot have it all: pure octaves, pure fifths, and a tuning that closes. Something must give, and the history of keyboard tuning is the history of choosing what. Meantone narrowed most fifths to keep the thirds sweet, and exiled the error into one unplayable interval — the wolf, which howls. Well temperaments spread the damage unevenly, so that every key could be played but each kept its own colour, its own degree of tension. Equal temperament, the modern truce, divides the octave into twelve identical steps of 21/12 ≈ 1.059463 and smears the comma evenly across all of them: every fifth is flat by about 1.955 cents, twelve of those make the comma exactly, and no key is pure but none is unusable.
It is often repeated that Bach's Well-Tempered Clavier was written to prove equal temperament. That is most likely a myth. Well-tempered named a family of unequal temperaments in which all twenty-four keys are playable yet each retains a distinct character; equal temperament is only one, latish member of that family, and which tuning Bach actually intended is still argued. The piece demonstrates that you can travel through every key — not that every key was made to sound the same. The distinction matters, and flattening it is its own small comma.
The gap is not a measurement error or a flaw in any instrument. It is arithmetic, and it is permanent. For the circle of fifths to close, some whole number of fifths would have to equal some whole number of octaves: (3/2)m = 2k for positive integers, which rearranges to 3m = 2m+k. But a power of three is always odd and a power of two is always even, so the two can never be equal. The fifth and the octave are incommensurable — they share no common measure — in precisely the sense that the diagonal of a square is incommensurable with its side. The comma is the size of the gap that proves it, and it is the same odd-against-even contradiction that, elsewhere in this archive, shows the square root of two can be no fraction at all. One refusal, heard two ways.
That last line is now more than a turn of phrase. The odd-against-even step is machine-checked: a short Lean 4 proof, with zero imports, states the impossibility and Lean's kernel certifies it for every pair of whole numbers at once — not the finitely many the verifier below can sample, but all of them.
The move is the one the portal Past the Last Case calls an invariant: a quantity every step preserves that the target can never satisfy. Here it is parity itself — multiply by three and you stay odd, multiply by two and you turn even, so 3m and 2n sit forever on opposite sides of it. The sibling stratum Incommensurable proves √2 irrational by the very same odd-against-even refusal, but drives it as an infinite descent; here it stands alone, no descent required. One refusal, two proofs — both now certified by the same kernel. Source: research/the-comma/lean/TheComma.lean; run bash research/the-comma/lean/verify.sh.
If the circle never truly closes, why did the world settle on twelve notes — and not eleven, or twenty? The answer is not taste; it is number theory, and it is the same machinery as the sibling stratum The Most Irrational Number, turned the other way up.
A fifth is log₂(3/2) ≈ 0.5849625 of an octave — an irrational number. To make the fifths close into whole octaves you need a good rational approximation of it, p⁄q: take q fifths, land in p octaves, and divide the octave into q equal steps. The best such fractions are the convergents of its continued fraction [0; 1, 1, 2, 2, 3, 1, 5, …] — and each one is an equal temperament that someone, somewhere, has used. The comma each leaves is the residual of the approximation, in cents:
7⁄12 is the convergent the West chose: twelve fifths land almost exactly in seven octaves, and the comma they leave is precisely the Pythagorean comma — 23.46 cents, the same number from §II by a different road. Twelve works because 7⁄12 is one of the best small approximations there is.
The next great convergent is 31⁄53. Fifty-three fifths nearly close into thirty-one octaves, leaving only Mercator's comma, about 3.6 cents — a wobble too slow to trouble the ear. This is why 53-tone equal temperament is so accurate, and it is not a curiosity on paper: Nicholas Mercator described it in the seventeenth century, and R. H. M. Bosanquet built a 53-note harmonium to play it in 1876. Press Hear 53's comma above: against the seasick three-a-second beat of twelve fifths, fifty-three leaves a slow half-second sway — the circle, nearly closed.
Where the golden ratio has the worst continued fraction — all ones, so no fraction ever catches it, which is exactly why a sunflower uses it — the fifth has a helpful one, full of larger terms, so a handful of small whole numbers catch it well. One number you can't approximate; one you can. The flower and the keyboard are the same theorem, read in opposite directions.