Sharps, flats and semitones on piano
A sharp raises a written note by one semitone (the very next piano key to the right, whether black or white). A flat lowers it by one semitone (the very next key to the left). A natural cancels a sharp or flat. Count every key, not just the white keys.
Prepared by SheetSnap. Editorially updated ; not reviewed by a music teacher. English guide; practice suggestions are not a substitute for individual teaching.

Most familiar examples use a black key
C sharp is the black key immediately right of C. D flat is that same physical key, named differently by the score. D sharp is the black key between D and E. In the opening of our Fur Elise theme, D sharp and E alternate: black key, neighbouring white key.
Sharps and flats are not always black keys
There is no black key between E and F, or between B and C. E sharp is therefore the white F key; B sharp is the white C key. F flat is the white E key; C flat is the white B key. The written letter and accidental together identify the pitch. These less common spellings matter even though they use a familiar physical key.
Check the key signature and measure
A key signature sets the usual sharps or flats throughout the score. An accidental written beside a note normally applies to that pitch in the same octave for the rest of the measure; a barline resets that local change. A tied note keeps its pitch across the barline. Read the score rather than assuming every repeated letter uses a white key.
Try it with a real score
Explore the symbol definitionsThe free starter path needs no purchase. Your own imports require eligible Pro access; the founding beta is subject to its displayed capacity and timeframe.
Related questions
Keep exploring
Choose your first songs or read the import guide.