Chord Interval Calculator
Calculates the interval in semitones between any two MIDI notes, collapsed to a single octave. Use it to identify chord qualities, transpose intervals, or analyze harmonic relationships.
Last updated: May 2026
Compare with similar
About this calculator
A musical interval is the distance in pitch between two notes, measured in semitones. In 12-tone equal temperament every interval pattern repeats once per octave, so the 'pitch-class' interval is the same whether two notes are a third or a third plus an octave apart. The formula is interval = (targetNote − rootNote + 12) % 12. Adding 12 before applying the modulo guarantees a non-negative result even when the target is lower than the root in MIDI value. The integer result maps directly to standard interval names: 0 = unison/octave, 1 = minor 2nd, 2 = major 2nd, 3 = minor 3rd, 4 = major 3rd, 5 = perfect 4th, 6 = tritone, 7 = perfect 5th, 8 = minor 6th, 9 = major 6th, 10 = minor 7th, 11 = major 7th. Variables are simply the two MIDI integers. Edge cases: the formula intentionally discards octave displacement, so a compound interval like a 10th (third + octave) returns 3 rather than 15; it also cannot distinguish enharmonic spellings (D# and E♭ both return 3 from C); it assumes equal temperament and integer MIDI values.
How to use
Example 1: Find the interval from C4 (MIDI 60) to E4 (MIDI 64). Step 1: subtract — 64 − 60 = 4. Step 2: add 12 — 4 + 12 = 16. Step 3: modulo 12 — 16 % 12 = 4 semitones. Verify: 4 semitones is a major third, the defining interval of a C major chord (C–E–G). Example 2: Find the interval from G4 (MIDI 67) to D4 (MIDI 62), descending. Step 1: 62 − 67 = −5. Step 2: −5 + 12 = 7. Step 3: 7 % 12 = 7 semitones. Verify: a perfect fifth descending from G is C, but here we landed on D — the result of 7 reflects the inverted perfect fifth (D up to G), which is a perfect fourth in melodic terms. The formula returns the pitch-class distance, not the directional interval name.
Frequently asked questions
How do I use semitone intervals to identify chord types?
Each chord quality has a unique semitone fingerprint above the root. A major triad uses 4 and 7 (major third + perfect fifth); a minor triad uses 3 and 7; a diminished triad uses 3 and 6; an augmented triad uses 4 and 8. Seventh chords add a fourth note: a major 7th adds 11, a dominant 7th adds 10, a minor 7th adds 10 (with a minor triad below), and a diminished 7th adds 9. By calculating the interval from the root to each chord tone, you can name any chord without reading the key signature. The same fingerprints apply in every key because intervals are relative.
Why does the formula use modulo 12?
Modulo 12 collapses all intervals into the 0–11 semitone range, treating notes an octave apart as equivalent. This is called 'octave equivalence' in music theory and reflects the way the ear groups pitches into pitch classes. C4 and C5 are both 'C' in pitch-class terms even though they are 12 semitones apart. By reducing intervals mod 12, the calculator reports the harmonic quality of the interval rather than its absolute pitch distance. Adding 12 before the modulo ensures the result is never negative even when the target note is lower than the root note, which would otherwise yield a meaningless negative interval.
What is the difference between a harmonic and a melodic interval?
A harmonic interval occurs when two notes are played at the same time, as in a chord. A melodic interval is the distance between two notes played one after another in a line of music. Both are measured identically in semitones, but they sound and function very differently in compositions. Harmonic intervals determine chord quality, consonance, and vertical sonority. Melodic intervals shape the contour, character, and singability of a tune; small intervals create stepwise motion while large leaps create dramatic effects.
What are common mistakes when interpreting interval calculations?
Forgetting that the result is octave-reduced is the most frequent confusion — a tenth (third plus octave) returns 3, not 15, so the formula cannot distinguish a close major third from a wide one. Treating a descending interval as numerically smaller leads to negative-looking results without the +12 correction; always check that the math returns a non-negative integer. Enharmonic notes (C# vs D♭) collapse to the same semitone count, so the formula cannot tell whether 4 semitones above C should be called a major third (E) or a diminished fourth (F♭). Counting note letters instead of semitones (C to E is a third by letter, four semitones in count) leads to off-by-one errors. Finally, mixing MIDI numbering systems — some software calls middle C 'note 60' and others 'C5' — adds an octave of confusion.
When should I NOT use this calculator?
Music in non-equal-tempered systems — historic meantone, well temperaments, just intonation, or microtonal scales like 19-EDO or 31-EDO — uses different interval definitions and semitone sizes, so the modulo-12 formula does not apply. For voice-leading analysis you usually want the signed, directional interval (e.g., perfect fifth down vs perfect fourth up), which this formula deliberately discards. Compound intervals matter in orchestration and counterpoint because they affect spacing and timbre, but the formula reduces them. Analyzing non-pitched percussion is meaningless because there is no defined pitch. Finally, harmonic analysis of partials (e.g., the overtone series) uses frequency ratios, not equal-tempered intervals.