What sets a note's frequency
A note name is a position in a repeating pattern; a frequency is a physical rate. Equal temperament is the rule that connects them, and it is deliberately simple: the octave is a doubling of frequency, and it is cut into twelve steps that are equal in ratio rather than in hertz. Each semitone therefore multiplies frequency by the twelfth root of two, 1.0594631. Twelve of those multiplications compound to exactly 2, which is the octave.
That single decision fixes everything else. Once you anchor the system at one pitch, every other pitch follows. The anchor is A4, standardised at 440 Hz by ISO 16, and the MIDI specification numbers that same note 69. So the frequency of any note is 440 Hz times two raised to the power of (its MIDI number minus 69) over twelve.
The consequences are worth noticing. Semitones near the bottom of the range are tiny in hertz - the step from A0 at 27.5 Hz to A#0 is about 1.6 Hz - while the same musical interval at the top of a piano spans nearly 250 Hz. Pitch perception is logarithmic, so those two intervals sound the same size. It is also why a tuner reports error in cents rather than hertz: a 1 Hz error is inaudible at the top of the keyboard and glaring at the bottom.
Reading the formula in both directions
Start with the MIDI number, because it removes all ambiguity about octaves. Scientific pitch notation starts each octave at C, so middle C is C4 and the A above it is A4. The MIDI number is n = (octave + 1) x 12 + pitch class, with C = 0 through B = 11. Middle C gives (4 + 1) x 12 + 0 = 60, and A4 gives (4 + 1) x 12 + 9 = 69, which is the anchor.
Forward, you subtract 69 to get the number of semitones above or below the reference, divide by twelve to turn semitones into octaves, and raise two to that power. Multiply by the reference frequency and you have the answer. Backward, you invert the same chain: divide the measured frequency by the reference, take the base-2 logarithm, multiply by twelve, and add 69. The result is almost never a whole number, and the fractional part multiplied by 100 is exactly the error in cents.
Changing the reference pitch scales the whole system. Set A4 to 415 Hz - roughly the baroque convention used by many period ensembles - and every frequency drops by the factor 415/440 = 0.943182, which is 1200 x log2(0.943182) = −101.27 cents, a hair over a semitone. Set it to 442 Hz, as many European orchestras do, and everything rises by 7.85 cents. The note names and MIDI numbers do not move; only the physical frequencies do.
Wavelength is a separate physical step and depends on air, not on music. The speed of sound in dry air is about 331.3 m/s at 0 degrees C and rises with the square root of absolute temperature, giving 343.2 m/s at 20 degrees C. Divide that by the frequency and you have the wavelength, which is what matters when you are placing a microphone, predicting a room mode, or working out why a bass note vanishes at one seat.
Worked example: the frequency of E2, the low E on a guitar
Take the bottom string of a guitar in standard tuning, E2, at a reference of A4 = 440 Hz and a room at 20 degrees C.
- MIDI number. E is pitch class 4, and the octave is 2, so n = (2 + 1) x 12 + 4 = 36 + 4 = 40.
- Semitones from the reference. 40 − 69 = −29. The note is 29 semitones below A4.
- Convert to octaves. −29 / 12 = −2.41667 octaves.
- Raise two to that power. 2−2.41667 = 0.187288.
- Multiply by the reference. 440 x 0.187288 = 82.4069 Hz, which is the published value for E2 in equal temperament.
- Period. 1 / 82.4069 = 0.0121349 s, or 12.135 ms per cycle.
- Wavelength. The speed of sound is 331.3 x sqrt(293.15 / 273.15) = 331.3 x 1.035963 = 343.21 m/s. Divide: 343.21 / 82.4069 = 4.165 m. That is longer than most home studios, which is precisely why low E is the hardest note in a small room to hear evenly.
Now run it backwards. Suppose a tuner reads 82.00 Hz on that string. Then n = 69 + 12 x log2(82.00 / 440) = 69 + 12 x log2(0.1863636) = 69 + 12 x (−2.423797) = 69 − 29.08556 = 39.9144. The nearest whole number is 40, which is E2, and the fractional part is −0.0856, so the string is 8.57 cents flat. Five cents is the usual threshold at which a sustained note is heard as out of tune against another instrument, so that is worth correcting.
How to read the cents figure
Cents are the currency of tuning accuracy because they are logarithmic, like hearing. One hundred cents is a semitone anywhere in the range, whether that is 1.6 Hz at the bottom of a piano or 240 Hz at the top. Below roughly five cents, a discrepancy on a sustained pure tone is inaudible to most listeners. Between five and fifteen cents it is audible as beating when two instruments play together, even when neither sounds wrong alone. Above about twenty cents most listeners describe the note as out of tune.
A deviation near fifty cents means the calculator has no useful answer to give you, because the frequency sits halfway between two semitones and the nearest-note label becomes arbitrary. The calculator warns you above forty cents for this reason. If you get that reading from a tuner on a real instrument, suspect that you are measuring an overtone rather than the fundamental, or that the note is genuinely between two pitches.
Real instruments are not exactly equal-tempered, and that is not a fault. Piano tuners deliberately stretch the octaves - sharpening the treble and flattening the bass, often by 30 cents or more at the extremes - because piano strings are stiff enough that their overtones sit sharp of exact harmonics, and octaves tuned pure to the fundamental sound flat. The harmonic series calculator shows where those overtones fall and by how much they deviate. Brass players lip notes into place, string players adjust by ear, and singers lean intervals toward just intonation when the harmony allows it. Use the cents and interval calculator to see how far equal temperament sits from those just ratios.
Reference frequencies for A in every octave, and the octave around middle C
| Note | MIDI | Frequency (Hz) | Wavelength at 20 C (m) |
|---|---|---|---|
| A0 (lowest piano note) | 21 | 27.500 | 12.48 |
| A1 | 33 | 55.000 | 6.24 |
| E2 (guitar low E) | 40 | 82.407 | 4.16 |
| A2 | 45 | 110.000 | 3.12 |
| A3 | 57 | 220.000 | 1.56 |
| C4 (middle C) | 60 | 261.626 | 1.312 |
| E4 (guitar high E) | 64 | 329.628 | 1.041 |
| A4 (reference) | 69 | 440.000 | 0.780 |
| C5 | 72 | 523.251 | 0.656 |
| A5 | 81 | 880.000 | 0.390 |
| A6 | 93 | 1760.000 | 0.195 |
| C8 (highest piano note) | 108 | 4186.009 | 0.082 |
Wavelengths use a speed of sound of 343.21 m/s, from 331.3 x sqrt(293.15/273.15). Frequencies are the equal-tempered values from the formula above, rounded to three decimals.
Pitfalls and limits
- Octave numbering conventions differ. This calculator uses scientific pitch notation, where middle C is C4 and MIDI 60. Yamaha instruments have historically called that same note C3. Check which convention your device uses before blaming the arithmetic.
- Equal temperament is a compromise, not a description of a real instrument. No acoustic instrument produces exactly these frequencies, and pianos are deliberately stretched away from them.
- A tuner may be locking to an overtone. If a reading is roughly 700, 1200 or 1900 cents away from what you expect, you are measuring the second, third or fourth partial rather than the fundamental.
- Wavelength depends on temperature, not on humidity to any useful degree. Going from 0 to 30 degrees C raises the speed of sound by about 5.5%, which shifts room modes noticeably; humidity moves it by well under 1% over normal indoor conditions.
- MIDI 1.0 carries only notes 0 to 127, which is C-1 to G9. Pitches outside that have frequencies but no note number in a standard MIDI message.
- Detuning in cents is multiplicative, not additive. Adding 50 cents to a note does not add a fixed number of hertz; it multiplies the frequency by 2^(50/1200) = 1.02930.
Where 440 came from, and what else is used
Concert pitch has not always been 440 Hz, and it is not universally 440 now. Surviving instruments show that eighteenth-century pitch varied by more than a semitone between cities. Nineteenth-century orchestras drifted steadily upward as brighter, louder ensembles competed, until an international conference in the twentieth century settled on 440 Hz for A4; ISO 16 records that standard. Many European orchestras today tune to 442 or 443 Hz, which is 8 to 12 cents sharp of the standard - enough that a visiting soloist notices, and enough to matter to a wind instrument whose length is fixed.
Historically informed performance goes the other way, using A415 for baroque repertoire, almost exactly a semitone below A440, which conveniently lets a harpsichord be transposed by a whole key rather than retuned. A392 appears for French baroque music and A430 for classical-era work. None of these is more correct than another; they are conventions attached to repertoire.
Equal temperament itself is one option among many. Just intonation tunes intervals to small whole-number ratios, so a major third is exactly 5:4 - 386.31 cents - rather than the equal-tempered 400 cents, and it sounds noticeably purer in one key. Meantone and well temperaments distribute the compromise unevenly so that common keys sound better than remote ones. Equal temperament makes every key equally usable and every key equally impure, which is what made unrestricted modulation possible. When you need to know the size of that impurity, the cents and interval calculator quantifies it, and the transposition calculator handles the key arithmetic that equal temperament makes safe.
Frequency also feeds directly into instrument setup. String tension goes as the square of frequency, so a change of reference pitch or a drop tuning changes the load on the neck; the string tension calculator works that out from gauge, scale length and target pitch.
