Key Signature Calculator
The circle of fifths gives every major and minor key a fixed key signature. Starting from C major with no accidentals, each step clockwise (up a perfect fifth) adds one sharp, and each step counterclockwise (down a fifth) adds one flat. Enter your position in fifths from C, from negative seven (flats) to positive seven (sharps), and this calculator returns the number of sharps or flats, names the major key and its relative minor, and lists which accidentals appear in the standard order. It is pure music theory, so the answers are exact.
Key signature logic
position > 0: sharps = position, order F C G D A E B
position < 0: flats = absolute position, order B E A D G C F
position = 0: C major, no accidentals
major key = step through fifths from C
relative minor = a minor third below the major
Each fifth clockwise adds a sharp; each fifth counterclockwise adds a flat. Sharps follow the order F, C, G, D, A, E, B; flats follow the reverse. The relative minor shares the same signature.
Circle of fifths context
- C major has zero sharps or flats; its relative minor is A minor.
- G major (one fifth up) has one sharp, F-sharp.
- F major (one fifth down) has one flat, B-flat.
- Six sharps (F-sharp major) is enharmonic with six flats (G-flat major).
- The standard range runs from seven flats to seven sharps.
Key signatures: frequently asked questions
What is a key signature?
A key signature is the set of sharps or flats placed at the start of each staff line that apply throughout a piece, defining its key. Each major and minor key has a fixed number of sharps or flats, from zero (C major) up to seven in either direction, following the circle of fifths.
How does the circle of fifths give the key signature?
Moving clockwise by a perfect fifth adds one sharp; moving counterclockwise by a fifth adds one flat. C major has none. G major (one fifth up) has one sharp; D major has two, and so on. F major (one fifth down) has one flat. This calculator uses your position in fifths from C to compute the count.
What is the order of sharps and flats?
Sharps are added in the order F, C, G, D, A, E, B (each a fifth higher). Flats are added in the reverse order B, E, A, D, G, C, F. This calculator names which accidentals appear given the count, following that fixed order.
What are enharmonic key signatures?
At the bottom of the circle, some keys can be written two ways: for example, six sharps (F-sharp major) equals six flats (G-flat major) in sound. Positions beyond seven sharps or seven flats are rarely written and are normally respelled enharmonically. This tool covers the standard range of zero to seven in each direction.
What is the relative minor?
Every major key shares its key signature with a minor key a minor third below, called the relative minor. C major and A minor both have no sharps or flats. This calculator reports the relative minor name alongside the major key for each signature.
Official sources
- Library of Congress: Music Theory Reference Collections.
- U.S. National Park Service (music education resources): Music Preservation.
Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.