keepcalculator

06 Numbers and Powers

Frequency to Note Converter: Find the Nearest Note

Card No. 06·60592 · Updated · Standard formula, shown below

Nearest note number (MIDI) 69
Deviation from nearest note
4,301.96 cents
Result
Nearest note frequency
36.67 Hz
Result
Frequency
440 Hz
You entered
You enter
Frequency
You get
Nearest note number (MIDI), Deviation from nearest note, Nearest note frequency
Rounding
0 dp · 2 dp

A frequency-to-note converter matches a frequency in hertz (Hz) to the nearest equal-tempered musical note and shows how far the frequency is from that note. Enter 440 Hz to get A4; the calculator also reports the note’s MIDI number and the difference in cents.

Formula

The converter first finds the frequency’s position on the equal-tempered scale, measured in semitones from A4. It rounds that position to the nearest whole semitone to identify the note, then compares the input frequency with the exact frequency of that note.

  • n = 69 + 12 log₂(f / 440) gives the unrounded MIDI note number.
  • m = round(n) is the nearest whole MIDI note number.
  • fₘ = 440 × 2(m − 69) / 12 is the equal-tempered frequency of that note, in Hz.
  • c = 1200 log₂(f / fₘ) is the deviation from the note, in cents.

Here, f is the entered frequency in hertz, n and m are MIDI note numbers, fₘ is the note frequency in hertz, and c is the deviation in cents. A positive cents value means the input is sharp of the nearest note; a negative value means it is flat. One octave is 12 semitones or 1,200 cents.

Worked Example

With the default input of 440 Hz:

  1. Calculate the position: n = 69 + 12 log₂(440 / 440) = 69.
  2. Round to the nearest semitone: m = 69. MIDI note 69 corresponds to A4 in the usual note naming convention.
  3. Find the note frequency: fₘ = 440 × 2(69 − 69) / 12 = 440 Hz.
  4. Calculate the deviation: c = 1,200 log₂(440 / 440) = 0 cents.

The outputs are MIDI note number 69, deviation 0.00 cents, and nearest note frequency 440.00 Hz.

How Frequency Maps to Musical Notes

Frequency describes how many cycles a periodic sound completes each second. Its unit, the hertz, is named for the number of cycles per second: a tone at 440 Hz completes 440 cycles each second. Musical pitch generally rises as frequency rises, but the relationship is logarithmic rather than linear. Doubling a frequency raises it by one octave; halving it lowers it by one octave.

In twelve-tone equal temperament, an octave is divided into 12 equal frequency ratios. Each step is a semitone, with a ratio of 21/12, approximately 1.05946. Therefore, adjacent semitones do not differ by a fixed number of hertz. Around A4, the next higher note is about 466.16 Hz; an octave above A4 is 880 Hz.

The calculator uses A4 = 440 Hz as its reference. MIDI note numbers label semitone positions: 69 is A4, 60 is C4 in the common convention, and each increase of one is one semitone higher. Note names and octave labels can vary between software and instrument conventions, so the MIDI number and frequency provide useful cross-checks.

How to Use the Converter

  • Enter a positive frequency in Hz. Use the fundamental pitch you want to identify, not a frequency measured in kilohertz unless you convert it first: 1 kHz equals 1,000 Hz.
  • Read the nearest MIDI note number as the closest semitone in equal temperament. Translate that number into a letter name and octave using the convention used by your tuner, keyboard, or music software.
  • Check the cents result to see how closely the input matches the note. For example, +12 cents means it is 12 cents sharp of the nearest equal-tempered note.
  • Use the nearest-note frequency as a reference for comparison, tuning, or checking a measurement. It is not a claim that the sound contains only that frequency.

For a concrete example, a frequency near 445 Hz is close to A4 at 440 Hz. Its difference is about +19.6 cents, so the converter identifies A4 as the nearest note and reports that the input is sharp. A value near the exact midpoint between two semitones can be assigned to either one depending on the rounding convention; at that boundary the cents result is about +50 or −50.

What the Result Can and Cannot Tell You

A frequency-to-note conversion is a mathematical comparison with a tuning system, not a complete analysis of a musical sound. A plucked string, voice, or instrument tone usually contains a fundamental plus harmonics at integer multiples of it. If a frequency detector locks onto a strong harmonic instead of the fundamental, the displayed note can be an octave or more above the perceived pitch. A spectrum analyzer or a pitch detector designed to identify fundamentals can help diagnose that situation.

Many real sounds also have vibrato, noise, or changing pitch. A single frequency input cannot describe those changes; use a stable reading or examine a time-varying pitch trace. The converter also assumes equal temperament and the standard A4 = 440 Hz reference. If an instrument is tuned to a different reference, or a piece uses a tuning system other than equal temperament, its intended note may differ from the nearest result shown here.

Accuracy, Rounding, and Common Mistakes

The note number is rounded to the nearest semitone, while the cents output retains two decimal places. That formatting does not mean a microphone or instrument measurement is accurate to hundredths of a cent. The quality of the result depends on the source, measurement method, noise, and frequency stability.

  • Mixing units: enter hertz, not kilohertz. For example, 0.44 kHz is 440 Hz.
  • Confusing note number and frequency: MIDI 69 is a label, not 69 Hz.
  • Assuming note names are universal: octave labels differ across some systems, even when the underlying frequency and MIDI number agree.
  • Interpreting cents as hertz: cents measure a ratio. A given number of cents corresponds to different Hz differences at different pitches.
  • Ignoring tuning reference: A4 = 440 Hz is a common standard, but a different reference shifts the frequency associated with every note.

The input range is limited to 0.001–20,000 Hz to keep the calculation within a practical audio-frequency range. The formula itself can be applied beyond that interval if the frequency is positive, but very low readings may be difficult to measure reliably, and frequencies beyond human hearing may require specialized equipment.

Frequently Asked Questions

What note is 440 Hz?
At the A4 = 440 Hz reference, 440 Hz is A4, MIDI note 69, with a deviation of 0 cents.

How do I convert Hz to a note name?
Compare the frequency with the equal-tempered semitone scale, choose the closest semitone, then express its MIDI number as a note name and octave. This converter provides the MIDI number; octave naming conventions can differ by system.

What does a cents reading mean?
A cent is one hundredth of a semitone in twelve-tone equal temperament. Positive values are sharp of the nearest note, and negative values are flat. A difference of 100 cents is one semitone.

Why does my tuner show a different note?
Check whether the readings use the same A4 tuning reference and octave convention. Also consider whether the tuner is detecting a harmonic rather than the fundamental, or whether the sound is changing in pitch.

Can this converter identify chords or multiple notes?
No. It converts one frequency at a time to its nearest note. A chord contains several simultaneous frequencies and needs a tool that can separate or analyze multiple pitches.

Related

Formula used
in f | Frequency | Hz | 440 | 0.001 | 20000
out note | Nearest note number (MIDI) | - | 69 + 12 * log2(f / 440) | 0
out cents | Deviation from nearest note | cents | 1200 * log2(f / (440 * 2 ^ (round(69 + 12 * log2(f / 440), 0) - 69) / 12)) | 2
out equal | Nearest note frequency | Hz | 440 * 2 ^ (round(69 + 12 * log2(f / 440), 0) - 69) / 12 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →