Convert Hz to a musical note, with how many cents sharp or flat it is, or pick a note and octave to get its frequency in Hz, using A4 = 440 Hz tuning.
- All Unit Converters
- Notes Per Second Calculator
- Octave Frequency Calculator
- BPM to Hz Calculator
- Hz to ms Calculator
- Hz to Period Calculator
Calculator Functions
| Function | What it does | What it requires |
|---|---|---|
| Note from frequency (Hz) | Finds the closest musical note to a frequency and how many cents sharp or flat the frequency is | Requires a frequency in Hz |
| Frequency from note | Finds the frequency of a named note | Requires the note name and its octave, from 0 to 8 |
| Frequency from piano key index | Converts a piano key index into a frequency | Requires the key index, counted from A0 = 1 so that A4 = 49. Fractional values are accepted for pitches between keys |
Every function uses 12-tone equal temperament with A4 = 440 Hz and scientific pitch names, where middle C is C4. Each result shows the closest note, the offset from it in cents, the piano key index, the MIDI note number and a table of the twelve note frequencies in that octave.
Hz to Note Formulas
| n | Piano key index: A0 = 1, A4 = 49, C8 = 88 |
| f | Frequency (Hz) |
| 440 | Frequency of A4, the reference note (Hz) |
In equal temperament an octave doubles the frequency and is split into 12 semitones with the same frequency ratio, 21/12, about 1.0595. The number of semitones between a frequency and A4 is therefore 12 × log2(f ÷ 440) [1]. Adding 49 turns that into a piano key index. Adding 69 instead gives the MIDI note number [1], so the MIDI number is always the key index plus 20.
Note from frequency (Hz)
The main formula gives n, and the closest note is n rounded to the nearest whole key, with an exact half rounding up. The offset in cents is (n − the whole key) × 100, positive when the frequency is sharp. For 450 Hz, n = 49 + 12 × log2(450 ÷ 440) = 49.389, so the closest note is A4 and the frequency is 38.91 cents sharp. For 128 Hz, n = 27.623, which is C3 (130.81 Hz), 37.63 cents flat.
Frequency from note
s − 20
Here s is the number of semitones the note sits above C: C = 0, C♯ = 1, and so on up to B = 11. The key index then goes into the frequency formula below. B4 is 12 × 5 + 11 − 20 = key 51, which is 493.88 Hz.
Frequency from piano key index
Key 40 is middle C: 440 × 2−9 ÷ 12 = 261.63 Hz. Key 1 (A0) is 27.5 Hz and key 88 (C8) is 4,186.01 Hz.
Note frequencies in Hz
| Note | Octave 2 | Octave 3 | Octave 4 | Octave 5 |
|---|---|---|---|---|
| C | 65.41 | 130.81 | 261.63 | 523.25 |
| C♯/D♠| 69.30 | 138.59 | 277.18 | 554.37 |
| D | 73.42 | 146.83 | 293.66 | 587.33 |
| D♯/E♠| 77.78 | 155.56 | 311.13 | 622.25 |
| E | 82.41 | 164.81 | 329.63 | 659.26 |
| F | 87.31 | 174.61 | 349.23 | 698.46 |
| F♯/G♠| 92.50 | 185.00 | 369.99 | 739.99 |
| G | 98.00 | 196.00 | 392.00 | 783.99 |
| G♯/A♠| 103.83 | 207.65 | 415.30 | 830.61 |
| A | 110.00 | 220.00 | 440.00 | 880.00 |
| A♯/B♠| 116.54 | 233.08 | 466.16 | 932.33 |
| B | 123.47 | 246.94 | 493.88 | 987.77 |
Each octave up doubles the frequency and each octave down halves it, so A1 is 55 Hz and A6 is 1,760 Hz.
Limits of This Estimate
- The note names assume equal temperament and A4 = 440 Hz. An instrument tuned to another reference pitch, or in another tuning system, gives different frequencies for the same note names [1].
- The closest note is only a label for the nearest semitone. The cents offset shows how far the frequency really is from that note, up to 50 cents either way.
- A key index below 1 or above 88 lies outside a standard 88-key piano. The frequency is still calculated, as a theoretical pitch.
Sources
- University of New South Wales, Music Acoustics, Note names, MIDI numbers and frequencies: equal-tempered semitone ratio, semitones from A4 as 12 × log2(f ÷ 440), and MIDI number 69 for A4
