How this instrument works
A key signature is the set of sharps or flats written at the start of every staff line, telling a performer which notes are consistently raised or lowered throughout the piece — without it, every altered note would need its own accidental marked individually, every single time it appears. Major keys are organised around the circle of fifths: starting from C major, which has no sharps or flats, each step clockwise (up a perfect fifth) adds one more sharp, and each step counterclockwise (down a perfect fifth) adds one more flat.
The sharps and flats don't appear in random order, either — they follow a fixed sequence. Sharps are added in the order F#, C#, G#, D#, A#, E#, and flats are added in the order Bb, Eb, Ab, Db, Gb. That means a key with, say, 3 sharps always has exactly F#, C#, and G# — never some other combination of three sharps — because each new key on the circle simply adds the next sharp or flat in that fixed sequence to the ones before it.
This instrument covers the twelve major keys most commonly used in practice: C (no sharps or flats) and then out to six sharps (F#) on one side and five flats (Db) on the other. A key signature's sharps or flats also apply to its relative minor — the minor key built on the 6th scale degree of the major — since the two share the identical set of pitches.
- Select Major key from the dropdown.
- Read Sharps or flats in the key signature directly beneath the input — the count and the specific notes affected.
- C major returns 0: it's the circle of fifths' reference point, with no sharps or flats.
- Cross-check the result against this site's major-scale calculator to see exactly which of the key's seven scale notes carry the sharp or flat.
Worked example — D major's key signature
Select Major key = D major. D sits 2 positions clockwise from C on the circle of fifths, which means it takes on the first 2 sharps in the standard order: F# and C#. Sharps or flats in the key signature reads 2 sharps (F#, C#).
That matches all 7 notes of D major's scale directly: D, E, F#, G, A, B, C# — the same F# and C# the key signature reports are exactly the 2 notes in the scale that sit a semitone higher than their natural, unaltered counterparts.
Questions
Why does D major have F# and C# specifically, and not some other pair of sharps?
Because sharps are always added in a fixed sequence — F#, C#, G#, D#, A#, E# — as you move clockwise around the circle of fifths, and each key simply takes the first however-many sharps from the start of that sequence. D major is two steps clockwise from C, so it takes exactly the first two: F# and C#, in that order, every time.
What's the maximum number of sharps or flats this tool covers?
This instrument's twelve major keys run from C (no sharps or flats) up to F# major (6 sharps) on the sharp side and Db major (5 flats) on the flat side — the range of major keys used in the overwhelming majority of written music. Keys beyond that range exist in theory but are rare in practice and enharmonically equivalent to keys already covered.
How does a major key's signature relate to its relative minor?
A major key and its relative minor — built on the 6th degree of the major scale — share an identical key signature, because they're built from exactly the same seven pitches, just starting from a different note. C major and A minor, for instance, both have zero sharps and flats, and D major's relative minor, B minor, also carries D major's 2 sharps.
Is there an easy way to remember the sharp and flat orders?
Many musicians use the mnemonic 'Father Charles Goes Down And Ends Battle' for the sharp order (F, C, G, D, A, E, B), and simply reverse it — 'Battle Ends And Down Goes Charles' Father' — for the flat order. It's a widely used memory aid, not a rule of music itself, but it reliably reproduces the correct sequence.
Why is C major considered the reference point with zero sharps or flats?
Because the circle of fifths is centred on it by convention — C major uses only the natural, unaltered notes of the musical alphabet (C, D, E, F, G, A, B), with no sharps or flats needed at all. Every other major key is described relative to that starting point, in terms of how many steps clockwise or counterclockwise it sits from C.