Key Signature Calculator - Sharps, Flats, and Relative Keys

Key signature calculator that returns the sharps or flats, relative minor, and parallel key for any of the 12 major or minor keys in one view.

Updated: June 19, 2026 • Free Tool

Key Signature Calculator

Pick the tonic (root note) of the key.

Major or minor mode.

Results

Accidentals
0
Sharps or flats in order 0
Signature type 0
Relative key 0
Parallel key 0
Enharmonic equivalent 0

What Is a Key Signature?

A key signature calculator is a music theory reference that returns the sharps or flats, relative minor, and parallel key for any of the 12 major or minor keys. The key signature is the set of sharp or flat symbols written at the start of a staff that tells the player which pitches are consistently raised or lowered throughout a piece. Drop the tonic and mode into this tool and the result panel reports the count, the altered notes, and the two related keys that share or mirror the signature so you can read a score, transpose, or compose.

  • Reading sheet music: Look up the meaning of the sharps or flats printed at the start of a piece so you can sight-read more fluently.
  • Writing a chart or lead sheet: Confirm the right accidentals to print before the time signature when you set a melody in a new key.
  • Composing in a key you don't play in: Pick a key by vocal range or finger stretch and read off the altered notes without trial and error at the keyboard.
  • Teaching or studying music theory: Show students the relationship between a major key and its relative minor using the same signature as the visual anchor.

Every key signature reflects one position on the circle of fifths, so the same five-flat pattern shows up for both Db major and Bb minor. Memorize the standard order of sharps (F, C, G, D, A, E, B) and flats (B, E, A, D, G, C, F), and this key signature calculator gives you the same answer in one tap.

The tool accepts all 15 chromatic spellings of the 12 pitch classes, reports the canonical answer for each, and flags the enharmonic rewrite when a key like C# major can also be written as Db major.

When you know the key signature for a piece, the next step is often shifting the chord progression to fit a singer's range, and a chord transposer applies the same circle-of-fifths offset to each root.

How the Key Signature Calculator Works

The calculator maps the tonic and mode to a canonical position on the circle of fifths and reads off the standard set of altered notes for that position.

signature = position_of_tonic_on_circle_of_fifths (mod 7); sharp_order = [F, C, G, D, A, E, B]; flat_order = [B, E, A, D, G, C, F]; minor_signature = signature_of_relative_major(tonic + 3 semitones).
  • tonic: Root note of the key, picked from the 12 pitch classes (with both sharp and flat spellings accepted).
  • mode: Major or minor. Minor keys use the same signature as their relative major three semitones above the tonic.
  • position: Index of the tonic in the circle of fifths sequence (C G D A E B going clockwise, C F Bb Eb Ab Db Gb going counter-clockwise).

The relative key shares the same signature. For a major input, the relative minor sits a minor third below the tonic (the same pitch as the 6th scale degree). For a minor input, the relative major sits a minor third above. The parallel key is the same tonic in the opposite mode (C major to C minor) and almost always has a different signature.

Enharmonic pairs such as C# and Db, or F# and Gb, produce identical pitch content with different accidentals. This key signature calculator keeps the spelling the user typed and reports the other spelling as an alias so the user can spot a key they prefer to write flat or sharp.

D major

Tonic = D, Mode = major

D sits two steps clockwise from C on the circle of fifths, so it picks up F# and C# in the standard sharp order.

2 sharps: F#, C#.

The relative minor is B minor (same two sharps), and the parallel minor is D minor (1 flat).

A minor

Tonic = A, Mode = minor

The relative major is C major (three semitones above A), which sits on the zero-position of the circle of fifths.

0 accidentals.

A minor shares its signature with C major, so the staff shows no sharps or flats even though the tonic is A.

According to Britannica (key signature), key signature is the set of sharp or flat symbols placed at the beginning of a staff to indicate the key, with the standard order of sharps being F, C, G, D, A, E, B and the order of flats being B, E, A, D, G, C, F

The 12 pitch classes that underpin every key signature wrap around the octave the way modular arithmetic wraps a counter, so a modulo calculator confirms why adding 7 semitones from C reaches G.

Key Concepts in Key Signatures

Four ideas cover most of what a player or composer needs to read or write a key signature correctly.

Circle of fifths

The 12 pitch classes arranged so that every adjacent key differs by a perfect fifth. Moving clockwise adds one sharp, moving counter-clockwise adds one flat, and the order matches the sharps and flats in the staff.

Relative major and minor

Two keys share the same signature. The relative minor of a major key starts on the 6th scale degree (a major sixth above the tonic). The relative major of a minor key starts a minor third above the tonic.

Parallel major and minor

Two keys share the same tonic but use different modes. They almost always carry different accidentals; for example, C major has none while C minor has three flats.

Enharmonic equivalence

Pitches like C# and Db, or F# and Gb, are identical on the keyboard but are spelled differently depending on the surrounding key. The spelling decides which accidentals the staff shows.

Memorizing the order of sharps and flats turns every key signature into a counting exercise. The first sharp is always F#, the second C#, the third G#, and so on; the first flat is always Bb, the second Eb, the third Ab.

Writers usually pick the spelling that produces fewer accidentals. A piece with one accidental is written as F major (one flat) rather than E# major (four sharps plus E# as tonic).

Octaves group the 12 pitch classes by powers of two, so the same doubling logic used to count frequency doublings is captured by a log 2 calculator.

How to Use This Calculator

