Piano Keys: Theory, History, and Secrets Unlocked

Learn the history of how our modern piano keys came to be, and what they represent, from sound frequencies and mathematical relationships to music theory.
Graphic by Jay Alan Zimmerman.

Piano keys are an iconic image for music throughout the world, but they represent much more than sound. While their distinct arrangement of white and black have been featured in paintings, sung about by pop singers, and reproduced on everything from napkins to neckties—these keys are not only visual reminders of a piano. They hold a history spanning thousands of years. They connect to the scientific study of vibrations, to mathematical equations, and put the entire musical spectrum of human hearing under your fingers. If you love music, then it’s time to let the piano keys unlock their hidden mysteries.

The White Keys

Zliten_mosaic_hydraulis_pipe_organ Representation of the hydraulis (second from left) and other instruments in the Zliten mosaic from ancient Rome.

When we see piano keys we tend to think of a piano, but pianos are a relatively young invention. The piano keyboard descended from the harpsichord, which descended from a combination of a stringed harp and the keys of a pipe organ. So to find the origin of piano keys we must trace the evolution of a pipe organ all the way back to the third century B.C.E. In ancient Greece, the first musical keyboard device was called a hydraulis—meaning “water organ.” This instrument used the power of water to blow air through the pipes of a pan flute.

The seven white piano keys named A, B, C, D, E, F, G reflect the seven basic notes of the hydraulis. These notes were all the ancient Greeks needed because their tones create natural diatonic scales: a major scale when starting on C and a minor scale when starting on A—still the two most commonly used scales in western music. The sound of the hydraulis made it a very popular instrument throughout the first five centuries A.D. But as other cultures and new ideas expanded the complexity of music beyond simple folk music and Gregorian chants, musicians needed more than a diatonic scale. It was time to get chromatic.

The Black Keys

In the 14th century, five new keys were added to the original seven, creating what is called a chromatic scale. On the modern piano, these are called “sharps” and “flats” and colored black. But on some early organs and harpsichords, the colors were reversed. The oldest documented keyboard that used the seven-plus-five keyboard is the German Halberstadt organ of 1361.

Since the original seven white keys created natural major and minor scales consisting of two half-steps and five whole steps, the new black keys were slipped in between the whole steps to make 12 equal half-steps. Over time, the tuning of these keys were mathematically refined into what is called an “equal-tempered scale”—allowing musicians to play accurate major and minor scales starting on any of the 12 notes.

The Piano Keys in Octaves

By the time these black and white keys had migrated from the pipe organ to the harpsichord and finally to the 18th century invention called a piano, the keyboard had grown not only from seven scale tones to 12, but also multiplied into octaves and sections.

Fortepiano_circa_1805_replica Replica of an 1805 fortepiano made by Paul McNulty.

An “octave”—just like an octagon and an octopus—relates to the number eight. In the original seven white key scales, an octave was the eighth note: twice as high as the starting note—or twice as low when playing downward. Mathematically and scientifically, the higher note in every octave is exactly double the frequency in pitch, or “hertz.” Hertz measures sound vibrations in cycles per second. So the orchestra tuning note of A 440 hertz creates a vibration that cycles 440 times in a second. And since each octave is double the octave below, the next higher A is double the hertz (880) and the next lower A is half (220). On the frequency-pitch conversion chart above, you can see how the hertz of every note on the piano has a mathematical relationship to every other note.

The number of octaves found in the earliest keyboard instruments were often limited to three or four, but this quickly grew to a bit more than five octaves throughout the Renaissance, Baroque, and Classical periods of music. This is why playing music from those eras never requires piano keys at the upper or lower extremes of the modern piano. Sometimes you’ll find passages in Mozart piano pieces that seem to want to go higher, but Mozart couldn’t because his keyboard ran out of notes!

The Piano Keys in Sections

As the Classical era shifted into the Romantic era—from Mozart to Beethoven—the number of piano keys kept growing, until it reached our familiar 88. This modern arrangement of 52 white keys and 36 black keys provides nearly eight octaves. Today each key is not only named A through G for its tone in the scale, but also one through eight for its octave. These range from the lowest C (C1) to the highest note (C8), with the three extra low notes numbered octave “zero.”

Near the middle of the piano is “middle C”—also called C4 because it is in the fourth octave. This note serves as the dividing point between the lower bass section (musically notated on a bass clef) and the upper treble section (notated on a treble clef). With C4 “middle C” as a guide, it’s easy to visualize the four octaves used in most vocal music, from a soprano’s high C (C6) down to a bass’s low C (C2).

But even 88 keys are not enough for some. You can have a full eight octaves on some Bösendorfer pianos, which expand down to C0 (zero). There are even a few pianos that expand up to F8, providing 102 piano keys.

Using the Piano Keys

Looking over this familiar field of black and white, you can see the natural visual rhythm of the seven-plus-five design. This arrangement lets you quickly spot sections and octaves, easily allowing combinations of mathematically related frequencies to create harmony or clustering half-steps together to create the sounds of dissonance. By focusing on the white keys, you can go back in time and replicate the music of the ancient Greeks. Or by using the black keys, you can explore the pentatonic (five-note) scales of Eastern cultures. It’s this unique blend of cultures, history, math, science, and visual rhythm that makes piano keys so alluring, iconic, and of course—the keys to creating exciting music.

