Musical Interval Calculator
Calculate the musical interval between two notes including semitones, interval name, and quality.
About this calculator
An interval is simply the distance between two pitches, and this calculator finds it by first converting each note and octave pair into a single MIDI note number — a standard numbering scheme where each successive integer represents one semitone, with middle C sitting at 60 — and taking the absolute difference between the two. That raw semitone count, on its own, already answers 'how far apart are these notes,' but musicians also describe intervals by name and quality, so the calculator reduces the semitone distance to its position within a single octave and looks up the matching interval number (2nd, 3rd, 4th, and so on) and quality (minor, major, perfect, or augmented/diminished for the ambiguous tritone). When the two notes span more than an octave, the calculator adds back a compound interval offset — a 9th is really an octave plus a 2nd, a 10th an octave plus a 3rd — so a wide-spanning interval still gets named correctly rather than being folded down to its single-octave equivalent.
Direction simply reports whether the second note sits above or below the first, since the same semitone distance and quality describe an ascending major third and a descending major third identically in every other respect. This is standard 12-tone equal temperament math throughout; it doesn't address just intonation, microtonal systems, or how spelling (like calling the same pitch D-flat versus C-sharp) can change an interval's name without changing its actual sound.
Inputs
Results
Semitones Apart
7
How to Use This Calculator
- Enter First Note (0=C, 1=C#, ... 11=B), First Note Octave, and Second Note (0=C, 1=C#, ... 11=B).
- Set Second Note Octave.
- Review the Semitones Apart result.
- Use Interval Number and Quality (1=min,2=maj,3=perf,4=aug,5=dim) to inform your decision.
- Use the chart to visualize the results and explore different scenarios by adjusting inputs.
How the result changes with First Note Octave
| First Note Octave | Semitones Apart |
|---|---|
| 2 | 31 |
| 3 | 19 |
| 6 | 17 |
| 8 | 41 |
What each input means
- First Note (0=C, 1=C#, ... 11=B)
- Semitone index of the first note. 0=C, 2=D, 4=E, 5=F, 7=G, 9=A, 11=B.
- First Note Octave
- Octave of the first note (middle C is octave 4).
- Second Note (0=C, 1=C#, ... 11=B)
- Semitone index of the second note.
- Second Note Octave
- Octave of the second note.
How this is calculated
Worked example, using the default values
- Identify Input Parameters4 parametersFirst Note (0=C, 1=C#, ... 11=B) = 0, First Note Octave = 4, Second Note (0=C, 1=C#, ... 11=B) = 7, Second Note Octave = 4 = 4 input(s) provided
- Calculate Semitones ApartSemitones Apart7 = 7
- Calculate Interval NumberInterval Number5 = 5
- Calculate QualityQuality3 = 3
Engine last updated . Checked against 2 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
Why does the calculator use MIDI note numbers internally instead of note names directly?
MIDI numbering turns every pitch into a single integer that increases by exactly one per semitone across the entire range, which makes finding the distance between any two notes as simple as subtracting one number from the other regardless of which octave each note falls in. Converting note-and-octave pairs into this common numbering system first is what lets the calculator handle notes in different octaves correctly without special-casing octave boundaries.
Why do some intervals show up as ambiguous between augmented and diminished?
The interval spanning exactly 6 semitones sits precisely halfway between a perfect 4th and a perfect 5th in 12-tone equal temperament, and depending on how the notes are spelled in traditional notation it can correctly be called either an augmented 4th or a diminished 5th — both describe the identical sound. This calculator, working from raw semitone counts rather than note spelling, can't distinguish which name applies and reports it generically rather than guessing.
How does the calculator handle intervals wider than a single octave?
It counts how many full octaves the semitone distance spans, then adds that many multiples of 7 to the base interval number, since each additional octave shifts a 2nd into a 9th, a 3rd into a 10th, and so on. This mirrors how musicians actually name wide intervals — a 9th is understood as an octave plus a step, not as an entirely different category of interval from a 2nd.
Does direction (ascending versus descending) change an interval's quality or number?
No — a major sixth ascending from C to A and a major sixth descending from C down to the E below it are both still major sixths in name and quality, since interval quality and number describe the relationship's shape regardless of which note came first. Direction is reported separately purely to indicate which note is higher, which matters for melodic analysis even though it doesn't change how the interval itself is classified.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Chord Builder Calculator
Build chords from root note and chord type. See note composition and inversions.
Music TheoryScale Generator Calculator
Generate scale notes for major, minor, pentatonic, blues, and modal scales from any root note.
Music TheoryCircle of Fifths Calculator
Explore key relationships using the circle of fifths. Find dominant, subdominant, relative, and parallel keys.
More in Creative, Media & Design.