Four short steps turn a tonic and mode into the full key signature plus its related keys, which is why this key signature calculator fits a sight-reading or arranging workflow.

  1. 1 Pick the tonic: Choose the root note from the dropdown. Both sharp and flat spellings are listed so you can match the notation you plan to use.
  2. 2 Choose major or minor: Use major for a standard bright-sounding key and minor for the darker relative or parallel version.
  3. 3 Read the result panel: The accidentals count, the altered notes in order, and the signature type are listed at the top of the panel.
  4. 4 Cross-check with related keys: Read the relative key (same signature) and the parallel key (same tonic, other mode) to confirm the context.
  5. 5 Note the enharmonic alias when relevant: If the tonic has a sharp and a flat spelling, the alias row shows the other version so you can choose the cleaner notation.

If you write a melody in F# major and want a relative-minor cue for the bridge, set the tonic to F# and the mode to major; the panel returns six sharps (F#, C#, G#, D#, A#, E#), the relative minor D# minor, and the enharmonic alias Gb major for a flatter notation choice.

After the signature is known, mapping each altered note to an actual pitch is the next step, and a frequency calculator returns the period or wavelength that pairs with any pitch class in the key.

Benefits of Using This Calculator

The tool puts the canonical signature and both related keys in one view so you avoid the most common notation mistakes a key signature calculator is built to remove.

  • Fast accidentals count and order: You see both the number and the exact altered notes without counting up the staff by hand.
  • Relative and parallel keys side by side: Each result row reminds you of the key that shares the signature and the key that shares the tonic, which speeds up modulation plans.
  • Enharmonic alias is flagged: A key typed as C# shows its Db equivalent so you can pick the spelling with fewer accidentals for your notation style.
  • Works for both major and minor input: Set the mode first and the relative major is computed automatically; you do not have to remember which major shares the minor signature.
  • Accepts all 15 common spellings: Both the sharp and flat names for each of the 12 pitch classes are accepted, so you can type whichever convention you read or write in.

For sight-reading practice the altered-notes row is the one you read most often; for theory homework the relative and parallel keys do most of the work.

The same data also helps when you transpose a Bb-instrument part. Pick the concert key, note the sharps or flats, and read off the number of accidentals to add or remove for the transposing instrument.

The interval math behind every scale reduces to ratio divisions, and the same Euclidean algorithm calculator that simplifies those ratios drives the wrap-around at the heart of the circle of fifths.

Factors That Affect Your Result

Three variables decide the signature and two limitations tell you when to reach for a fuller notation tool.

Tonic spelling

The spelling you type decides whether the calculator reports a sharp key or its enharmonic flat equivalent, because the same pitch class can sit at two positions in the sharp and flat cycles.

Mode toggle

Minor mode reads the signature from the relative major three semitones above the tonic, so the altered-notes list always reflects the major parent signature.

Circle-of-fifths position

The number of accidentals grows by one for every step away from C in either direction; the order of accidentals is fixed and does not depend on the tonic name.

  • Exotic spellings such as A# major or D# major (which would require more than seven accidentals) are rewritten to the flat equivalent (Bb major or Eb major); the alias row tells you which spelling was applied.
  • The calculator reports natural minor signatures only. Harmonic and melodic minor introduce raised 6th and 7th notes that do not appear in the key signature and must be added as accidentals in the music itself.

When two keys share the same pitch content (C# and Db, F# and Gb), the standard practice is to choose the spelling with fewer accidentals for readability. The calculator surfaces that choice in the alias row.

If you need a particular mode variant (harmonic or melodic minor) the raised 6th or 7th will appear as an accidental next to the affected note in the score rather than in the signature, so plan those marks by hand.

According to Wikipedia (circle of fifths), the circle of fifths orders the 12 pitch classes so that each adjacent key differs by a perfect fifth, and the number of sharps grows by one for every clockwise step from C to C# and the number of flats grows by one for every counter-clockwise step from C to Cb

The cleaner-spelling choice between sharps and flats follows the same minimal-accidentals rule that drives most notation decisions, so most scores keep the spelling with the fewest symbols.

Key signature calculator showing the tonic selector, major/minor mode toggle, and result panel listing sharps or flats, relative key, and parallel key
Key signature calculator showing the tonic selector, major/minor mode toggle, and result panel listing sharps or flats, relative key, and parallel key

Frequently Asked Questions

Q: What is a key signature and why does it matter?

A: A key signature is the set of sharp or flat symbols placed at the beginning of a staff. It tells the player which pitches are consistently raised or lowered so the same accidentals do not have to be written next to every note.

Q: How do I figure out which key has a given number of sharps or flats?

A: Use the circle of fifths. Each step clockwise from C adds one sharp; each step counter-clockwise from C adds one flat. The order of sharps is always F, C, G, D, A, E, B, and the order of flats is the reverse.

Q: What is the difference between a sharp key and a flat key?

A: A sharp key carries sharps at the start of the staff, and a flat key carries flats. Both spellings can describe the same set of pitches, so writers usually pick the spelling with fewer accidentals for readability.

Q: How do I find the relative minor of a major key?

A: Count down a minor third from the major tonic, or up a major sixth. C major becomes A minor, G major becomes E minor, and D major becomes B minor. The relative minor shares the key signature with its major parent.

Q: Why does the order of sharps follow F-C-G-D-A-E-B?

A: Each new sharp is a perfect fifth above the previous one, so the order steps around the circle of fifths. Flats use the reverse order because each flat is a perfect fifth below the previous, retracing the same circle in the opposite direction.

Q: Can two different keys share the same key signature?

A: Yes. Every major key shares its signature with its relative minor, and several pairs of major keys are enharmonic rewrites of each other (C# major and Db major, F# major and Gb major, B major and Cb major).