🎹 Musical Interval Calculator
Pick two notes and get the interval between them — its name, semitones, cents and the frequency ratio.
C4 → G4
Perfect 5th
Semitones
7
Cents
700
Frequency ratio
1.498
261.6 Hz → 392 Hz
Semitones = 12 × log₂(f₂/f₁); cents = 1200 × log₂(f₂/f₁) (100 cents per semitone). The frequency ratio is the equal-temperament ratio 2^(semitones⁄12) — a perfect fifth is 1.498, close to the pure 3:2 = 1.5. 🔒 In your browser.
How the musical interval calculator works
The tool converts each note to a frequency (equal temperament), then measures the distance: semitones = 12 × log₂(f₂/f₁), cents = 1,200 × log₂(f₂/f₁), and the frequency ratio is 2^(semitones⁄12). It names the interval (major third, perfect fifth, and so on) from the number of semitones.
Equal-temperament ratios are close to, but not exactly, the pure whole-number ratios of just intonation — a perfect fifth is 1.4983 rather than exactly 3:2 = 1.5. That tiny compromise is what lets keyboards play in every key.
Frequently asked questions
How many semitones is a perfect fifth?
Seven semitones — for example C to G. Its frequency ratio in equal temperament is 2^(7⁄12) ≈ 1.498, very close to the pure 3:2 ratio of 1.5.
How do I calculate the interval between two notes?
Count the semitones between them, or compute it from frequencies: semitones = 12 × log₂(f₂/f₁). The tool names the interval and also gives the cents and frequency ratio.
What is the frequency ratio of an octave?
Exactly 2:1 — the higher note is double the frequency. An octave is 12 semitones or 1,200 cents.
What's the difference between cents and semitones?
A semitone is the smallest step on a piano; a cent is 1⁄100 of a semitone, used for fine tuning. There are 12 semitones or 1,200 cents in an octave.
Why isn't a perfect fifth exactly 3:2?
Equal temperament divides the octave into 12 identical steps so music sounds in tune in every key. That makes most intervals slightly off the pure just-intonation ratios — a fifth is 1.4983 instead of 1.5, a difference of about 2 cents.