What Is the Semitone Calculator?
This tool measures the musical interval between two pitches expressed in semitones — the smallest step in the 12-tone equal temperament system used by pianos, guitars, and most Western music. Given any two frequencies (in Hz), it returns how many semitones (and cents) separate them.
How to Use It
Enter the lower frequency f1 and the higher frequency f2 in hertz, then read the interval. A positive value means f2 is higher than f1; if you reverse the order you get a negative number, indicating a downward interval. The result also converts to cents, where 100 cents equals one semitone.
The Formula Explained
The interval in semitones is:
$$n = 12 \cdot \log_{2}\!\left(\frac{\text{Higher } f_2 \text{ (Hz)}}{\text{Lower } f_1 \text{ (Hz)}}\right)$$
An octave doubles the frequency (\(f_2/f_1 = 2\)), and \(\log_{2}(2) = 1\), so \(12 \times 1 = 12\) semitones — exactly one octave. Each semitone corresponds to a frequency ratio of the twelfth root of two (\(\approx 1.0595\)).
Worked Example
Compare A4 (440 Hz) with A5 (880 Hz). The ratio is \(880/440 = 2\), and \(\log_{2}(2) = 1\), so $$n = 12 \times 1 = 12 \text{ semitones}$$ — one full octave, or 1200 cents.
Common Musical Intervals: Semitones, Cents and Frequency Ratios
In 12-tone equal temperament (12-TET), the octave is divided into 12 equal semitones. Each semitone multiplies frequency by \(2^{1/12}\), so an interval of \(n\) semitones has ratio \(2^{n/12}\). The just-intonation column shows the simple whole-number ratios that equal temperament approximates. Just ratios for the tritone, minor 6th and minor 7th vary by tuning system, so the common choices are listed.
| Semitones | Interval | Cents | Equal-tempered ratio \(2^{n/12}\) | Just-intonation ratio (common choice) |
|---|---|---|---|---|
| 0 | Unison | 0 | 1.0000 | 1/1 |
| 1 | Minor 2nd | 100 | 1.0595 | 16/15 |
| 2 | Major 2nd | 200 | 1.1225 | 9/8 |
| 3 | Minor 3rd | 300 | 1.1892 | 6/5 |
| 4 | Major 3rd | 400 | 1.2599 | 5/4 |
| 5 | Perfect 4th | 500 | 1.3348 | 4/3 |
| 6 | Tritone | 600 | 1.4142 | 45/32 |
| 7 | Perfect 5th | 700 | 1.4983 | 3/2 |
| 8 | Minor 6th | 800 | 1.5874 | 8/5 |
| 9 | Major 6th | 900 | 1.6818 | 5/3 |
| 10 | Minor 7th | 1000 | 1.7818 | 16/9 |
| 11 | Major 7th | 1100 | 1.8877 | 15/8 |
| 12 | Octave | 1200 | 2.0000 | 2/1 |
Example: a perfect fifth in equal temperament is \(2^{7/12} \approx 1.4983\), slightly narrower than the just fifth of exactly 1.5.
Interval Results for Typical Frequency Pairs
Each row uses \(n = 12\log_2(f_2/f_1)\) and cents \(= 100n\). Negative values mean the second frequency is lower than the first. Values are rounded.
| f1 (Hz) | f2 (Hz) | Ratio f2/f1 | Semitones | Cents |
|---|---|---|---|---|
| 440 | 466.16 | 1.0595 | 1.00 | 100 |
| 440 | 659.26 | 1.4983 | 7.00 (equal-tempered fifth) | 700 |
| 440 | 660 | 1.5000 | 7.02 (just fifth) | 701.96 |
| 261.63 | 440 | 1.6818 | 9.00 | 900 |
| 440 | 442 | 1.0045 | 0.0785 | 7.85 |
| 880 | 440 | 0.5000 | −12 | −1200 |
Worked check for the just fifth: \(n = 12\log_2\left(\frac{660}{440}\right) = 12\log_2(1.5) = 12 \times 0.58496 \approx 7.0196\) semitones, i.e. about 702 cents. That is about 2 cents wider than the equal-tempered fifth.
Constants and Reference Pitches
- Semitone ratio: the twelfth root of 2, \(2^{1/12} \approx 1.059463\).
- Semitone and cents: 1 semitone = 100 cents.
- Octave: 1 octave = 12 semitones = 1200 cents, a frequency ratio of 2:1.
- Cents formula: \(\text{cents} = 1200\log_2\left(\frac{f_2}{f_1}\right)\).
- Concert pitch: A4 = 440 Hz, the international standard reference defined in ISO 16.
- Middle C (C4): about 261.63 Hz when A4 = 440 Hz in equal temperament.
- Alternate A4 conventions: some orchestras tune to 442 Hz, and some musicians choose 432 Hz. These are conventions or preferences, not the ISO standard. A 440→442 Hz shift is about 7.85 cents, and 440→432 Hz is about −31.8 cents.
FAQ
What is a semitone? It is the interval between two adjacent keys on a piano, such as C to C#.
What are cents? Cents subdivide each semitone into 100 equal parts, useful for measuring tuning accuracy.
Can I get a negative result? Yes — if f2 is lower than f1, the interval is negative, meaning a downward pitch change.