Piano Key Frequency Calculator

Music

Frequency440.00 Hz
Note nameA4
MIDI note number69
Wavelength in air0.780 m
How this was calculated
  1. Piano key 49 is A4: semitones from A4 (key 49) = 0.
  2. Equal temperament: f = 440 x 2^((49 - 49) / 12) = 440.00 Hz.
  3. Its MIDI number is 49 + 20 = 69, and the wave stretches 0.780 m in air at 343 m/s.
  4. Piano key result: key 49 sounds A4 at 440.00 Hz.

Every key on a piano has an exact frequency, and the whole keyboard is generated from a single reference note by a single rule. The reference is A4, the A above middle C, tuned to 440 Hz. From there, equal temperament divides each octave into twelve equal semitone steps, and every key's frequency follows by multiplying or dividing by the same fixed ratio for each step away from that A. This piano key frequency calculator takes any key number from 1 to 88 and returns the note's frequency in Hz, its note name, its MIDI note number and the wavelength of its sound in air.

Key numbers are the simplest possible addressing system for the keyboard: key 1 is the lowest note, key 88 the highest, and you count up one per key, white and black alike. Because each step is exactly one semitone, the arithmetic of the keyboard becomes the arithmetic of the formula f = 440 x 2^((n - 49) / 12), where n is the key number and 49 is the key number of A4 itself. Enter a key number and the calculator evaluates that exponent, names the note, adds 20 to give the MIDI number musicians' software uses, and divides the speed of sound by the frequency to give the wavelength.

Worked examples

Key 49 - A4, the tuning reference

(49)

Frequency440.00 Hz
Note nameA4
MIDI note number69
Wavelength in air0.780 m

Key 40 - middle C

(40)

Frequency261.63 Hz
Note nameC4
MIDI note number60
Wavelength in air1.311 m

Key 64 - C6

(64)

Frequency1046.50 Hz
Note nameC6
MIDI note number84
Wavelength in air0.328 m

Twelve equal semitones

Equal temperament is a compromise that became a universal standard. An octave — the interval between a note and the note that sounds like its higher twin — corresponds to a doubling of frequency, and the ear hears that doubling as a single, natural span. Equal temperament slices that span into twelve steps of exactly equal ratio, so that every semitone multiplies the frequency by the twelfth root of two. No key is favoured: a melody can start on any note and keep the same internal relationships, which is what makes modern keyboard music in all keys possible.

The formula follows directly. Starting from the reference, key 49 at 440 Hz, a key n lies (n - 49) semitones away, so its frequency is f = 440 x 2^((n - 49) / 12). For key 49 itself the exponent is 0 and the formula returns the reference unchanged. For a key twelve steps higher the exponent is 1 and the frequency doubles; twelve steps lower it halves. Everything between is the same ratio applied step by step, which is why the frequencies look irregular — 261.63 Hz, 1046.50 Hz — even though the rule generating them is perfectly regular.

That regularity is also what the calculator exposes. It does not look your key up in a stored table of eighty-eight values; it evaluates the same exponent the table was built from. Any key number you enter gets the same treatment, and the three worked examples below — the reference key itself, a key below it and a key above it — are enough to verify the rule in both directions. If you can follow those three, you can predict the shape of every other answer the page will give you.

  • f = 440 x 2^((n - 49) / 12), where n is the key number and key 49 is A4
  • Each semitone multiplies the frequency by the same twelfth-root-of-two ratio
  • Twelve semitones make an octave, and an octave exactly doubles the frequency
  • Keys below 49 use negative exponents; keys above 49 use positive ones
One reference note, one ratio, eighty-eight keys: the entire piano is 440 Hz multiplied out semitone by semitone.

Worked examples: A4, middle C and C6

Key 49 is the anchor. Piano key 49 is A4: semitones from A4 (key 49) = 0, so equal temperament gives f = 440 x 2^((49 - 49) / 12) = 440.00 Hz. Its MIDI number is 49 + 20 = 69, and the wave stretches 0.780 m in air at 343 m/s. The piano key result: key 49 sounds A4 at 440.00 Hz. Every other key is measured against this one, so it is fitting that its own calculation is the trivial case — the exponent vanishes and the reference frequency comes straight back out.

Key 40 is the most famous key on the piano. Piano key 40 is C4: semitones from A4 (key 49) = -9, so f = 440 x 2^((40 - 49) / 12) = 261.63 Hz. Its MIDI number is 40 + 20 = 60, and the wave stretches 1.311 m in air at 343 m/s. The piano key result: key 40 sounds C4 at 261.63 Hz. This is middle C, the note at the centre of the keyboard and the reference point of written music, sitting nine semitones below the tuning A.

Key 64 shows the upward direction and a much higher register. Piano key 64 is C6: semitones from A4 (key 49) = 15, so f = 440 x 2^((64 - 49) / 12) = 1046.50 Hz. Its MIDI number is 64 + 20 = 84, and the wave stretches 0.328 m in air at 343 m/s. The piano key result: key 64 sounds C6 at 1046.50 Hz. Fifteen semitones above the reference is an octave plus three semitones, and you can hear the formula in the result: the octave part doubled the frequency, and the three extra semitones carried it further still.

