Key Signature Calculator
Find the sharps or flats in any major or minor key signature.
Calculator verified • Last updated: August 2026
Key
—
How Key Signatures Are Determined
Every major key's set of sharps or flats follows a fixed pattern known as the circle of fifths: starting from C major (no sharps or flats), each step of a perfect fifth up adds one more sharp, in a fixed order — F#, then C#, then G#, and so on. Moving the other direction (fifths down, or fourths up) adds flats instead, in the reverse order — Bb, then Eb, then Ab. A minor key doesn't get its own separate pattern; instead, every minor key shares its exact key signature with a specific major key, called its relative major, found 3 semitones above the minor tonic.
Worked Example: A Minor
A minor's tonic is A (pitch class 9). Its relative major is 3 semitones up: pitch class 9 + 3 = 12, which wraps to 0 — C. C major has no sharps or flats, so A minor has no sharps or flats either — they share every note, just starting from a different tonic (A minor's scale is exactly C major's notes, starting on A instead of C).
Worked Example: E Major
E major sits 4 steps around the sharp side of the circle of fifths, giving it 4 sharps in the fixed order: F#, C#, G#, D#. Selecting Major mode with tonic E reproduces this instantly rather than requiring you to count fifths by hand.
The Sharp and Flat Orders Never Change
A key signature never skips ahead in its order — a key with 3 sharps always has exactly F#, C#, and G#, never some other combination of three sharps, because each additional sharp is always the next one in the fixed sequence F#-C#-G#-D#-A#-E#-B#. The flat order is the exact mirror image: Bb-Eb-Ab-Db-Gb-Cb-Fb. This predictability is what makes key signatures memorizable as a simple linear sequence rather than 15 unrelated lists.
A Brief History of the Key Signature
Medieval and Renaissance music didn't use key signatures the way this calculator does — most pieces were built around church modes rather than the major/minor system, and any accidentals needed were often applied note by note ("musica ficta") rather than declared once at the start of a staff. Consolidating a piece's sharps or flats into a single signature at the beginning became standard practice as tonal, major/minor harmony solidified through the 17th and 18th centuries.
The circle of fifths as a compact way of visualizing every key's signature is often traced to a diagram published by German theorist Johann David Heinichen in 1728, though related circular arrangements of keys appeared earlier, and the idea most likely developed gradually rather than from a single inventor. Keyboard tuning mattered too: well-tempered and later equal-tempered tuning systems — Bach's "Well-Tempered Clavier" (1722) is a famous early example, though it used a well temperament rather than strictly modern equal temperament — made playing comfortably in distant, heavily-sharped or heavily-flatted keys practical for the first time, which is part of why the full 15-key signature system this calculator reproduces became worth standardizing.
Common Key Signature Mistakes
Assuming a minor key's signature can be found by simply flipping the major-key pattern (as if minor keys had their own independent sharp/flat count) is a common error — minor keys don't have an independent circle-of-fifths position; they always borrow their relative major's exact signature. Another frequent mix-up: confusing a key's tonic note with its key signature's name — "F# major" is a key built on the note F#, not a description of how many sharps it has (it happens to have 6).
Music Terms You Should Know
Key Signature — the set of sharps or flats shown at the start of a staff, applying to every instance of that note for the rest of the piece unless marked otherwise.
Circle of Fifths — a visual arrangement of all 12 major keys in order of increasing sharps (clockwise) or flats (counterclockwise), each step a perfect fifth from the last.
Relative Major/Minor — a major and minor key pair that share an identical key signature; the minor tonic sits 3 semitones below its relative major's tonic.
Enharmonic Key — two different spellings of the same-sounding key (like F# major and Gb major), each with its own distinct, valid key signature.
Frequently Asked Questions
How do I find the key signature of a minor key?
Every minor key shares its key signature with a major key called its relative major, found 3 semitones above the minor tonic (for example, A minor's relative major is C major). This calculator computes that relationship automatically — just select the minor tonic and Minor mode, and it looks up the relative major's signature for you.
Why do some keys have both a sharp and a flat version?
Enharmonic equivalence — F# major and Gb major, for instance, sound identical but are spelled and notated differently, each with its own valid key signature (6 sharps vs. 6 flats). This calculator shows one representative spelling per pitch class, generally whichever has fewer accidentals, and notes that the enharmonic equivalent exists.
What order do sharps and flats appear in a key signature?
Sharps are always added in the order F#, C#, G#, D#, A#, E#, B# (a repeating pattern of ascending perfect 5ths). Flats are always added in the order Bb, Eb, Ab, Db, Gb, Cb, Fb — exactly the reverse order, descending perfect 5ths. A key with 3 sharps, for example, always has exactly F#, C#, and G#, never a different combination of three sharps.