To convert hertz to a note at A4=440 Hz, calculate m = 69 + 12 × log2(f/440). Round m to the nearest integer MIDI note, then calculate how many cents the original frequency lies above or below that target.
The result is a nearest-note description within twelve-tone equal temperament. It does not prove that a performer intended that note, that the sound has a clear musical pitch or that the original frequency estimate was correct.
What you need before starting
Use a positive frequency f in hertz. A reading of 1 kHz means 1,000 Hz, not 1 Hz. Zero, a negative value or an unvoiced gap is not a valid input to the logarithm.
Also identify the reference tuning. A440 is common, but an ensemble using A432 or A442 changes the targets. If the reference is r, replace 440 with r throughout the calculation.
For measured audio, make sure the value represents the intended fundamental. A prominent spectrum peak might instead be a harmonic, room hum or another instrument.
The conversion in five steps
- Divide by the reference. Compute f/r.
- Take a base-two logarithm. This measures the octave distance from A4.
- Multiply by twelve and add 69. The result is a fractional MIDI-note position.
- Round to the nearest integer. Convert that number to a note name and octave.
- Keep the offset. Compare the original frequency with the selected note’s exact target.
Do not round the frequency before taking the logarithm. Rounding too early can alter the chosen note near a semitone boundary and unnecessarily reduce precision.
Worked example: what note is 100 Hz?
With r=440, m = 69 + 12 × log2(100/440), approximately 43.35. Rounding gives MIDI 43, or G2 in scientific pitch notation.
G2’s calculated target is about 98.00 Hz. The input is therefore slightly above G2, not exactly G2. Calculate cents as 1200 × log2(input / target), giving approximately +35.0 cents.
A complete result is “100 Hz: nearest G2, about 35 cents sharp relative to A440 equal temperament.” Keeping the reference and offset makes the answer more useful than silently replacing 100 with 98. Enter 100 Hz in the hz to note converter to check the nearest note and cents offset at the same reference.
More common hertz-to-note examples
| Input | Nearest note | Approximate offset |
|---|---|---|
| 70 Hz | C#2/Db2 | +17.5 cents |
| 100 Hz | G2 | +35.0 cents |
| 128 Hz | C3 | −37.6 cents |
| 220 Hz | A3 | 0 cents |
| 432 Hz | A4 | −31.8 cents |
| 440 Hz | A4 | 0 cents |
| 528 Hz | C5 | +15.6 cents |
| 660 Hz | E5 | +2.0 cents |
| 1,000 Hz | B5 | +21.3 cents |
The musical note frequency chart lists the exact target relationships before display rounding. These examples are mathematical conversions, not measurements made with the site’s tools.
Why note boundaries use ratios
Halfway between neighbouring equal-tempered notes means halfway in cents, not halfway by arithmetic frequency. The boundary is the geometric mean: the square root of the product of the two target frequencies.
Between A4 at 440 Hz and A#4/Bb4 at about 466.16 Hz, the midpoint is approximately 452.89 Hz. It lies 50 cents above A4 and 50 cents below A#4. A value extremely close to that boundary can change label with tiny input variations.
At an exact tie, a software rounding convention chooses a side. Neither choice removes the need to show the offset and input uncertainty. A flickering note label near the boundary may be mathematically expected.
How does A432 change the answer?
At an A432 reference, 432 Hz is exactly the chosen A4 target. At A440, the same physical frequency is about 31.77 cents below A4. The sound has not changed; the comparison grid has.
Likewise, all note targets scale when the reference changes. Do not adjust the reference simply to centre a reading unless that change matches the intended ensemble tuning.
The A440 explanation distinguishes reference pitch from temperament. A change of reference is not automatically a change to just intonation or another interval system.
How MIDI numbers become note names
Take the integer note number modulo twelve to find the chromatic pitch class, with C as zero. The scientific octave is floor(m/12) minus one. Thus MIDI 60 is C4, 69 is A4 and 72 is C5.
Some applications display different octave labels. If two programs disagree by one octave, compare the MIDI number and frequency before assuming a measurement error.
Ordinary MIDI note messages use 0–127. A mathematical frequency can fall outside that range; do not silently clamp an extreme input to a legal MIDI number and call it the correct note.
When a nearest note is not the whole answer
Speech, percussion, breath noise and dense chords may not have one clear fundamental. A converter can name a supplied frequency without establishing that it represents the whole sound.
A detector can also follow a harmonic or choose a multiple of the period. If an apparent 220 Hz voice becomes a 440 Hz reading without an audible leap, investigate the estimate before interpreting it as A4.
See how to interpret detector results for the measurement side. For the reverse mathematical problem, use note-to-frequency conversion.
If a measurement varies across several frames, preserve that variation before converting it into a single summary. A nearest-note label should not conceal a changing source or uncertainty in the original estimate.
Frequently asked questions
Why does 660 Hz become E5 rather than exactly an E?
E5’s A440 equal-tempered target is approximately 659.26 Hz. The input is close to it but about two cents higher.
Should I average the hertz values of a vibrato note?
First define the statistic and exclude errors or unvoiced frames. Arithmetic hertz averages and log-pitch averages are different; neither automatically identifies the intended musical centre.
Can this find the key of a song?
No. One nearest note is not a tonal key. Key estimation needs musical context, such as the pitch collection, harmony and tonal centre.
Is a sharp nearest-note result always a mistake?
No. Slides, expressive inflection and other tuning systems may intentionally differ from the grid. Compare with the musical target before judging.
Reference basis: UNSW Music Acoustics’ note-frequency relationships. All numerical examples are calculated.
