Knowing the order of sharps and flats for
major and minor keys is very useful, as it
allows us to quickly know which notes are sharp or flat in a key.
The order of sharps is: F C G D A E B
A popular mnemonic for the order of sharps is Fat Cats Go Down Alleys Eating Birds.
The order of flats is the same, but reversed: B E A D G C F
A popular mnemonic for the order of flats is Before Eating A Donut, Get Coffee First.
Remembering the Order of Sharps and Flats Using the Circle of Fifths
The circle of fifths is a very handy tool for music theory. The circle is well known for helping us know how many flats or sharps are in a key, but something that's lesser known is that the circle of fifths can also helps us with the order of sharps and flats.
We can see that we can get the order or sharps using the circle starting from the key of F and going clockwise from there. Alternatively, we can get the order of flats using the circle starting from the key of B and going counter-clockwise from there.
For example, let's take, the key of A♭ major. We know from the circle of fifths that the key of A♭ major has a key signature of 4 flats. And now, knowing the order of flats allows us to know that the 4 flats will be B♭ E♭ A♭ D♭. So the key of A♭ major is: A♭ B♭ C D♭ E♭ F G