Key numberNote nameSemitones from A4FrequencyMIDI note numberWavelength in air
49A40440.00 Hz690.780 m
40C4-9261.63 Hz601.311 m
64C6151046.50 Hz840.328 m

Key numbers, note names and MIDI

Three naming systems meet on this page, and the calculator translates between all of them. The key number is the physical address: count the keys from the bottom of the keyboard, starting at 1, and every key — black as well as white — gets the next number. The note name is the musical address: a letter, possibly sharpened or flattened, plus an octave number, so that key 40 is C4 and key 64 is C6, with the octave number rolling over at each C. The MIDI number is the digital address used by electronic instruments and music software, and it follows the simplest rule of the three: the MIDI number is always the key number plus 20.

That plus-20 rule is worth pausing on, because it makes conversions effortless in both directions. Key 49 gives MIDI 69, key 40 gives MIDI 60, and key 64 gives MIDI 84. If a piece of software shows you a MIDI note and you want the piano key, subtract 20; if you have the key and want the MIDI number, add 20. Middle C is the anchor most musicians memorise in this system — MIDI 60, key 40, C4 — and the tuning A is the other: MIDI 69, key 49, A4.

The note name also encodes the semitone arithmetic. Moving one key always moves one semitone, whatever the colour of the keys involved, so the distance between any two notes is just the difference of their key numbers. Key 40 and key 49 differ by 9, and they are 9 semitones apart; key 49 and key 64 differ by 15, and they are 15 semitones apart. Octaves are the special case of a difference of 12, and because every octave doubles the frequency, any note and the note 12 keys above it stand in an exact two-to-one frequency ratio — the structural fact the whole temperament is built around.

Wavelength: the physical size of a note

Frequency is only half of a sound's physical description. A tone also has a wavelength — the length of one complete cycle of the pressure wave as it travels through the air — and the calculator reports it for every key. Wavelength is the speed of sound divided by frequency, and the calculations here use 343 m/s for the speed of sound in air. For key 49 that gives the 0.780 m of the worked example; for key 40, the lower frequency of 261.63 Hz stretches the wave to 1.311 m; for key 64, the higher frequency of 1046.50 Hz compresses it to 0.328 m.

The pattern is exact and unavoidable: because wavelength divides by frequency, every doubling of frequency halves the wavelength. The note an octave above A4 has half of A4's 0.780 m, and the note an octave below has twice it. Across the keyboard the wavelengths therefore span from waves longer than a room at the bottom to waves shorter than a ruler at the top, all generated by the same inverse relationship. This is not an abstraction — wavelength governs how sound interacts with the physical world, from the size of the instruments that produce low notes to the way bass and treble behave differently in a room.

It also explains the piano's own shape. Producing a long wavelength at full power takes a long string, which is why the bass end of a grand piano stretches so far behind the keyboard and why small uprights compromise at the lowest keys. When you enter a key number into this calculator, the wavelength line is quietly telling you how much instrument that note wants. Key 40's 1.311 m and key 64's 0.328 m are the same fact the piano builder works with, expressed as a number instead of a cabinet.

FAQs

What frequency is key 49?

Key 49 is 440.00 Hz - A4, the tuning reference. Its semitone offset from itself is 0, its MIDI note number is 69, and its wavelength in air is 0.780 m.

And key 40?

Key 40 is 261.63 Hz - middle C, C4. It sits 9 semitones below key 49, its MIDI note number is 60, and its wavelength in air is 1.311 m.

Key 64?

Key 64 is 1046.50 Hz - C6. It sits 15 semitones above key 49, its MIDI note number is 84, and its wavelength in air is 0.328 m.

What MIDI number is middle C?

Middle C is MIDI note number 60. The rule is constant across the keyboard: the MIDI number is always the key number plus 20, so key 40 gives 60, key 49 gives 69 and key 64 gives 84.

How long is A4's wave in air?

A4's wave is 0.780 m long in air at 343 m/s. Wavelength is the speed of sound divided by frequency, so 343 / 440.00 gives the 0.780 m the calculator reports for key 49.

How many semitones separate key 40 from key 49?

Nine semitones separate them — key 40 is 9 semitones down from key 49. Applying the formula, 440.00 x 2^(-9/12) gives the 261.63 Hz of middle C, which is exactly the calculation the second worked example performs.

Sources

Related calculators

Musical Note Frequency Calculator
Frequencies of musical notes in equal temperament: pick a note to get its Hz, or enter a frequency to find the nearest note and how many cents off it is.
BPM Delay Calculator
Delay times in milliseconds for any note value at any tempo - straight, dotted and triplet - with Hz and delay-line samples for your DAW.
BPM to Delay Time Calculator
Set a tempo-synced delay from BPM: the millisecond length of whole, half, quarter, eighth and sixteenth notes, straight, dotted or triplet, with the quarter-note reference, the repetition rate in Hz and the length in samples at 44.1 kHz for DAW entry.