A key signature is one of the first things you see when you open a piece of sheet music, and one of the most useful pieces of information on the page. It tells you, at a glance, which notes are sharp or flat for the entire piece, which scale the music is built on, and which note will most likely feel like "home." Once you can read key signatures fluently, sight-reading and writing music both get noticeably faster.

This guide covers what a key signature is, the complete chart of every major and minor key signature, the order of sharps and flats, how to identify a key from its signature, and how relative major and minor keys share the same signature. There's also a short exercise you can run in your music notation software to feel how key signatures work in practice.
What is a key signature?
A key signature is a set of sharps or flats placed at the start of every staff line in a piece of music, immediately after the clef. It tells the performer which notes are altered (raised or lowered by a half step) for the entire piece, unless an accidental temporarily changes one.
Here is a simple melody with no sharps or flats in its key signature:
All of the notes belong to the C major scale, and the melody begins and ends on C. We say this piece is in the key of C major. Because C major has no sharps or flats, the key signature is empty.
The same melody, transposed up a whole tone, lives in D major:
D major requires F♯ and C♯. Rather than writing a sharp in front of every F and C in the piece (which would be a mess to read), we declare it once at the start with a key signature:

And in E major, which requires four sharps (F♯, C♯, G♯, D♯):

The purpose is simple: cleaner notation. A piece in E major would be unreadable if every F, C, G, and D had to be marked individually.
The complete key signature chart
Every key signature uses a specific number of sharps or flats. There are 15 distinct key signatures in standard notation: one with no sharps or flats, seven with sharps, and seven with flats. Each signature corresponds to one major key and one minor key (its relative minor), so the chart below maps all 30 standard keys.
| Accidentals | Major key | Minor key | Sharps or flats |
|---|---|---|---|
| 0 | C major | A minor | (none) |
| 1 ♯ | G major | E minor | F♯ |
| 2 ♯ | D major | B minor | F♯ C♯ |
| 3 ♯ | A major | F♯ minor | F♯ C♯ G♯ |
| 4 ♯ | E major | C♯ minor | F♯ C♯ G♯ D♯ |
| 5 ♯ | B major | G♯ minor | F♯ C♯ G♯ D♯ A♯ |
| 6 ♯ | F♯ major | D♯ minor | F♯ C♯ G♯ D♯ A♯ E♯ |
| 7 ♯ | C♯ major | A♯ minor | F♯ C♯ G♯ D♯ A♯ E♯ B♯ |
| 1 ♭ | F major | D minor | B♭ |
| 2 ♭ | B♭ major | G minor | B♭ E♭ |
| 3 ♭ | E♭ major | C minor | B♭ E♭ A♭ |
| 4 ♭ | A♭ major | F minor | B♭ E♭ A♭ D♭ |
| 5 ♭ | D♭ major | B♭ minor | B♭ E♭ A♭ D♭ G♭ |
| 6 ♭ | G♭ major | E♭ minor | B♭ E♭ A♭ D♭ G♭ C♭ |
| 7 ♭ | C♭ major | A♭ minor | B♭ E♭ A♭ D♭ G♭ C♭ F♭ |
A few useful patterns drop out of this chart. Each step down through the sharp keys adds one new sharp. Each step down through the flat keys adds one new flat. And every key signature is shared by exactly one major key and one minor key, which is the source of a lot of useful musical thinking later on.
The order of sharps and flats
Sharps and flats never appear in random order on the staff. They always follow a fixed sequence, which means once you have it memorized you can write any key signature without thinking.
Order of sharps: F♯, C♯, G♯, D♯, A♯, E♯, B♯
A common mnemonic for this order is: Father Charles Goes Down And Ends Battle. Read that sentence and the first letter of each word gives you F, C, G, D, A, E, B.
Order of flats: B♭, E♭, A♭, D♭, G♭, C♭, F♭
The order of flats is exactly the order of sharps in reverse. The mnemonic flips too: Battle Ends And Down Goes Charles' Father.
Because the order is fixed, a key signature with three sharps will always be F♯, C♯, G♯, in that order on the staff. A signature with four flats will always be B♭, E♭, A♭, D♭. You never see them rearranged.
How to identify the key from a key signature
If you know how many sharps or flats are in the signature, there are simple rules for finding the key. The same rules cover every major key in the chart above.
Major keys with sharps
Take the last sharp on the right, and go up one half step. That note is the major key.
Example: a signature has F♯, C♯, G♯ (three sharps). The last one is G♯. Up a half step is A. The key is A major.
Example: a signature has F♯, C♯, G♯, D♯, A♯ (five sharps). The last one is A♯. Up a half step is B. The key is B major.
Major keys with flats
Take the second-to-last flat. That note is the major key.
Example: a signature has B♭, E♭, A♭ (three flats). The second-to-last is E♭. The key is E♭ major.
Example: a signature has B♭, E♭, A♭, D♭ (four flats). The second-to-last is A♭. The key is A♭ major.
The one exception is a signature with just one flat (B♭). The rule needs two flats to work, so F major (one flat) is worth memorizing as its own case.
Minor keys
Every key signature is shared by a major key and its relative minor. To find the minor key from any signature, find the major key first using the rules above, then count down three half steps (a minor third).
Example: a signature has two sharps. That's D major. Down a minor third from D is B. The relative minor key is B minor.
Example: a signature has four flats. That's A♭ major. Down a minor third from A♭ is F. The relative minor is F minor.
You can also just memorize the pairings from the chart above. With a little practice, both routes become automatic.
Relative major and minor keys
Two keys are called "relative" when they share the exact same key signature. C major and A minor, for example, both have zero sharps and zero flats. They use the same seven notes, but they have different home notes, which gives them different emotional weight (we cover that in detail in our piece on music keys and their emotions).
To find the relative minor of any major key, go down a minor third (three half steps). To find the relative major of any minor key, go up a minor third.
Here is the quick pairing reference:
| Major | Relative minor | Major | Relative minor |
|---|---|---|---|
| C | A m | F | D m |
| G | E m | B♭ | G m |
| D | B m | E♭ | C m |
| A | F♯ m | A♭ | F m |
| E | C♯ m | D♭ | B♭ m |
| B | G♯ m | G♭ | E♭ m |
| F♯ | D♯ m | C♭ | A♭ m |
| C♯ | A♯ m |
Try this in Flat: build a key signature from scratch
Reading about key signatures is one thing. Writing one, hearing it played, and changing it on the fly is what actually makes the system click.
Run this in Flat:
- Open a new score in C major. Write a short eight-note melody using only natural notes (white keys on a piano).
- Change the key signature to D major (two sharps). Watch every F become F♯ and every C become C♯ automatically. Listen to the difference.
- Change again to E♭ major (three flats). Same melody, completely different color.
Three signatures, one melody, three different keys. The exercise takes about five minutes and makes the relationship between key signature and sound concrete in a way no chart can.
Frequently asked questions about key signatures
What is a key signature in simple terms?
A key signature is a group of sharps or flats written at the start of each staff line, telling you which notes to play raised or lowered for the whole piece. It tells you what key the music is in and saves the composer from writing sharps and flats on every individual note.
How many key signatures are there?
There are 15 distinct key signatures in standard Western notation: one with no sharps or flats, seven with sharps (one to seven), and seven with flats (one to seven). Each one corresponds to one major key and one minor key, for a total of 30 standard keys.
What key has 1 flat? What key has 3 flats?
One flat is F major (or its relative minor, D minor). Three flats is E♭ major (or its relative minor, C minor). For any other flat-key question, use the second-to-last flat rule from the section above, or check the full chart.
What key has 3 sharps? What key has 5 sharps?
Three sharps is A major (or F♯ minor). Five sharps is B major (or G♯ minor). The rule: take the last sharp in the signature and go up one half step to find the major key.
What is the key signature for A major?
A major has three sharps: F♯, C♯, and G♯. Its relative minor, F♯ minor, uses the same key signature.
What is the key signature for E major?
E major has four sharps: F♯, C♯, G♯, and D♯. Its relative minor, C♯ minor, shares the signature.
Can a piece change key signatures partway through?
Yes. A new key signature can appear at any point in the piece, usually with a double bar line marking the change. The new signature applies from that point until the end (or until another change).
Why do some keys have the same number of sharps or flats as the relative minor?
Because they literally share the same seven notes. A major key and its relative minor are built from the same scale, just starting on a different note. C major and A minor use the same white keys; the difference is which note feels like "home."
Going deeper into key signatures
This piece is the overview. If you want to go further on any one part of the system, the rest of the series breaks each one down with more examples and ear training:
- Key signatures part 2: major keys with sharps
- Key signatures part 3: major keys with flats
- Key signatures part 4: minor keys
Key takeaways
A key signature is a small piece of notation that does a lot of work. It tells you which scale the music is built on, which notes are sharp or flat throughout the piece, and which key sits at the music's emotional center. Once you have the order of sharps and flats memorized, the two simple rules for identifying major keys, and the relative-minor relationship, you can read any key signature in any piece of music without slowing down.
The fastest way to lock this in is to write some. Open Flat, drop a melody into a score, and change the key signature a few times to feel how the same notes shift their meaning. Five minutes of that is worth ten of reading.
Have a nice day,
Sébastien
