GizmoBench guides
Frequency to Note: Convert Hz to a Musical Note

To turn a frequency into a note, compare it with A4 = 440 Hz, count how many equal-tempered semitones it sits above or below that reference, and round to the nearest whole semitone. The formula is n = 69 + 12 × log₂(f / 440). Here f is the frequency in hertz and n is a MIDI note number. The leftover fraction of n tells you how many cents sharp or flat the pitch is. Below you will find the formula, three worked examples, a lookup table, and the limits of the method, including what changes when your A4 is not 440 Hz.
TL;DR
- Use n = 69 + 12 × log₂(f / 440), round n to the nearest integer for the note, and read the remainder as cents (100 cents = 1 semitone).
- 440 Hz is A4 (MIDI 69), and middle C is C4 at about 261.63 Hz (MIDI 60).
- A result is only valid for a stated tuning reference. If your ensemble or recording uses 442 Hz, 432 Hz or Baroque 415 Hz, change the 440 in the formula.
- A frequency gives a pitch position, not a spelling: the same Hz value can be written as F♯ or G♭ depending on the key.
- Converting a number you already have is plain arithmetic. Measuring a pitch from a microphone is a separate, harder problem.
Table of Contents
- The formula, step by step
- Worked examples
- Quick lookup: common frequencies and their notes
- Why A4 = 440 Hz, and what changes when it isn’t
- What a frequency cannot tell you
- Doing it in practice
- Tools on GizmoBench for this kind of task
- FAQ
- Sources
The formula, step by step
Western music is built mostly on twelve-tone equal temperament. One octave is a 2:1 frequency ratio, and that octave is divided into 12 equal semitones, each with a ratio of 2^(1/12), about 1.0595. The University of New South Wales physics group documents how note names, MIDI numbers and frequencies relate, and the conversion below follows the same relationships.
The steps:
- Take your frequency f in hertz.
- Divide it by the reference, 440 Hz.
- Take the base-2 logarithm of that ratio. This gives the distance from A4 in octaves.
- Multiply by 12 to convert octaves to semitones.
- Add 69, because A4 is MIDI note 69.
- Round to the nearest integer. That integer is the MIDI note number of the nearest note.
- Subtract the rounded value from the unrounded one and multiply by 100. That is the deviation in cents.
If you want to check a result yourself, a spreadsheet works fine. In most spreadsheet programs, =69+12*LOG(A1/440,2) returns the fractional MIDI number for a frequency in cell A1.
To turn a MIDI note number back into a frequency, reverse it: f = 440 × 2^((m − 69)/12). The Max Cookbook shows the same pair of conversions (the mtof and ftom objects in Max) as the standard way to move between MIDI pitch and equal-tempered frequency.
Turning a MIDI number into a name and octave
Once you have the integer MIDI number, the pitch class is the number modulo 12, and the octave is the integer part of the number divided by 12, minus 1. Pitch class 0 is C, 1 is C♯/D♭, 2 is D, and so on up to 11, which is B. So MIDI 60 gives 60 mod 12 = 0 © and octave 60/12 − 1 = 4, which is C4, middle C. In the scientific pitch notation used here, the octave containing middle C is numbered 4, and the note just below it is B3, as the UNSW converter notes about its own naming convention.
Worked examples
The three examples below are our own calculations with the formula above, rounded for display. Spreadsheet results may show more decimals.
Example 1: 450 Hz
The ratio 450 / 440 is about 1.0227, and its log₂ is about 0.0324. Multiply by 12 for 0.389 semitones, and add 69 to get n ≈ 69.39. The nearest integer is 69, which is A4, and the remainder is about +39 cents. So 450 Hz is an A4 that is clearly sharp, nearly a third of the way to the next semitone’s territory is not reached, but it is well past what most listeners would call in tune.
Example 2: 300 Hz
The ratio 300 / 440 is about 0.6818, and its log₂ is about −0.5525. Multiply by 12 for −6.63 semitones, and add 69 to get n ≈ 62.37. The nearest integer is 62, which is D4 (D4 sits at about 293.66 Hz), and the remainder is about +37 cents. So 300 Hz is a D4, 37 cents sharp.
Example 3: 100 Hz
The ratio 100 / 440 is about 0.2273, and its log₂ is about −2.137. Multiply by 12 for −25.65 semitones, and add 69 to get n ≈ 43.35. The nearest integer is 43, which is G2 (about 98 Hz), and the remainder is about +35 cents. So 100 Hz is a G2, 35 cents sharp.
Notice that two of the three results fall roughly a third of a semitone from the nearest note. Real-world frequencies, from a hum, a fan or a synthesized tone, rarely land on a note exactly. That is why a cents value is more informative than a note name alone.
Quick lookup: common frequencies and their notes
At A4 = 440 Hz, these values follow the equal-tempered formula and come from the UNSW note table. They are rounded display values.
| Frequency (Hz) | Note | Where you meet it |
|---|---|---|
| 27.50 | A0 | Lowest key on a standard 88-key piano |
| 82.41 | E2 | Low E string of a standard-tuned guitar |
| 110.00 | A2 | A string of a guitar |
| 196.00 | G3 | G string of a guitar |
| 220.00 | A3 | One octave below concert A |
| 261.63 | C4 | Middle C (MIDI 60) |
| 329.63 | E4 | High E string of a guitar |
| 440.00 | A4 | Concert A (MIDI 69) |
| 523.25 | C5 | One octave above middle C |
| 880.00 | A5 | One octave above concert A |
Two patterns are worth memorizing. Doubling a frequency raises the pitch by exactly one octave (220, 440, 880), and the note name stays the same. Each semitone multiplies the frequency by about 1.0595, so the gaps in hertz get wider as you go up even though the musical interval stays the same.
For a full chart, the House of Octave note frequency chart lists every note from C0 to B8 and lets you move the A4 reference, which is handy when you want to see how the whole table shifts.

