Kolton Ndoj

The Math of Musical Notes

Each step on a piano multiplies the frequency by the same number, 2 to the power one twelfth, about 1.0595.

fn=440⋅2 n/12 Hzf_n=440\cdot 2^{\,n/12}\ \text{Hz}

What the symbols mean

fnf_n
frequency of the note n semitones above A (Hz)
nn
semitone steps (12 per octave)
440440
standard pitch of the A above middle C (Hz)

Why it works — the picture

An octave is exactly a doubling of frequency, and the piano splits that doubling into 12 equal multiplications. Nice-sounding chords come from simple ratios: a perfect fifth is 3 : 2, an octave 2 : 1. The piano fifth (7 steps) is 2^(7/12) = 1.4983, very slightly shy of 1.5, a deliberate compromise that lets you play in every key. Your ear hears small whole-number ratios as smooth because the overtones line up.

Graph for The Math of Musical Notes 0129000
x counts semitones in one octave. The curve bends upward because frequency multiplies, but you hear equal steps. (drawn with the default slider values — move the sliders live)

Try it yourself

Where it’s used in real life

Every digital piano, tuner app and auto-tune uses this formula to compute pitches.

Related

Play with it live →

Physics · Sound & music · Beginner-friendly