Why a piano has 12 notes: the circle of fifths that never quite closes
30seconds
Stack pure 3:2 fifths, the most consonant interval after the octave, and you'd expect to eventually land back on your starting note. You never do. After twelve fifths you overshoot by a sliver called the Pythagorean comma, about a quarter of a semitone.
The piano's twelve notes are a clever cheat: 12 happens to be the smallest number that splits the octave into steps with a nearly perfect fifth, off by just 2 cents. Stack the fifths yourself and see why.