Piano Intervals Calculator
This piano intervals calculator helps musicians and music theory students determine the distance between two piano keys in semitones and identify the musical interval name. Whether you're composing, practicing scales, or analyzing music, understanding intervals is fundamental to musical understanding.
What is a Piano Interval?
In music theory, an interval is the distance between two pitches. On a piano, intervals are measured in semitones - the smallest distance between two adjacent keys. The number of semitones between two notes determines the interval name and quality (major, minor, perfect, etc.).
Types of Intervals
Musical intervals are categorized by their size and quality:
- Perfect Intervals: Unison (0 semitones), Fourth (5 semitones), Fifth (7 semitones), Octave (12 semitones)
- Major Intervals: Major Second (2 semitones), Major Third (4 semitones), Major Sixth (9 semitones), Major Seventh (11 semitones)
- Minor Intervals: Minor Second (1 semitone), Minor Third (3 semitones), Minor Sixth (8 semitones), Minor Seventh (10 semitones)
- Diminished Intervals: One semitone smaller than the minor version
- Augmented Intervals: One semitone larger than the major version
Interval Quality
The quality of an interval describes its harmonic character:
- Major: Bright, happy sound
- Minor: Sad, tense sound
- Perfect: Pure, consonant sound
- Diminished: Dark, unstable sound
- Augmented: Bright but unstable sound
How to Use This Calculator
Using the piano intervals calculator is simple:
- Select the starting note from the dropdown menu
- Select the ending note from the dropdown menu
- Click "Calculate Interval" to see the results
- Review the interval name, semitones, and quality
- Use the visualization to understand the interval's position on the piano
Note: The calculator assumes a standard 12-tone equal temperament tuning system used in most modern pianos.
Formula Used
The interval between two piano keys is calculated using the following formula:
Interval = (Ending Note - Starting Note) mod 12
Where:
- Starting Note = MIDI note number of the first key
- Ending Note = MIDI note number of the second key
- mod 12 = Modulo operation to find the equivalent interval within one octave
The result is then mapped to the standard musical interval names based on the number of semitones between the notes.
Worked Examples
Example 1: C to E
Starting Note: C (MIDI 60)
Ending Note: E (MIDI 64)
Calculation: (64 - 60) mod 12 = 4 semitones
Result: Major Third (4 semitones)
Example 2: F to B♭
Starting Note: F (MIDI 65)
Ending Note: B♭ (MIDI 66)
Calculation: (66 - 65) mod 12 = 1 semitone
Result: Minor Second (1 semitone)
Example 3: G to D
Starting Note: G (MIDI 67)
Ending Note: D (MIDI 62)
Calculation: (62 - 67) mod 12 = 11 semitones (since -5 mod 12 = 7)
Result: Major Sixth (9 semitones) - Wait, this shows a calculation error. The correct calculation for descending intervals should be (Starting Note - Ending Note) mod 12 = (67 - 62) mod 12 = 5 semitones, which is a Perfect Fourth.