An interval is the distance between two musical pitches. Intervals shape melodies, basslines and chords: the difference between a major and minor triad, for instance, comes from a single semitone change to its third.
Counting semitones

On a standard twelve-tone equal-tempered keyboard, a semitone is one step to the neighbouring key, whether it is black or white. C to C♯ is one semitone, C to D is two, C to E♭ is three, C to E is four and C to G is seven. Count the movements between keys, not the starting key itself.
An interval has a number and a quality
The number comes from the letter names counted inclusively. C–E spans C, D and E, so it is some form of third; C–G is some form of fifth. The quality identifies the precise interval. Major and minor qualities commonly apply to seconds, thirds, sixths and sevenths, while unisons, fourths, fifths and octaves may be perfect. Augmented and diminished qualities describe altered intervals.
Common intervals from C

| Upper pitch | Semitones | Interval |
|---|---|---|
| D♭ | 1 | Minor second |
| D | 2 | Major second |
| E♭ | 3 | Minor third |
| E | 4 | Major third |
| F | 5 | Perfect fourth |
| F♯ | 6 | Augmented fourth |
| G | 7 | Perfect fifth |
| A♭ | 8 | Minor sixth |
| A | 9 | Major sixth |
| B♭ | 10 | Minor seventh |
| B | 11 | Major seventh |
| C (higher) | 12 | Octave |
For the one-semitone interval above C, the correctly spelled minor second is C–D♭. C–C♯ is an augmented unison despite sounding equivalent on the piano. Note spelling is part of interval identification, not an optional decoration.
Enharmonic spelling and the tritone
Six semitones form a tritone, which can be spelled C–F♯ (augmented fourth) or C–G♭ (diminished fifth). They sound the same in equal temperament, but their written interval names differ. Likewise C–D♯ contains three semitones but is an augmented second, not a minor third. C–E♭ is the correctly spelled minor third.
Melodic and harmonic intervals

When pitches sound one after another, an interval is melodic. When they sound simultaneously, it is harmonic. The semitone distance may be identical, but the experience changes. Compare C followed by E with C and E played together; repeat with E♭ to hear the contrast between the major and minor third.
How intervals shape chords
A C-major triad contains C–E–G: a major third of four semitones above C and a perfect fifth of seven semitones. C minor is C–E♭–G: a minor third of three semitones and the same perfect fifth. Changing only the third alters the chord quality. The fifth can create recognisable open movement in basslines or melodic riffs, while smaller stepwise intervals give a different contour.
Intervals in composition and MIDI
Compare two short figures using the same rhythm: C–D–E moves by consecutive steps, while C–G–E leaps up a perfect fifth and returns down a minor third. Alternatively, repeat C–E–G and then C–E♭–G with the same MIDI note lengths and sound. This isolates the role of a single semitone without changing the rhythm or instrumentation.
The emotional character of an interval is contextual. Register, harmony, articulation and timbre shape how a fifth, third or tritone is experienced. Learning interval names offers a useful vocabulary for describing those relationships rather than a list of rules about what music must sound like.
Related reading: What Are Notes? · Rhythm and Time.
