Harmonic Interval Calculator
What the harmonic interval calculator measures
This harmonic interval calculator turns two MIDI note numbers into a semitone distance and an interval name. Enter a pair of pitches and it shows how far apart they are, which simple interval class they form inside one octave, and whether the span extends into a compound interval.
That makes the page useful in a DAW piano roll, an ear-training lesson, or a MIDI file inspection workflow because the numbers give you a direct way to compare pitches without decoding staff notation first. If you are arranging chords, writing generative music, or checking exported note data, the result gives you a quick label for the relationship between the two notes.
The same calculation works whether the notes sound together or one after the other. When they overlap, the output describes a harmonic interval. When they happen in sequence, the exact same semitone distance describes a melodic leap. The arithmetic does not change; only the musical context does.
How to read MIDI note inputs for harmonic intervals
Both fields expect whole-number MIDI pitches from 0 through 127. In the usual General MIDI mapping, 60 is middle C, 61 is C♯/D♭, 62 is D, and each step upward adds exactly one semitone. That one-to-one spacing is what makes the calculator quick to use: the interval is just the difference between the two numbers.
The calculator uses the absolute value of the difference, so order does not matter for the reported size. Entering 60 and 67 gives the same semitone count as entering 67 and 60. That is intentional, because this page is focused on interval size rather than direction. If you need to study ascending versus descending motion, keep the original order in mind separately.
It is also worth noting what MIDI does not encode. A MIDI number tells you pitch height, but it does not tell you whether the note should be spelled as C♯ or D♭, or whether a six-semitone gap should be thought of as an augmented fourth or diminished fifth. Because the spelling information is absent, the calculator returns a pitch-distance name such as “tritone” rather than a notation-specific enharmonic label.
The formula behind the harmonic interval result
The interval result is built from two very small steps: measure the semitone gap between the MIDI notes, then reduce that gap to the octave so the calculator can name the simple interval class.
To identify the simple interval class within one octave, the calculator reduces that distance modulo 12. In plain language, it asks for the remainder after removing complete octaves:
If d is 7, the result is a perfect fifth. If d is 19, the simple interval is still 7 semitones, so the page reports a perfect fifth plus one octave. This is a practical, DAW-friendly way to present compound intervals without forcing note-spelling rules that MIDI cannot supply on its own.
That is all the math this page needs. There is no weighting, no score, and no extra lookup table hidden behind the result: the calculator only compares the two note values you entered. Once complete octaves are removed, the remaining semitone count tells you whether the reduced interval is a unison, third, fifth, tritone, or another class inside the octave.
When the raw distance is larger than 12 semitones, the page preserves the total span and appends the remaining octave count. That keeps wide voicings easy to read because you can see both the class of the interval and how much register space it occupies.
Semitone names used by the harmonic interval calculator
The page names intervals according to their semitone count inside one octave. This is the same mapping used by the script, so the labels in the table below match the output exactly. When the total span exceeds 12 semitones, the result combines one of these simple names with an octave count.
| Semitones | Interval name | Typical musical feel |
|---|---|---|
| 0 | Unison | Same pitch class, no distance within the octave |
| 1 | Minor second | Tight, tense, highly dissonant |
| 2 | Major second | Stepwise motion, common in scales and melodies |
| 3 | Minor third | Common in minor chords and expressive melodic shapes |
| 4 | Major third | Bright chord-defining interval in major harmony |
| 5 | Perfect fourth | Stable but open, often used in suspensions and quartal sounds |
| 6 | Tritone | Balanced instability, famously tense and attention-grabbing |
| 7 | Perfect fifth | Strong, consonant, foundational in power chords and tuning |
| 8 | Minor sixth | Warm but slightly dramatic |
| 9 | Major sixth | Broad, lyrical, often pleasantly open |
| 10 | Minor seventh | Colorful, bluesy, and common in seventh chords |
| 11 | Major seventh | Close to the octave and rich with tension |
| 12 | Octave | Same pitch class in a higher or lower register |
One subtle detail is the treatment of exact octaves and larger compound spans. If the distance is exactly 12 semitones, the result is simply “Octave.” If the distance is 24 semitones, the script reduces the simple interval to 0 and shows “Unison + 2 octave(s).” That phrasing is consistent with the page logic: once complete octaves are removed, the pitch class is the same again.
Worked examples for MIDI harmonic intervals
Suppose you enter 60 for the first note and 67 for the second. The difference is 7 semitones, so the calculator returns a perfect fifth. In harmony that is one of the most stable and recognizable spans, and in MIDI it is easy to spot because the numbers differ by exactly seven.
Now try 60 and 64. The distance is 4 semitones, so the calculator reports a major third. That interval is one of the notes that defines a major triad. A quick check like this is handy when you are editing MIDI clips and want to confirm whether a stacked note is giving you major color, minor color, or something more ambiguous.
For an octave example, enter 52 and 64. The difference is 12 semitones, so the result is an octave. The two notes share the same pitch class even though they are in different registers. This is especially useful when you double a bass line or melody one octave higher and want to verify the spacing numerically rather than by ear alone.
Finally, consider a compound interval such as 45 and 64. The difference is 19 semitones. Reducing 19 modulo 12 leaves 7, so the simple interval is a perfect fifth, and the page shows that relationship plus one octave. This is a good example of why the calculator reports both the raw semitone distance and the simplified name: the total span tells you how wide the voicing is, while the reduced interval tells you the harmonic class inside the octave.
When you test your own inputs, a useful check is to ask whether the result matches what you already know about the notes. If the numbers differ by 1, you should expect a very tight semitone clash. If they differ by 7, you should expect a fifth. If the answer surprises you, it is often because one note number was entered an octave higher or lower than intended.
How to interpret the harmonic interval result musically
The most immediate output is the semitone count, which tells you the exact pitch distance. The named interval is the human-friendly translation. Together, they let you move between technical MIDI work and traditional musical language without changing tools.
If you are arranging harmony, the result helps you judge density and color. Small intervals such as minor seconds and major seconds create friction, especially in lower registers. Thirds and sixths often sound fuller and more character-defining. Perfect fourths and fifths create openness, while sevenths add tension that tends to want resolution. The calculator does not tell you whether the interval is “good” or “bad”; it gives you the distance so you can decide whether the color fits your musical goal.
If you are transcribing, the tool is useful for checking leaps. A melody that jumps 9 semitones has a very different expressive effect from one that moves by 2 semitones. Likewise, if you are debugging algorithmic composition or MIDI transformations, the result can confirm whether your script is preserving interval relationships the way you intended.
Assumptions and limitations of MIDI harmonic intervals
This calculator deliberately stays within what MIDI note numbers can prove. Because it works from note numbers alone, it does not identify enharmonic spellings, staff notation, key signature context, inversion names, chord quality, or voice-leading function. A six-semitone span is reported as a tritone because pitch distance is the only fact that MIDI gives the page.
It also treats the interval as undirected by using an absolute difference. That means it will not tell you whether the second note is above or below the first. For many harmonic tasks that is exactly what you want, because interval size matters more than direction. For melodic analysis, however, you may want to keep the sign of the subtraction separately.
Compound interval naming is simplified as well. A theorist might call 14 semitones a major ninth, but the current script expresses it as “Major second + 1 octave(s).” That wording is consistent, easy to read, and faithful to the page logic. It is especially practical in software contexts where pitch-class reduction matters more than textbook interval spelling.
In short, the calculator is a precise MIDI distance tool with musical names on top. Within that scope, it is fast, repeatable, and easy to compare across voicings.
Mini-game: Interval Lock
Want to practice the same idea in a faster, more playful way? In this optional mini-game, a glowing note races around a 12-step pitch ring. Your job is to lock the moving note onto the target interval from the highlighted root. Tap or click the canvas, or press the space bar, when the runner reaches the correct semitone position. Strong streaks come from thinking in interval classes, which is exactly what the calculator does when it reduces distances within the octave.
Optional practice mode: match the target interval from the current root and build a streak before time runs out.
