Hz to Musical Note Converter

Identify the closest musical note and cents deviation for any frequency

Ad placeholder (leaderboard)

Every audible frequency corresponds to a musical pitch — exactly on a note or some number of cents away from it. This converter takes a frequency in Hz and tells you the nearest equal-temperament note, its octave, its MIDI number, and precisely how sharp or flat the input is.

How it works

Equal temperament divides each octave into twelve equal semitones. The position of any frequency on the MIDI scale is:

n = 69 + 12 · log2(f / A4)

where A4 is the reference pitch (440 Hz by default, mapped to MIDI 69). Rounding n to the nearest integer gives the closest note. The leftover fraction, multiplied by 100, is the deviation in cents:

cents = (n − round(n)) · 100

The exact frequency of that nearest note is recovered with A4 · 2^((round(n) − 69) / 12), which the tool also displays so you can see your target.

Tips and example

A reading of 445 Hz with A4 set to 440 returns A4 at about +19.6 cents — noticeably sharp. Drop the reference to 442 Hz and the same 445 Hz reads only +11.7 cents, because the whole scale has shifted up.

  • Use the cents value to decide which way to tune: positive means lower the pitch.
  • Within ±5 cents is generally heard as in tune.
  • Match the A4 reference to your ensemble before trusting the note name near octave edges.

The conversion runs entirely in your browser.

Ad placeholder (rectangle)