Different kinds of accidentals
An accidental is a sign to raise or to lower the pitch of a music note.
Below are the most common accidentals:

When added to a note, a flat (♭) lowers the note by a half step.

When added to a note, a natural (♮) cancels the previous accidentals.

When added to a note, a double sharp raises the note by two half steps.

When added to a note, a double flat lowers the note by two half steps.
Recapitulation:
![]() | + 1 half step |
![]() | - 1 half step |
![]() | cancel |
![]() | + 2 half steps |
![]() | - 2 half steps |
Accidentals on a piano keyboard
To visualize accidentals, here are accidentals on a piano keyboard:
Sharps on a piano keyboard:
Flats on a piano keyboard:
With this piano keyboard you can notice that:
- C♯ (C sharp) has the same key as D♭ (D flat)
- D♯ (D sharp) has the same key as E♭ (E flat)
- F♯ (F sharp) has the same key as G♭ (G flat)
- G♯ (G sharp) has the same key as A♭ (A flat)
- A♯ (A sharp) has the same key as B♭ (B flat)
As there is only 1 half step between E and F:
- E♯ (E sharp) has the same key as F
- F♭ (F flat) has the same key as E
As there is only 1 half step between B and C:
- B♯ (B sharp) has the same key as C
- C♭ (C flat) has the same key as B
And notice some examples with double sharps and double flats:
- C♯♯ (C double sharp) has the same key as D
- A♭♭ (A double flat) has the same key as G
- E♯♯ (E double sharp) has the same key as F♯ (F sharp)) or G♭ (G flat)
Accidentals in music score
Accidentals are always written before the note
Accidentals are always written before the note, here is an example:

Accidentals only affect on the current measure (bar)
After an accidental has been written, every same note is also affected for all the current measure
Example #1:

Example #2:

Accidentals and ties
As ties connect notes, two notes tied have the same pitch, even crossing a bar line:

Courtesy accidentals
A courtesy accidental, also called a cautionary accidental or reminder accidental, are accidentals that are not necessary, but that are used to remind the musician of the correct pitch.
Example #1 of a courtesy accidental:

Example #2 of a courtesy accidental:

Accidentals affect key signature
Accidentals affect the key signature.
In this example (below), this key signature means that all E notes are E flat (E♭) and that all B notes are B flat (B♭). But the accidentals on measures (bars) affect the key signature:

Accidentals and octaves
With the key signature, all notified notes are affected, regardless of the octave:

With accidentals that are not in the key signature, only the notes on his position on the staff

Accidentals do not accumulate
Accidentals do not accumulate, example:

Here, the note is a C sharp (C♯) and it is not a C double sharp...
Accidentals order on the key signature
The accidentals on the key signature are always written in the order of flats and in the order of sharps:
Order of flats
The order of flats is: B♭ E♭ A♭ D♭ G♭ C♭ F♭
Read more about order of flats.
The order of sharps
The order of sharps is: F♯ C♯ G♯ D♯ A♯ E♯ B♯
Read more about the order of sharps.
Accidentals in contemporary music
In contemporary music you can find this kind of key signature that don't respect the usual order of accidentals:
Obsolete accidentals
Some accidentals have become obsolete and are no longer used, but you may find them in old music scores:
- The double natural (♮♮): cancels the effect of the double sharp or the double flat, nowadays a single natural is sufficient.
- The natural & sharp (♮ ♯): cancel one sharp of previous double sharp, nowadays, a single sharp only is enough.
- The natural & flat (♮ ♭): cancel one flat of previous double flat, nowadays a flat only is enough.
Example of a double accidental "natural & sharp" (measures 2 and 5) in Fugue n°18 BWV 863 in G sharp minor (book 1 of the Well-Tempered Clavier) by J.S. BACH:

Royalty-free sound sample recorded in 2015 by pianist Kimiko Ishizaka (Attribution 4.0 International license, source).
Accidentals in the chromatic scale
Traditionally we use the sharps in the ascending chromatic scale and the flats in the descending chromatic scale:


Test your knowledge
What does the sharp (♯) do?
A sharp (♯) raises the note by a half step (semitone)
- raises the note by a whole step
- lowers the note by a whole step
- raises the note by a half step
- lowers the note by a half step
- It's just to look pretty
What does the flat (♭) do?
A flat (♭) lowers the note by a half step (semitone)
- raises the note by a whole step
- lowers the note by a whole step
- raises the note by a half step
- lowers the note by a half step
- It's just to look pretty
What does the natural sign (♮) do?
A natural sign (♮) cancels the previous accidentals
- it cooks
- it's useless
- raises the note by a half step
- lowers the note by a half step
- cancels the previous accidentals
What does the double flat (♭♭) do?
A double flat (♭♭) lowers the note by a whole step (tone)
- raises the note by a whole step
- lowers the note by a whole step
- raises the note by a half step
- lowers the note by a half step
- nothing
What does the double sharp (♯♯) do?
A double sharp (♯♯) raises the note by a whole step (tone)
- raises the note by a whole step
- lowers the note by a whole step
- raises the note by a half step
- lowers the note by a half step
- nothing
What is the order of sharps (♯)?
The order of sharps is: F♯ C♯ G♯ D♯ A♯ E♯ B♯
- A♯ B♯ C♯ D♯ E♯ F♯ G♯
- F♯ C♯ G♯ D♯ A♯ E♯ B♯
- B♯ E♯ A♯ D♯ G♯ C♯ F♯
What is the order of flats (♭)?
The order of flats is: B♭ E♭ A♭ D♭ G♭ C♭ F♭
- A♭ B♭ C♭ D♭ E♭ F♭ G♭
- F♭ C♭ G♭ D♭ A♭ E♭ B♭
- B♭ E♭ A♭ D♭ G♭ C♭ F♭
Others articles from this category:

Sharp
The sharp symbol in music theory: Learn all about this accidental that affect music notes whit great examples.

Flat
The flat symbol in music theory: Learn all about this accidental that affect music notes whit great examples.

Natural sign
The natural sign in music theory: Learn all about this accidental that affect music notes whit great examples.

Double sharp
The double sharp symbol in music theory: Learn all about this accidental that affect music notes whit great examples.

Double flat
The double flat symbol in music theory: Learn all about this accidental that affect music notes whit great examples.

Order of flats
Learn the order of flats and find a trick to memorize the order of flats. With the order of flats you will be able to know all Altered notes and to find the key

Order of sharps
Learn the order of sharps and find a trick to memorize the order of flats. With the order of sharps you will be able to know all Altered notes and to find the key.

Quarter tones
Quarter tones: learn all about half flat, half sharp, three-quarter-tone flat and Sharp-and-a-half. Learn why to use quarter tone in music.
External links to learn more about :
1 - https://www.dolmetsch.com/musictheory9.htm
2 - https://en.wikipedia.org/wiki/Accidental_(music)
3 - https://musicterms.artopium.com/a/Accidentals.htm