Piano keyboard explained

A standard piano keyboard has 88 keys, 52 white and 36 black, running from A0 to C8. Here is how those keys are organized, named, sized and built.

Press a key to hear it. The piano sound loads in a moment.

A piano keyboard is the row of black and white keys you press to play a piano, digital piano or electronic keyboard. A standard piano keyboard has 88 keys, 52 white and 36 black, running from the lowest note, A0, at the far left to the highest, C8, at the far right. Each key plays one note, and moving one key to the right, white or black, raises the pitch by a half step (a semitone).

The keyboard at the top of this page is a playable three-octave section of that keyboard: 37 keys from C3 to C6. The lit keys are the seven white keys from middle C (C4) up to B4. Click or tap a key, or use your computer keyboard, and switch the labels between note names, Do Re Mi, computer keys or none. The sound is the Salamander Grand Piano recording, used under the CC BY 3.0 license (see licenses).

Why a piano has 88 keys

The piano's range grew over time. Pianos in Mozart's day spanned about five octaves, and makers kept adding notes through the late 1700s and the 1800s. Some older pianos have only 85 keys, from A0 to A7. The modern standard adds three keys at the top and ends on C8, for 88 keys and a range of seven octaves plus a minor third.

There is little musical reason to go further. The lowest A vibrates 27.5 times per second, close to the bottom of human hearing, and notes much higher than C8 are hard to hear as clear pitches. A few concert grands extend the bass anyway: the Imperial Bösendorfer has nine extra keys below A0, 97 in all.

The repeating 12-key pattern

The whole keyboard is one pattern of 12 keys, seven white and five black, repeated from left to right. The black keys sit in alternating groups of two and three, and that grouping is what lets you find your place without labels. The white key just left of each group of two black keys is always C, and the white key just left of each group of three is always F.

An 88-key piano holds seven complete C-to-B patterns, from C1 to B7, plus four extra keys: A0, A#0/Bb0 and B0 at the bottom and a single C8 at the top. The keyboard layout guide walks through the pattern key by key.

White keys and black keys

The white keys play the seven natural notes, named with the letters A, B, C, D, E, F and G. The black keys play the notes in between and are named as sharps (#) or flats (b) of their white neighbors, so the black key between C and D is both C# and Db. Two pairs of white keys, E and F, and B and C, have no black key between them because those notes are already a half step apart.

The colors are a convention rather than a rule of sound. Many keyboard instruments built before the 1800s, such as harpsichords and organs, reversed them, with dark natural keys and light sharps.

Octaves and note names

From one C to the next C is an octave: 12 half steps, and a doubling of the frequency. Octaves are numbered in scientific pitch notation, and the number goes up at every C, so B3 is followed by C4. Middle C, the C closest to the middle of a full-size piano, is C4. It is key 40 of 88 and sounds at about 261.63 Hz. The A above it, A4, is key 49 and is tuned to 440 Hz, the standard reference pitch.

Modern pianos are tuned in equal temperament, which divides every octave into 12 equal half steps: each key is about 1.0595 times the frequency of the key below it (the twelfth root of two). The piano notes page names every key and lists all 88 frequencies in one chart.

Acoustic piano, digital piano or keyboard

The same layout appears on several kinds of instruments:

  • Acoustic piano. Each key throws a felt-covered hammer against steel strings. Grand pianos have horizontal strings and upright pianos vertical ones. An acoustic piano needs periodic tuning by a technician.
  • Digital piano. Usually 88 weighted keys that imitate an acoustic piano's touch, a sampled or modeled piano sound, built-in speakers and a headphone jack. It never needs tuning.
  • Portable keyboard. Commonly 61 or 76 lighter, unweighted keys, many instrument sounds and built-in rhythms, in a case light enough to carry.
  • MIDI controller. Keys with no sound of their own. It plays software on a computer, tablet or phone.

Keyboard sizes

Keyboards are sold by their number of keys. Ranges vary by model, and most keyboards with fewer than 88 keys can shift up or down by octaves, so the ranges below are the usual starting positions.

Keys Usual range Octaves Who it suits
88 A0–C8 Piano students and anyone who wants the full piano range
76 Usually E1–G7 Players who want most of the range in a lighter, smaller instrument
61 Usually C2–C7 5 Beginners and casual players, songs and chords
49 Usually C2–C6 4 Music production and small spaces, often as a MIDI controller
37 Commonly C3–C6 or F2–F5 3 Compact controllers and travel; the keyboard on this page has 37 keys
25 Commonly C3–C5 2 Mini controllers for sketching melodies, too small for learning piano

Key action and touch sensitivity

Action is how the keys feel and move. There are three broad types:

  • Weighted hammer action. Hammers or weights make each key resist your finger like an acoustic piano key. On digital pianos this is usually graded hammer action: heavier in the bass and lighter in the treble, as on an acoustic piano.
  • Semi-weighted action. Spring-loaded keys with some added weight, firmer than synth action and lighter than a piano. It is common on MIDI controllers.
  • Synth action. Light, spring-loaded keys that return quickly. Most portable keyboards and synthesizers use it, and some makers call it organ-style.

Touch sensitivity, also called velocity sensitivity or touch response, is separate from weight. A touch-sensitive keyboard plays louder when you strike a key faster, which is how you play softly and loudly. Many light keyboards are touch-sensitive and some are not, so check the specifications.

Where to go next

For a complete piano in your browser, open the full 88-key online piano on our companion site, which also has a chord finder, scales and easy songs.

Questions and answers

How many keys does a piano keyboard have?

A standard piano has 88 keys: 52 white and 36 black, from A0 to C8. Most digital pianos also have 88, portable keyboards commonly have 61 or 76, and small MIDI controllers have 25 to 49.

Why do pianos have 88 keys?

The range grew over time, from about five octaves in Mozart's day to seven octaves plus a minor third on the modern piano. Notes much lower than A0 or much higher than C8 are hard to hear as clear pitches, so there is little musical reason to add more.

What is the difference between a piano and a keyboard?

An acoustic piano makes its sound with hammers striking strings, and a digital piano imitates it with 88 weighted keys and a sampled or modeled piano sound. A keyboard usually means a lighter portable instrument with fewer, unweighted keys and many built-in sounds.

How many octaves does a piano have?

An 88-key piano spans seven octaves plus a minor third. It holds seven complete octaves from C1 to C8, plus three keys below them: A0, A#0 and B0.

Is a 61-key keyboard enough for a beginner?

It is enough to start, because early lessons stay near middle C and 61 keys usually cover five octaves, C2 to C7. If you plan to take piano lessons or play classical music, 88 weighted keys will serve you longer.

What does touch-sensitive mean on a keyboard?

A touch-sensitive keyboard measures how fast you press each key and plays louder when you press faster, as a piano does. It is separate from weighted keys, and many light keyboards are touch-sensitive.