Key signatures: what those sharps at the start mean
Those sharps at the start of a piece exist for one reason: to save you writing the same accidental forty times.
A signature is an instruction that applies all the way through
If a piece uses F sharp every time an F appears, writing a sharp next to each one is tedious and hard to read. So the sharps get collected and put once at the start, immediately after the clef.
From that point on, every F in the piece is sharp unless something says otherwise. That is the whole mechanism.
This is the same five-line staff from reading sheet music — the symbols simply sit before the notes rather than among them.
click a key above, or any piano key
The order is always the same
Sharps appear in this order, every time: F, C, G, D, A, E, B. A key with three sharps has F sharp, C sharp and G sharp — always those three, never a different combination.
Flats run the same list backwards: B, E, A, D, G, C, F.
That sequence is the circle of fifths, laid out as a wheel you can click. Each sharp is a fifth above the last, which is why the two things get taught together.
Naming the key from the signature
Two shortcuts, and they are worth memorising because they take seconds.
For sharps: take the last sharp and go up one semitone. Three sharps ends on G sharp, so the key is A major.
For flats: the second-to-last flat is the key name. Four flats are B, E, A, D — the second-to-last is A flat, so the key is A flat major.
The exception is one flat, which you memorise separately: it is F major.
Why a piece needs a key at all
A key is a set of seven notes that sound settled together, with one of them acting as home. The signature is just the bookkeeping that makes that set easy to write down.
Play the scale above for any key and listen to where it wants to stop. That note is the home, and the signature exists to keep the other six consistent around it.
Major or minor?
A signature does not tell you on its own. Every one covers two keys — a major and its relative minor, three semitones below. No sharps or flats means C major or A minor.
You work out which by listening for where the music comes to rest, or by looking at the first and last chords, which usually give it away.
At the start of a piece, just after the clef, you will often see a cluster of sharps or flats. That is the key signature, and it exists for one reason: to save ink.
This is step four of the music theory path. It assumes you can already read notes on a staff.
What it is actually doing
If a piece is in the key of D, almost every F in it will be an F sharp and almost every C will be a C sharp. Writing a sharp symbol next to every single one would be exhausting to write and exhausting to read.
So instead you declare it once. Two sharps at the start, positioned on the F line and the C space, and from then on every F and every C in the piece is sharp unless something says otherwise.
The order is always the same
Sharps always appear in this order: F, C, G, D, A, E, B. Flats appear in exactly the reverse: B, E, A, D, G, C, F.
This is not arbitrary and it never varies. A piece with three sharps has F sharp, C sharp and G sharp — always those three, never a different combination. Once you know the order, counting the symbols tells you exactly which notes are affected.
Working out the key from the signature
For sharps, look at the last sharp in the signature and go up one semitone. Three sharps ends on G sharp, so the key is A major.
For flats, look at the second-to-last flat. That is the key. Three flats gives you E flat major. The one exception is a single flat, which is F major — worth simply memorising.
Major or minor?
Every key signature serves two keys, one major and one minor. Two sharps is either D major or B minor. The signature alone cannot tell you which.
The music tells you. Look at which chord the piece starts and ends on, and listen to whether it sounds bright or dark. That is usually enough.