Why A4 = 440 Hz, and what changes when it isn’t
The standard is written down. ISO 16:1975 specifies 440 Hz for the note A in the treble staff, and ISO lists the edition as reviewed and confirmed in 2022, so it remains current. That makes 440 Hz the most defensible default for a general calculator.
It is still a convention, not a physical requirement. Orchestras, early-music groups and individual recordings often choose another reference, and your result is only meaningful against the reference you actually play or record in. The House of Octave chart mentioned above, for instance, offers 432, 442 and Baroque 415 as alternative A4 settings.
How far do those alternatives move things? Using the cents formula, 1200 × log₂(f₂ / f₁), our own arithmetic gives:
| A4 reference | Offset from 440 Hz | Practical effect |
|---|---|---|
| 442 Hz | about 8 cents sharp | Small, but audible against fixed-pitch instruments |
| 432 Hz | about 32 cents flat | Close to a third of a semitone lower |
| 415 Hz | about one semitone flat | Used for Baroque performance practice |
So a 440 Hz tone is roughly 32 cents sharp when you interpret it against A = 432. To handle this in the formula, replace 440 with your chosen reference in both the conversion and the reverse formula. Percussionists run into the same question from the other direction, since cymbals and drums have their own tonal behavior around a reference pitch. Temple of Sound’s lab write-up on cymbal bell size and 1–3 kHz overtones is a useful read if you want to see how pitch and overtone content relate for drummers.
What a frequency cannot tell you
Pitch height versus pitch spelling
A frequency fixes where a pitch sits in the equal-tempered system. It does not fix how the note is written. The pitch at about 369.99 Hz is F♯4 or G♭4, and a performer would choose one depending on the key. Research on pitch spelling with the Spiral Array model treats this as a separate problem that needs musical context, because a bare Hz value cannot reveal the intended key. Most converters therefore pick one spelling, usually sharps. If you already know your key, rename the note yourself. The Scale Finder can help you see which scales contain the notes you found, and with them which spelling is conventional.
Equal temperament is a model
The formula assumes twelve equal semitones. Other temperaments and historical tunings place notes slightly differently, and some instruments (voices, violins, trombones) are routinely played off the equal-tempered grid for expressive reasons. A mismatch of a few cents is not necessarily an error.
Converting a number is not detecting a pitch
If you already have a frequency value, conversion is deterministic once you fix the reference. If you are starting from sound, you first have to estimate the fundamental frequency, and real sounds contain harmonics, noise, inharmonicity and drifting pitch. Music-information software often snaps estimated pitch to discrete note events, and the Essentia documentation for pitch contour segmentation describes that quantization to MIDI pitch values. That snapping is a modeling choice. A measured pitch may sit legitimately between notes, which is exactly why reporting cents, rather than only forcing a label, preserves useful information.
Range limits
A piano-oriented chart usually covers A0 (27.5 Hz) to C8. The UNSW online converter accepts inputs from 27.5 Hz (A0) up to 14,080 Hz (A9). Outside a calculator’s range, the formula still works mathematically and gives valid notes, but check what your tool supports before trusting a very low or very high input.
Doing it in practice
Here are a few common situations and the approach that fits each.
- You have a number from a spec sheet or a spectrum analyzer. Use the formula or a spreadsheet, keep the cents value, and decide whether the reference should be 440 or something else. If the analyzer shows several peaks, the lowest strong one is usually the fundamental, but verify by ear.
- You want to tune a string or check an open note. Compare against the table above. A low E string should land near 82.41 Hz and the A string near 110 Hz, in standard tuning at A4 = 440. For hands-on tuning with your ears or your microphone, our Guitar Tuner runs in the browser.
- You are building a patch or a synth preset. Work in MIDI numbers, and use f = 440 × 2^((m − 69)/12) to get exact target frequencies for each note.
- You are moving a song to a new key. Convert the notes first, then use the Chord Transposer to shift the sheet. If you are trying to hear a note on a keyboard, the Virtual Piano is a simple way to check your result against a real key.
- You are changing a recording’s speed. Speed changes alter pitch unless pitch is preserved, and a change of ratio r shifts pitch by 12 × log₂® semitones. The Audio Speed Changer keeps the pitch while changing tempo.
Tools on GizmoBench for this kind of task
GizmoBench is a collection of browser-based tools that run locally, with no account and no installation, and file processing happens in your browser. For music, the Guitar Tuner covers tuning by ear or with a microphone, and the Chord Progression Generator and the Piano Chord Finder help once you know your notes. For the arithmetic around them, such as ratios between frequencies, see the Ratio Calculator, or browse the everyday tools for the rest of the catalog. Core tool functions are free to use, and we do not promise that every feature will stay free indefinitely.
FAQ
What note is 440 Hz?
440 Hz is A4, the A above middle C, and MIDI note 69. It is the standard reference pitch specified by ISO 16:1975, so every other equal-tempered note is calculated relative to it. Many ensembles tune to a slightly different A, so check which reference applies to you.
How do I find the cents difference between two frequencies?
Use cents = 1200 × log₂(f₂ / f₁). A positive result means f₂ is sharp of f₁, and a negative result means it is flat. One hundred cents equal one equal-tempered semitone, and 1200 cents equal one octave.
Why does my converter say F♯ when my sheet music says G♭?
They are the same pitch in equal temperament, called enharmonic equivalents. A frequency alone cannot tell a calculator which spelling fits your key, so most tools choose one by default. Pick the name that matches the key signature of your piece.
Can I use this for a note that falls between two notes?
Yes. Round n to the nearest integer for the note name and keep the remainder as cents. A value near 50 cents means the pitch sits almost exactly halfway between two notes, and the nearest-note label is then a weak summary of what you actually have.
Does A = 432 Hz change the note names?
It changes the frequencies assigned to them. With A4 set to 432 Hz, the note you call A4 sounds about 32 cents lower than at 440 Hz, according to our calculation from the cents formula. To interpret a measured frequency correctly, put 432 into the formula where 440 normally goes.
Sources
- Note names, MIDI numbers and frequencies (UNSW)
- Frequency to Musical Note Converter (UNSW)
- ISO 16:1975, Acoustics: Standard tuning frequency
- Conversion between pitch and frequency (Max Cookbook)
- Pitch spelling with the Spiral Array model (JHU)
- PitchContourSegmentation (Essentia documentation)
- Note Frequency Chart (House of Octave)