Understanding the music interval calculator — concept and principle
This calculator names the interval between two notes, such as a minor sixth or a perfect fifth, and gives the number of semitones, the simple interval, the inversion and the equal-tempered frequency ratio. Students use it for ear training and theory homework; composers and arrangers use it to check spelling.
How it is calculated
- Interval number = letter names counted from the lower note to the upper, both included (D up to B = D E F G A B = a sixth).
- Semitones = difference in pitch.
- Quality compares the semitones with the major scale on the lower note: unison, 4th, 5th and octave are perfect when they match; 2nd, 3rd, 6th and 7th are major when they match and minor when one semitone smaller. One more than perfect or major is augmented; one less than perfect or minor is diminished.
- Inversion: numbers add up to 9; major ↔ minor, augmented ↔ diminished, perfect stays perfect.
- Frequency ratio = 2^(semitones ÷ 12).
The principle
An interval has two parts: how many letter steps it spans and how many semitones it contains. The letter count gives the number, so C to E and C to E♭ are both thirds. The semitone count decides the quality, so C to E (4 semitones) is a major third and C to E♭ (3) a minor third. Keeping both parts lets each note keep its proper spelling. In equal temperament every semitone multiplies frequency by 2^(1/12), which gives the frequency ratio.
Worked example
Default inputs: D4 to B♭4.
- Letters D E F G A B = 6, a sixth.
- Semitones: D4 to B♭4 = 8.
- The major sixth above D is B (9 semitones); B♭ is one less, so the quality is Minor (m): m6.
- Inversion: 9 − 6 = 3, minor → major: M3.
- Frequency ratio = 2^(8/12) = 1.587; second note is higher; no octaves added (0).
| Second note octave | Interval |
|---|---|
| 1 | M17 |
| 2 | M10 |
| 3 | M3 |
| 4 | m6 |
| 5 | m13 |
| 6 | m20 |
| 8 | m34 |
How to read the result
The interval name tells you both the size and how it should be written. Enharmonic intervals sound the same but are named differently: D to B♭ is a minor sixth, while D to A♯ (also 8 semitones) is an augmented fifth. The inversion is useful when you think of the same pair of notes upside down, for instance in harmony or voice leading.
Common mistakes
- Counting only the steps between the notes and forgetting to include both ends.
- Naming the interval from semitones alone.
- Using "minor" for fourths and fifths, which are perfect, augmented or diminished.
- Forgetting that a ninth is an octave plus a second.
Frequently asked questions
What interval is D to B♭?
A minor sixth, 8 semitones.
What is the inversion of a minor sixth?
A major third.
Why are fourths and fifths called perfect?
They match the major scale on the lower note and have no major or minor forms; changed by a semitone they become augmented or diminished.
Sources: S. Kostka, D. Payne & B. Almén, Tonal Harmony, 8th ed. (McGraw-Hill, 2018), ch. 1 (intervals)