Key Signatures and the Order of Sharps and Flats
Sharps arrive in the order F C G D A E B and flats in reverse. The order is the circle of fifths written out, one signature at a time.
The accidentals in a key signature never appear in an arbitrary order. Sharps are added one at a time as F, C, G, D, A, E, B. Flats are added as B, E, A, D, G, C, F. Both lists are the circle of fifths spelled out, and the reason they are constant is that each key inherits the previous key’s alterations and adds exactly one more.
The order is a ladder of fifths
Start from C major, which needs no accidentals. Move the tonic up a perfect fifth to G, and the scale requires one alteration: the seventh degree must be raised to F♯ so that it sits a semitone below the tonic. That is the one sharp in the signature.
Move up another fifth to D major and the same requirement appears again. F♯ stays, because it is still the third of the key, and C♯ joins it as the new leading tone. Every further step up a fifth keeps the existing sharps and adds the next one in the cycle. A major has F♯, C♯ and G♯; E major adds D♯; B major adds A♯.
Flats run the same ladder downhill. Moving the tonic up a fourth, which is the same as moving it down a fifth, adds a flat, and the new flat is always the fourth degree of the key. F major takes B♭, B♭ major keeps B♭ and adds E♭, E♭ major adds A♭.
Because the two ladders meet, most keys have two names. All fifteen signatures, from seven flats to seven sharps, are listed below with their relative minors.
| Signature | Major key | Accidentals, in the order they appear | Relative minor |
|---|---|---|---|
| none | C major | none | A minor |
| 1 sharp | G major | F♯ | E minor |
| 2 sharps | D major | F♯ C♯ | B minor |
| 3 sharps | A major | F♯ C♯ G♯ | F♯ minor |
| 4 sharps | E major | F♯ C♯ G♯ D♯ | C♯ minor |
| 5 sharps | B major | F♯ C♯ G♯ D♯ A♯ | G♯ minor |
| 6 sharps | F♯ major | F♯ C♯ G♯ D♯ A♯ E♯ | D♯ minor |
| 7 sharps | C♯ major | F♯ C♯ G♯ D♯ A♯ E♯ B♯ | A♯ minor |
| 1 flat | F major | B♭ | D minor |
| 2 flats | B♭ major | B♭ E♭ | G minor |
| 3 flats | E♭ major | B♭ E♭ A♭ | C minor |
| 4 flats | A♭ major | B♭ E♭ A♭ D♭ | F minor |
| 5 flats | D♭ major | B♭ E♭ A♭ D♭ G♭ | B♭ minor |
| 6 flats | G♭ major | B♭ E♭ A♭ D♭ G♭ C♭ | E♭ minor |
| 7 flats | C♭ major | B♭ E♭ A♭ D♭ G♭ C♭ F♭ | A♭ minor |
Reading the tonic straight off the signature
Two rules replace counting accidentals.
With sharps, the last sharp in the signature is the leading tone, so the tonic is a semitone above it. Three sharps are F♯, C♯ and G♯, the last of which is G♯, and a semitone above G♯ is A: A major. Six sharps end on E♯, and a semitone above E♯ is F♯: F♯ major.
With flats, the last flat is the fourth degree of the key, so the tonic is a fourth below it, which is the same as a fifth above it. Two flats are B♭ and E♭, and a fourth below E♭ is B♭: B♭ major. One flat does not break the pattern, though it does defeat the shortcut of counting backwards from the end; the single flat is the fourth degree, and a fourth below B♭ is F, so one flat means F major.
To move from a major key to its relative minor, count down a minor third from the tonic. The signature is unchanged, so A major with three sharps is also F♯ minor, and B♭ major with two flats is also G minor.
Playing a scale from the signature is the check that a reader actually knows the key rather than recognising a shape. The two examples above begin a D major and an F major scale; the first prints two sharps, the second a single flat.
Enharmonic keys, and why both spellings are kept
F♯ major with six sharps and G♭ major with six flats contain the same twelve pitches in the same order. B major with five sharps and C♭ major with seven flats are also the same sounds, as are C♯ major with seven sharps and D♭ major with five flats.
Both spellings exist because a major scale uses each letter name exactly once. D♭ major needs a seventh degree that is a C of some kind, so it is written C♭ rather than B♮; spelling that degree as B would leave the scale with two B’s and no C, and the notation would stop showing the interval structure it exists to show. Spelling is also how the notation records function: in a passage built around the dominant of F♯ major, the altered note is derived from C♯, so it belongs to a C letter name, not a D♭.
Publishers normally prefer the spelling with fewer accidentals in the signature, which is why B major is far more common than C♭ major and D♭ major more common than C♯ major. Between six sharps and six flats there is no arithmetic advantage, and the choice follows the harmony and the instruments: a passage that modulates to the subdominant of F♯ major moves to B major and drops a sharp, while the same music written in G♭ major moves to C♭ major and adds a flat.
Minor keys share a signature and supply their own accidentals
The signature of a minor key is the signature of its relative major. A minor and C major have none; E minor and G major have one sharp; D minor and F major have one flat. Nothing in the signature tells you that the piece is minor. What tells you is the harmony, the first and last bass notes, and the fact that the seventh degree is raised often enough to establish a leading tone.
Raised degrees in minor are written as accidentals in the music, never in the signature. A natural minor contains G♮; A harmonic minor raises it to G♯ wherever the dominant harmony appears, and those G♯s are written measure by measure because the signature says nothing about them.
The difference between those two examples is one semitone and an entire harmonic function. The raised seventh is what turns a mode into a key with a dominant.
Two rules readers break
An accidental lasts until the barline, in that octave only. A sharp printed on F4 applies to that F for the rest of the measure. It does not apply to F5, and it does not survive the barline. Accidentals are per octave and per measure, which is why a chord spanning two octaves sometimes needs the same accidental printed twice.
Courtesy accidentals are editorial. Publishers print cautionary naturals and sharps in parentheses, or without parentheses, to help the reader after a chromatic passage. Their presence and their formatting vary between editions, so their absence never proves that a note is unaltered. Read the signature and the previous accidentals in the measure, not the parentheses.
A note tied across a barline continues to sound at its altered pitch without a new accidental, because it is the same sounding note continued, not a new one.
The signature does not always name a key
In music written before functional tonality settled, and in a great deal of music written after it dissolved, a signature reports which notes are inflected rather than which key the piece is in. A Renaissance piece with one flat is not necessarily in F major or D minor; if it is Dorian, the flat is there because Dorian has a low sixth degree, and the final, the cadences and the range of the voices are what identify the mode. Reading a modal piece as if its signature named a key produces analyses that fight the music.
The same caution applies to modern scores that carry no signature at all while remaining tonal: no signature means no systematic alteration, not the absence of a key.
Practice
- Write both orders from memory until each takes under fifteen seconds, forward and backward: F C G D A E B and B E A D G C F.
- Cover the tonic column of the table above and name each key from the signature alone, using the two rules: a semitone above the last sharp, or a fourth below the last flat.
- Play each scale from memory of the signature, naming the tonic aloud before the first note. The virtual piano at /tools/virtual-piano/ is enough for this, and the circle of fifths tool at /tools/circle-of-fifths/ prints the signature for any key you select.
- Take a page of real music and identify the key of each phrase from the signature plus the bass note before checking the first and last measures. Do this on music you do not know, since familiar pieces give away the answer from the melody.



