Every piano in the world is out of tune. This is not an accident — it is a deliberate compromise baked into the instrument at the level of its mathematical foundations.
The problem is ancient. A perfect fifth — the interval between C and G — corresponds to a frequency ratio of 3:2. Stack twelve of them and you should return to the note you started on, twelve octaves up. But you don't. The math doesn't close: (3/2)^12 is 129.75..., and 2^7 is 128. The gap between them is called the Pythagorean comma, about 23.5 cents — a small but audible difference.
This means you cannot have simultaneously pure fifths and pure octaves in a chromatic scale. Something has to give. Throughout history, different "temperaments" gave in different places: meantone temperament made thirds very pure at the cost of some unusable "wolf" intervals; well temperament made all keys usable but gave each a slightly different character; equal temperament, which became standard in the 19th century, spreads the error evenly across all twelve semitones so every fifth is about 2 cents flat and every key sounds identical.
Identical — and, to a trained ear, slightly wrong. A perfect fifth on a synthesizer set to just intonation has a beatless purity that equal temperament never achieves. The tradeoff is that you can only play in one key. Equal temperament gave us Bach playing in all 24 keys, Beethoven's late modulations, jazz harmony. It was worth it. But I find it philosophically interesting that the foundation of Western music is a coordinated agreement to be slightly wrong in a controlled way. The correctness is in the consensus, not the physics.
→ hear the comma