Piano Keys by the Numbers
88 keys on most pianos
52 white keys
36 black keys
8 octaves for A, B, C, and B-flat (or A-sharp)
7 octaves for D, E, F, G, and D-flat, E-flat, G-flat, and A-flat
7 white keys named A, B, C, D, E, F, G
5 black keys with two names each: A-flat/G-sharp, B-flat/A-sharp, D-flat/C-sharp, E-flat/D-sharp, G-flat/F-sharp
2 main sections split the keyboard into bass and treble
1 note in the middle called “middle C”
0 is the octave number given the three lowest notes


  1. Avatar

    Happy new year!
    Moving my Yamaha baby grand to the Atlantic beach and need a dehumidifier while it’s in salt air.
    St Augustine beach
    Is there a special blanket plugged in ,to keep humidity away?or I ve been places carefully hanging damp rid

  2. Avatar

    I saw yesterday on a tv. programme what was described as Mozart’s piano which, I was, informed had 58 keys. I regularly see Mozart piano concertos playing on modern 88 Key grand. pianos, and note that the whole keyboard is used in the playing. How or when were the original scores by Mozart changed to accommodate the modern expanded instrument with 30 extra keys?

    • Nancy M. Williams, Founding Editor

      It’s a great question, and thanks for writing! It is true that Mozart’s piano (the fortepiano) had many fewer keys than the modern piano – it typically had approximately 5 octaves vs. the modern piano’s 7.5. However, while Mozart’s concerti display pianistic theatrics and seem to cover the expanse of the modern keyboard, the range is such that these pieces do fit the smaller keyboard.

  3. Avatar

    Thank you for your reply. I think have answered my own question. I have been watching performances of Mozart’s piano concertos on Tube and watching the video over the pianists right shoulder and looking at what keys are being played. I have watched most of the 27 concertos and as far as I have been. able to see, none of the keys in the top(7) octave of the modern grandpiano have been played. The camera does not catch the fingering of the left hand but by ear I don’t think the bottom octave is played either. So I guess the performers (it’s easier to see on the piano the keys which are being played as opposed to any other instrument) playing Mozart are sticking to those notes that were available to Mozart on his smaller keyboard, So the original score is not violated. Thank you for taking the trouble of responding to my question

  4. Avatar

    Why are there lips on the white keys? I find that catching my fingers under one of the lips is a frequent cause of mistakes.

  5. Avatar

    Thanks. The reason this catching happens for me is that I have a relatively short reach. When playing an octave plus notes on the second finger, I cannot reach without angling my hand so that my thumb is at the extreme edge of the key. Otherwise, my thumb will catch the edge of the note above the one I’m playing and cause it to sound a little. Once the keys are depressed, that puts my thumb below the lip of the next key, and if I’m moving quickly, it will sometimes catch and throw off my timing. I’ve been playing for 55 years, and it’s only this week that it occurred to me, if the keys were “waterfall” style instead of lipped, my fingers wouldn’t catch. That got me wondering why the lips are there. I had found these and other theories, but none of them seems definitive, and I thought you might know of a playing technique reason. (The idea that it helps to have more surface area on the keys may be true, but it’s not a reason to have lips on them: you could just make the keys that much longer.)

    • Nancy M. Williams, Founding Editor

      Kevin, thanks for explaining this. I understand what you are saying about compensating for reach. The best advice I can offer is to work on consciously releasing that thumb that is at the extreme edge of the key before reaching for the next note.

      Also, Jay Alan Zimmerman, the author of this piece, responded to your original comment below. I hope all of this helps!

      “My personal (unresearched) theory has always been that the purpose of the lips was one of mechanical and construction needs. The lips might prevent the keys from going lower than the front piece of wood on a piano so that they stop you from applying so much force that the hammer mechanism damages the strings. Secondly, in the case of original ivory keys (not plastic), the ivory is just a thin covering on the wood of the keys and so the top part that creates the lip extends out over the ivory veneer directly underneath (the part. facing the pianist). As most carpenters know, it is extremely difficult to join two veneers exactly and so letting the top extend out a bit makes it both a more beautiful joint and also easier to construct. But these are just personal theories, for a definite answer, ask a piano maker! :)

      In terms of catching fingers on the lips, in over 40 years of piano playing I’ve never once caught my fingers on any of the lips and that includes playing on extremely old uprights with broken keys poking out oddly lol. So if you are catching your fingers on the lips you are probably holding your hands too low. Your hands need to always be above the keys to play effectively and to minimize pressure on your wrist. Make sure your seat is high enough so that your resting elbows are just above the height of the keys and then extend your forearm out parallel to the floor. This should place your hands comfortably above the keys. And then move your seat so that you are close enough that your hands will never move past the lip of the keys unless you pull your elbows backwards (which you should not ever need to do either). This should make it nearly impossible to catch your fingers on the lips.”

  6. Avatar

    Thanks, Nancy and Jay, for your responses. I will try the technique adjustments you suggest, perhaps I can get away from the edges of the keys and avoid those problems. I have recently started trying to play ragtime pieces again after having abandoned them decades ago, which is what led to my question. Over the years I’ve made substantial improvement in playing in time and playing without looking at my hands, both of which are essential to ragtime, so it’s going a bit better this time. It’s possible I don’t need to cheat out to the edge of the keyboard as much as I think I do to reach some of these octave chords, so I’ll work on keeping my hands farther in and above the keys.


Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe to Grand Piano Passion™

Thank you – you have successfully subscribed!