Compute the exact semitone distance, frequency ratio, and cent difference between any two notes.Visualize intervals on an interactive piano keyboard. Built for musicians, producers, audio engineers,and music theory students.
In music theory, a semitone (also called a half step) is the smallest interval used in Western tonal music. It is the distance between two adjacent keys on a piano keyboard — for example, from C to C♯, or from E to F. In the equal-temperament system, each semitone corresponds to a frequency ratio of exactly 21/12 ≈ 1.059463. This means that the pitch rises by about 5.946% for every semitone step.
The semitone is the atomic unit of pitch in most modern music. Twelve semitones make up an octave, and the octave is the interval where the frequency doubles. This logarithmic scale is what allows music to be transposed across keys while preserving the same emotional character.
f = 440 · 2(n − 69) / 12
where n is the MIDI note number (A4 = 69, C4 = 60).
The equal-temperament system divides the octave into 12 equal parts (semitones). This compromise was developed during the Renaissance and Baroque periods to allow keyboard instruments to play in all keys without retuning. The system was championed by Johann Sebastian Bach in his Well-Tempered Clavier, which demonstrated the viability of equal temperament for all 24 major and minor keys.
In equal temperament, the frequency ratio of any interval can be calculated as 2k/12, where k is the number of semitones. This mathematical simplicity makes it the foundation of modern music theory, synthesis, and audio engineering.
A cent is a logarithmic unit of pitch measurement equal to 1/100 of a semitone. This means there are 100 cents in a semitone and 1200 cents in an octave. The cent was introduced by Alexander J. Ellis in the 19th century as a way to precisely describe small pitch differences.
For example, the difference between a justly tuned major third (frequency ratio 5:4) and an equal‑tempered major third (4 semitones) is about 13.7 cents. This subtle difference is perceptible to trained ears and is why some musicians prefer “just intonation” for certain genres.
Our calculator reports the cent difference between the two notes you select, giving you a precise measurement of their pitch relationship.
The table below shows common intervals, their semitone counts, and their typical names in Western music theory.
| Semitone count | Interval name | Example | Frequency ratio |
|---|---|---|---|
| 0 | Unison | C – C | 1.000 |
| 1 | Minor second | C – C# | 1.059 |
| 2 | Major second | C – D | 1.122 |
| 3 | Minor third | C – Eb | 1.189 |
| 4 | Major third | C – E | 1.260 |
| 5 | Perfect fourth | C – F | 1.335 |
| 6 | Tritone | C – F# | 1.414 |
| 7 | Perfect fifth | C – G | 1.498 |
| 8 | Minor sixth | C – Ab | 1.587 |
| 9 | Major sixth | C – A | 1.682 |
| 10 | Minor seventh | C – Bb | 1.782 |
| 11 | Major seventh | C – B | 1.888 |
| 12 | Octave | C – C | 2.000 |
A sound designer is creating a pad patch on a subtractive synthesizer. They want to detune two oscillators by a perfect fifth to create a rich, animated texture. Using this calculator, they select C4 (261.63 Hz) and G4 (392.00 Hz) — a distance of 7 semitones. The calculator confirms the frequency ratio is 1.498. The designer then sets oscillator 2 to +7 semitones and adjusts fine‑tuning to achieve the exact ratio. The result is a lush, beating pad that sits perfectly in the mix.
Pro tip: For an even wider sound, try detuning by 7 semitones (perfect fifth) or 12 semitones (octave) and then adding a small cent offset (e.g., 2–5 cents) to create a “chorus” effect.
The tool converts each note to a MIDI number using the formula: n = 12 · (octave + 1) + index, where index is the position of the note name in the chromatic scale (C=0, C#=1, …, B=11). For example, A4 is 12·(4+1)+9 = 69.
The frequency is then computed via f = 440 · 2(n − 69)/12, which is the standard MIDI tuning formula using A4 = 440 Hz.
The semitone distance is simply the absolute difference between the two MIDI numbers. The cent difference is 1200 · log2(f1 / f2), which is equivalent to 100 · Δn for equal‑tempered notes.
The interval name is derived from the semitone count using standard music theory nomenclature (unison, minor second, major second, … octave).