Musical Interval Calculator

The distance between two notes.

Runs in your browserNothing you enter is uploaded, and it keeps working with the network off.

A letter, an optional sharp or flat, and the octave.

The distance between two notes.

How to use it

  1. Enter both notes. With their octave numbers: C4, Eb5.
  2. Read the name and the count. Semitones, cents and the ratio.
  3. Compare it to the pure ratio. That gap is what tempering costs.

When you would use this

An interval is the distance between two pitches, and it can be counted three ways that all mean the same thing. Semitones is the count musicians use: four of them is a major third, seven is a perfect fifth. Cents is the same distance at a hundred times the resolution, and it exists because pitch is logarithmic, so the same musical interval is a different number of hertz depending where on the keyboard you are. A frequency ratio is what the physics actually is. The interesting number is the last one. In equal temperament every semitone is the twelfth root of two, which makes every interval except the octave an irrational ratio, and none of them land exactly on the simple fractions that sound pure. A fifth should be 3:2 and comes out two cents narrow, which nobody notices. A major third should be 5:4 and comes out nearly fourteen cents sharp, which is plainly audible on a held chord and is why singers and string players bend their thirds away from where a piano puts them. That compromise was made deliberately. It is what allows a keyboard to play in every key with one set of strings, and it cost every interval a little tuning to buy it. One interval has no pure version at all. The tritone divides the octave exactly in half, so no ratio of small whole numbers lands there. It was avoided for centuries and nicknamed the devil in music. What this cannot do is tell spelling apart. A diminished fourth and a major third are both four semitones, and only the notation says which was meant.

Questions

Why is the ratio not a simple fraction?
Because equal temperament divides the octave into twelve identical steps, and identical steps mean irrational ratios: a semitone is the twelfth root of two. The simple fractions belong to just intonation, where a fifth is exactly 3:2. Both are shown, because the gap between them is the whole story of Western tuning.
How far out is equal temperament?
It depends on the interval. The fifth is two cents narrow, which nobody hears. The major third is nearly fourteen cents sharp, which is audible on a sustained chord and is why barbershop and string quartets bend thirds away from where a piano puts them. The octave is exact.
Why does it say it cannot tell spelling apart?
Because a diminished fourth and a major third are both four semitones. On a keyboard they are the same two keys; on paper they are different intervals doing different jobs in different keys. Measuring the distance between two pitches cannot recover which one was meant, and this measures the distance.