Skip to content
FiftyCalc Free calculators for all 50 states

Key Signature Calculator

Test cases replayed : 3 of 3 match · Methodology · No outside source listed

Choose a key to get its key signature and its relative key.

Result

Sample figures

Key signature—

Sharps or flats, in the order written —

  • Relative key (same signature)—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Key Signature Calculator

Key: choose one of the 30 options in the list. Prefilled example: C major.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Key: choose one of the 30 options in the list.
  2. Read the result: Key signature; the panel also shows Sharps or flats, in the order written and Relative key (same signature).

How this calculator works

Key signatures follow the circle of fifths: each step up a fifth from C major adds one sharp (G, D, A, E, B, F♯, C♯ major) and each step down a fifth adds one flat (F, B♭, E♭, A♭, D♭, G♭, C♭ major).

Sharps are always added in the order F♯ C♯ G♯ D♯ A♯ E♯ B♯ and flats in the reverse order B♭ E♭ A♭ D♭ G♭ C♭ F♭.

A minor key shares the signature of the major key a minor third above it: A minor with C major, E minor with G major, C minor with E♭ major.

The formula

  1. N={k−7if k<20k−27otherwise
Symbols used in the formula
SymbolMeaning
kKey (0: C♭ major; 1: G♭ major; 2: D♭ major; 3: A♭ major; 4: E♭ major; 5: B♭ major; 6: F major; 7: C major; 8: G major; 9: D major; 10: A major; 11: E major; 12: B major; 13: F♯ major; 14: C♯ major; 20: A♭ minor; 21: E♭ minor; 22: B♭ minor; 23: F minor; 24: C minor; 25: G minor; 26: D minor; 27: A minor; 28: E minor; 29: B minor; 30: F♯ minor; 31: C♯ minor; 32: G♯ minor; 33: D♯ minor; 34: A♯ minor)
NKey signature

Worked example

KeyC major
Sharps or flats, in the order writtenNone
Relative key (same signature)A minor
  1. N=7−7=0

Key signature No sharps or flats

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

How many flats are in E♭ major?

Three: B♭, E♭ and A♭. Its relative minor is C minor.

What is the key signature of E minor?

One sharp, F♯, the same as G major.

Related calculators