An interval is the distance between two notes. Musicians name it with a number and a word, like a major 3rd or a perfect 5th. The number comes from counting letters; the word says exactly how far apart the notes are. This page names every interval from a unison to an octave and shows each one on the staff, the piano and the guitar neck. Then it trains your ear to hear which of two intervals is bigger.
The number is how many letter names the interval spans, counting both ends. C up to E spans C, D and E: three letters, so it's a 3rd. C up to G spans C D E F G: a 5th. Two notes on the same letter are a unison, and the same letter eight letters up is an octave.
Sharps and flats don't change the number. C to E♭ and C to E♯ both span C, D and E, so they're both 3rds. That's what the second word is for.
Intervals with the same number can be different sizes. C to E is 4 half steps; C to E♭ is 3. Both are 3rds, so the name adds how big it is:
Every interval up to the octave, from C. Tap ▶ to hear it:
Musicians often write them short: a capital M for major, a small m for minor, P for perfect. The note distance page has a song to help you remember the sound of each one going up from do.
Play the major scale from any note and measure from that note to each of the others. The 2, 3, 6 and 7 come out major; the 4, 5 and the octave come out perfect. That's all the names mean: “major 3rd” is the 3rd you find in the major scale. Make a major interval a half step smaller and it becomes minor. Make a perfect one a half step bigger or smaller and it's no longer perfect: a 4th made bigger, or a 5th made smaller, is the tritone.
Pick a starting note and an interval. Tap a note to hear it, or play the two notes one after the other, then together. On the guitar, each interval is a shape you can move: the same distance across the strings and along the neck, wherever the first note is. On the piano, count the half steps key by key, black keys included.
Two intervals play, each starting from a different note, so comparing just the top notes won't help. Listen to the gap inside each one. Start on easy, where the sizes are far apart. Move on when you rarely miss. On hard they're only a half step or two apart. Playing the two notes together is harder still: listen for how open or crowded the pair sounds.