The piano keyboard layout is one pattern of 12 keys, seven white and five black, repeated from the bottom of the keyboard to the top. The black keys come in alternating groups of two and three, and those groups work as a map: C is always the white key just left of a group of two black keys, and F is always the white key just left of a group of three. Once you can spot those two landmarks, you can name every key on a keyboard of any size.
On the playable keyboard above, the lit keys are exactly those landmarks: every C and F from C3 to C6.
The labeled diagram on this page
The labeled diagram on this page shows three octaves of the keyboard, from C3 to C6: 37 keys, 22 white and 15 black. Every white key carries its letter name, and each C also carries its octave number (C3, C4, C5 and C6) so you can tell the octaves apart. Every black key shows two names, its sharp name above its flat name, such as C# over Db. Middle C (C4) is marked so you can find it at a glance. The same three octaves are playable on the keyboard at the top of the page, where the labels switch between note names, Do Re Mi, computer keys and none.
Groups of two and three black keys
Look at the black keys first. They are not evenly spaced: two black keys, a gap, three black keys, a gap, and then the pattern repeats. Each gap is a place where two white keys sit side by side with no black key between them: E and F after the group of two, and B and C after the group of three. Those pairs are only a half step apart, so there is no note between them.
The grouping is the main visual cue on any keyboard, and it is the same on every piano, digital piano and portable keyboard. Pianists use it to find their place without looking for labels.
Landmarks: C and F
Two landmarks locate every other key:
- C is the white key immediately left of each group of two black keys.
- F is the white key immediately left of each group of three black keys.
From C, the white keys run C, D, E up to the first gap. From F, they run F, G, A, B up to the next C. Middle C is the C just left of the two black keys nearest the middle of the keyboard; on an 88-key piano it is the fourth C from the left.
Naming every key in one octave
Here is one octave from left to right, starting on C:
| Position | Color | Name | How to find it |
|---|---|---|---|
| 1 | White | C | Just left of the two black keys |
| 2 | Black | C# / Db | First of the two black keys |
| 3 | White | D | Between the two black keys |
| 4 | Black | D# / Eb | Second of the two black keys |
| 5 | White | E | Just right of the two black keys |
| 6 | White | F | Just left of the three black keys |
| 7 | Black | F# / Gb | First of the three black keys |
| 8 | White | G | Between the first and second of the three |
| 9 | Black | G# / Ab | Middle of the three black keys |
| 10 | White | A | Between the second and third of the three |
| 11 | Black | A# / Bb | Last of the three black keys |
| 12 | White | B | Just right of the three black keys |
After B comes the next C, and the pattern starts again. The piano notes page explains the sharp and flat names and lists every key of an 88-key piano.
How the pattern repeats
Each repetition of the 12-key pattern is an octave. A key one octave higher has the same letter name and twice the frequency, so every C looks and sounds like a C, only higher or lower. The octave number changes at each C: the keys run B3, C4, C#4 and so on.
On an 88-key piano the pattern repeats seven complete times, from C1 to B7. Three extra keys sit below it (A0, A#0/Bb0 and B0) and one above it (C8), so a full piano starts on A and ends on C. To see the complete layout from A0 to C8, open the full 88-key online piano on our companion site.
Where each keyboard size starts and ends
Smaller keyboards cut the same pattern at different points. These are the usual ranges; they vary by model, and most keyboards can shift the whole range up or down by octaves.
| Keys | Lowest key | Highest key | Cs on the keyboard | Middle C |
|---|---|---|---|---|
| 88 | A0 | C8 | 8 (C1 to C8) | Key 40, the fourth C |
| 76 | Usually E1 | Usually G7 | 6 (C2 to C7) | Key 33, the third C |
| 61 | Usually C2 | Usually C7 | 6 (C2 to C7) | Key 25, the third C |
| 49 | Usually C2 | Usually C6 | 5 (C2 to C6) | Key 25, the third C and the center key |
| 37 | Commonly C3 or F2 | Commonly C6 or F5 | 4 or 3 | Key 13 or key 20, the second C |
| 25 | Commonly C3 | Commonly C5 | 3 (C3 to C5) | Key 13, the second C and the center key |
Keyboards that start and end on C are the easiest to read, because every octave on them is complete. The keyboard and the diagram on this page both cover C3 to C6, the same span as a common 37-key keyboard. For help choosing a size, see the buying guide.
Left-hand and right-hand regions
Middle C roughly divides the keyboard into two working areas. The left hand usually plays the lower notes, which are written in the bass clef, and the right hand plays the higher notes, written in the treble clef. In printed music, middle C sits on a short extra line between the two staves; the bass clef marks the F below middle C (F3), and the treble clef marks the G above it (G4).
A common first hand position, C position, puts the right thumb on middle C with the fingers on C4, D4, E4, F4 and G4, and the left little finger on C3 with the fingers on C3 to G3. As music gets harder, the hands cross, move and share the middle of the keyboard, so these regions are a starting point rather than a rule.
Questions and answers
How do I find middle C on a piano?
Find the group of two black keys nearest the middle of the keyboard; middle C is the white key just to its left. On an 88-key piano it is the fourth C from the left, key 40.
What is the pattern of black and white piano keys?
Each octave has 12 keys, seven white and five black, with the black keys in a group of two followed by a group of three. That pattern repeats across the whole keyboard.
Which white key is C?
C is the white key immediately to the left of every group of two black keys. An 88-key piano has eight of them, from C1 to C8.
Which keys does each hand play?
The left hand usually plays the lower notes and the right hand the higher notes, with middle C near the dividing line. In C position, a common first hand position, the left hand covers C3 to G3 and the right hand covers C4 to G4.
What note does an 88-key piano start and end on?
It starts on A0 at the far left and ends on C8 at the far right. The three lowest keys, A0, A#0/Bb0 and B0, come before the first complete octave, which begins at C1.
Can I print a labeled piano keyboard?
There is no separate PDF, but this page prints cleanly from your browser, labeled diagram included. Use your browser's print command while viewing this page.