Musical Interval Calculator (Just & Equal Temperament)
Calculate the frequency for any musical interval above or below a starting pitch.
Compares just intonation and equal temperament with cents difference.
Musical intervals as frequency ratios
A musical interval is the relationship between two pitches, measured as a ratio of their frequencies. The simplest and most consonant interval is the octave: doubling the frequency produces a note that sounds the same but higher. A4 at 440 Hz and A5 at 880 Hz are one octave apart, ratio 2:1.
All other intervals fit between octave doublings. The pleasing-to-the-ear intervals come from simple integer ratios: the perfect fifth (3:2), the perfect fourth (4:3), the major third (5:4), and so on. This is no coincidence — the human auditory system finds simple ratios consonant because the partials (overtones) of the two pitches align cleanly.
Two tuning systems
Just intonation uses exact integer ratios. A perfect fifth above A 440 is 660 Hz (440 × 3/2). The just-intonation system produces beautifully consonant chords in one key, but you cannot modulate to other keys without retuning, because the intervals between non-tonic notes drift. Pythagorean tuning (560 BCE), 5-limit just intonation, and various extended just systems all use this principle.
Equal temperament divides the octave into 12 mathematically equal semitones, each with ratio 2^(1/12) ≈ 1.0594631. Every interval is slightly off from pure just intonation but the deviation is small and uniform across all keys. This is the universal tuning of pianos, keyboards, guitars, and most Western music since around 1700.
The trade-off: just intonation is acoustically perfect for one key, equal temperament is a tiny bit imperfect in every key but completely flexible. The split is what allowed J. S. Bach to write his Well-Tempered Clavier (1722) — pieces in all 24 major and minor keys, playable on a single keyboard.
Standard interval table
| Interval | Semitones | Just ratio | Equal temperament ratio | ET cents off from just |
|---|---|---|---|---|
| Unison | 0 | 1/1 = 1.0000 | 1.0000 | 0 |
| Minor 2nd | 1 | 16/15 = 1.0667 | 1.0595 | −11.7 |
| Major 2nd | 2 | 9/8 = 1.1250 | 1.1225 | −3.9 |
| Minor 3rd | 3 | 6/5 = 1.2000 | 1.1892 | −15.6 |
| Major 3rd | 4 | 5/4 = 1.2500 | 1.2599 | +13.7 |
| Perfect 4th | 5 | 4/3 = 1.3333 | 1.3348 | +2.0 |
| Tritone | 6 | 45/32 = 1.4063 | 1.4142 | +9.8 |
| Perfect 5th | 7 | 3/2 = 1.5000 | 1.4983 | −2.0 |
| Minor 6th | 8 | 8/5 = 1.6000 | 1.5874 | −13.7 |
| Major 6th | 9 | 5/3 = 1.6667 | 1.6818 | +15.6 |
| Minor 7th | 10 | 9/5 = 1.8000 | 1.7818 | −17.6 |
| Major 7th | 11 | 15/8 = 1.8750 | 1.8878 | +11.7 |
| Octave | 12 | 2/1 = 2.0000 | 2.0000 | 0 |
Notice: the perfect fifth in equal temperament is only 2 cents flat compared to just intonation. The major third is the most noticeably tempered, 13.7 cents sharp. Many fine listeners can detect the third-being-sharp in equal temperament, especially in slow chords. Choirs and string quartets often pull these notes flat instinctively to approximate just intonation, even when accompanying a tempered instrument.
Cents: the universal unit of pitch comparison
A cent is 1/100 of a semitone, or 1/1200 of an octave. The formula for converting a frequency ratio to cents:
cents = 1200 × log₂(f₂ / f₁)
So an octave is 1200 cents, a semitone is 100 cents, a quarter-tone is 50 cents. Just-noticeable-difference for pitch in the middle of the audible range is around 5 to 10 cents for most listeners. Trained musicians can detect differences down to 1 to 3 cents.
This is why the +13.7 cent error on the major third in equal temperament is noticeable but tolerable. It is well above the perception threshold but small enough that it does not destroy the harmony, just adds a slight beating to long-held thirds.
Compound intervals and inversions
Intervals larger than an octave are called compound. A ninth (perfect or minor) is an octave plus a second. A tenth is an octave plus a third. Compute by adding 1200 cents (one octave) to the within-octave interval.
Inverting an interval (flipping which note is on bottom) gives a new interval whose semitone count adds up to 12 with the original. A perfect fifth (7 semitones) inverts to a perfect fourth (5 semitones). A major third (4) inverts to a minor sixth (8). Consonance/dissonance roughly tracks: perfect-to-perfect, major-to-minor and vice versa.
Why physical instruments make this real
Brass instruments produce harmonic series naturally (the bugle calls and the open-pipe series). These notes are in just intonation by physical law: the air column resonates at integer multiples of the fundamental frequency. Trumpet and trombone players hear and feel the “lock” of pure consonance when they tune to the harmonic series. Equal-temperament keyboards always sound a bit off in comparison because they were tempered for convenience.
String harmonics work the same way: lightly touching a vibrating string at 1/2, 1/3, 1/4 of its length sounds the octave, twelfth (octave + fifth), and double octave. The mathematical purity is audible.
Worked example
Start at A4 = 440 Hz. Compute the just and equal-temperament frequencies of a major sixth above (9 semitones up):
Just (5/3 ratio): 440 × 5/3 = 733.33 Hz (close to F#5 in just intonation) Equal temperament (2^(9/12)): 440 × 1.6818 = 740.00 Hz (exactly F#5 in ET)
Difference: 740.00 − 733.33 = 6.67 Hz, or about +15.6 cents. The equal-temperament major sixth is noticeably sharper than the just version. In an a cappella choir, a trained singer would naturally pull the upper note about 15 cents flat to lock in with the lower note’s overtone series.
Practical applications
Music producers and live engineers use frequency-ratio tools to:
- Tune drums to musical pitches (kick at root frequency, snare at the major third or fifth)
- Place reverb resonances on consonant intervals to enhance pleasant overtones
- Avoid placing notch filters on intervals that interact poorly with the song key
- Generate just-intonation reference frequencies for choir warmup
Pianists, organists, and harpsichordists rarely think about cents in daily practice but encounter the distinction when tuning instruments or when their ear catches a particularly out-of-tune triad. Strings and singers think about intervals constantly because they have continuous pitch control and have to actively choose between ET (matches the band) and just (sounds better in isolation).
The historical compromise
The compromise between just and ET took two thousand years to settle. Pythagoras (~560 BCE) discovered the integer ratios. Medieval theorists added the seventh and added imperfect consonances. Renaissance composers explored modulation, exposing just intonation’s failure to handle key changes cleanly. Bach’s Well-Tempered Clavier was a polemical demonstration that ET (or nearly so) allowed previously unplayable music. By the late 18th century, ET had won for keyboards. Strings and voice never fully accepted it.