Skip to content
Tutorials Center
My learning

Topics

Lesson 13 of 50 · Scales and Keys

Key signatures and the circle of fifths

Learn how key signatures collect sharps and flats, the order of sharps and flats, how to find a key from its signature and how the circle of fifths links all twelve keys.

If a song is in G major, every F in it is an F♯. Writing a sharp sign before each F would clutter the page, so composers write the sharp once, at the start of every staff, and the reader understands that it applies to every F in the piece. That group of sharps or flats at the start of the staff is the key signature. It tells you which scale the music is built on, and it saves a great deal of ink.

This lesson shows how key signatures work, the order in which sharps and flats appear and how to read a key from them. It then introduces the circle of fifths, a diagram that shows how all twelve major keys are related and that musicians use every day to move between keys, build progressions and check their spelling.

The circle of fifths with twelve major keys on the outer ring and their relative minors inside
Moving clockwise by a fifth adds one sharp. Moving counter-clockwise adds one flat. The inner ring holds the relative minor keys.

What you will learn

  • What a key signature is and where it is written
  • The order of sharps (F C G D A E B) and flats (B E A D G C F)
  • How to name a major key from its key signature
  • How the circle of fifths organizes the twelve keys
  • What enharmonic keys are

Key terms

Key signature: the sharps or flats placed after the clef that apply to every note of that letter throughout the piece.

Circle of fifths: a diagram of the twelve keys ordered by the interval of a perfect fifth.

Relative minor: the minor key that shares a key signature with a given major key.

Enharmonic keys: two keys that sound the same but are spelled differently, such as F♯ major and G♭ major.

Accidental: a sharp, flat or natural that is not part of the key signature.

What a key signature does

A key signature is placed right after the clef on each staff. It applies to every octave: a sharp on the top-line F in the treble clef means all Fs, high and low, are sharp. It lasts for the whole piece unless the signature changes. A note outside the key can still be written, but then it carries an accidental for the rest of the measure.

Here is where the signature comes from. The scale of G major needs one sharp, F♯. Instead of marking every F in the music, we write F♯ once at the start. The scale of D major needs F♯ and C♯, so the key signature has two sharps, and so on. The signature is simply the sharps or flats of the scale, collected in a fixed order.

Four key signatures on the treble staff: G major, D major, F major and B-flat major
Each key signature is written on the lines and spaces where those notes live. Sharps and flats always appear in a fixed order.

The order of sharps and flats

Sharps and flats are not placed at random: they always appear in the same sequence, and on the staff they are arranged in a zigzag pattern to stay within the lines.

  • Order of sharps: F C G D A E B. A mnemonic: Father Charles Goes Down And Ends Battle.
  • Order of flats: B E A D G C F, which is the order of sharps backwards. A mnemonic: Battle Ends And Down Goes Charles's Father.

A key with three sharps has F♯, C♯ and G♯. A key with two flats has B♭ and E♭. You never get C♯ without F♯, and never E♭ without B♭: you always add the next one in the list.

Why this order? Each new sharp is a fifth above the last one. F♯ to C♯ is a fifth up; C♯ to G♯ is a fifth up again. Flats go the other way, a fifth down (or a fourth up): B♭ to E♭, E♭ to A♭. The circle of fifths will show this directly.

Reading a key from its signature

For sharp keys: look at the last sharp in the signature (the rightmost, highest in the order). The major key is the note one half step above that sharp. Take a signature of F♯ and C♯ (two sharps). The last sharp is C♯, and the note a half step above C♯ is D. So the key is D major. For three sharps (F♯ C♯ G♯), the last is G♯, so the key is A major. This works because the last sharp added is always the leading tone, degree 7, of the new key, and the tonic is a half step above the leading tone.

For flat keys: look at the second-to-last flat. The major key is the name of that flat. A signature with B♭ and E♭ has the second-to-last flat B♭, so the key is B♭ major. With B♭, E♭ and A♭, the second-to-last is E♭, so the key is E♭ major. The exception is one flat (B♭), which has no second-to-last: memorize it as F major.

Sharps Key Added sharp Flats Key Added flat
0 C major none 0 C major none
1 G major F♯ 1 F major B♭
2 D major C♯ 2 B♭ major E♭
3 A major G♯ 3 E♭ major A♭
4 E major D♯ 4 A♭ major D♭
5 B major A♯ 5 D♭ major G♭
6 F♯ major E♯ 6 G♭ major C♭
7 C♯ major B♯ 7 C♭ major F♭

The circle of fifths

Arrange the twelve notes in a circle, each a perfect fifth (seven half steps) above the previous one, starting from C at the top: C, G, D, A, E, B, F♯, then D♭, A♭, E♭, B♭, F and back to C. This is the circle of fifths, and the picture at the top of the lesson shows it.

The circle encodes several facts at once:

  • Clockwise, each step adds one sharp. C has none, G has one, D has two, and so on.
  • Counter-clockwise, each step adds one flat. C has none, F has one, B♭ has two, and so on.
  • Neighboring keys are close relatives. G major differs from C major by a single note (F becomes F♯). Keys across the circle share few notes. This closeness is why songs usually modulate (change key) to a neighbor on the circle.
  • The inner ring lists the relative minors: A minor shares the signature of C major, E minor that of G major, and so on. You will study them in the next lesson.

The three keys at the bottom are called enharmonic keys because they can be spelled two ways with the same sound: B major (5 sharps) and C♭ major (7 flats); F♯ major (6 sharps) and G♭ major (6 flats); D♭ major (5 flats) and C♯ major (7 sharps). A composer picks the spelling with fewer accidentals, or the one that fits the harmony.

Musicians also run the circle counter-clockwise for harmony: chord progressions that move by fifths downward (such as C, F, B♭, E♭ in the flat direction) are among the most natural-sounding in Western music. The circle works as a map for that too.

Common misconceptions

"A key signature only affects the notes on its own line or space." It applies to that letter in every octave.

"The key signature tells you the key, always." A key signature fits two keys, a major and its relative minor. You must look at the music (the first and last chords, the melody's home note) to decide which.

"More sharps means a harder piece." The key may be harder to read, but not necessarily harder to play. Difficulty depends on the notes, rhythm and instrument.

Try it

Choose a key and see its key signature drawn on a treble staff, with the spelled scale below. Watch how the sharps and flats always follow the same order and positions.

Key signature viewer

Now the rules as code. This Python program finds the major key from a number of sharps or flats using the "last sharp, half step up" and "second-to-last flat" rules, and walks around the circle of fifths.

Python Key from key signature, and the circle

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 6 questions

of 6 answered You scored / 6 · perfect!

  1. 1. What is the order of sharps in key signatures?

    Sharps are added in the order F C G D A E B (Father Charles Goes Down And Ends Battle). Flats are the same list backwards.
  2. 2. A key signature has two sharps, F sharp and C sharp. What major key is it?

    The last sharp is C sharp, and the major key is a half step above it: D major.
  3. 3. A key signature has B flat and E flat. What major key is it?

    The second-to-last flat names the key. With B flat and E flat, that is B flat, so the key is B-flat major.
  4. 4. Moving clockwise one step around the circle of fifths, what happens to the key signature?

    Each step up a fifth adds one sharp or removes one flat.
  5. 5. Which pair are enharmonic major keys?

    F sharp major (6 sharps) and G flat major (6 flats) sound identical but are spelled differently.
  6. 6. How many octaves does a key signature's sharp on the top line F apply to?

    A key signature applies to that note name in every octave, throughout the piece.

Summary

  • A key signature collects the sharps or flats of the scale at the start of the staff; it applies to all octaves and the whole piece.
  • Sharps appear in the order F C G D A E B and flats in the order B E A D G C F.
  • For sharps, the major key is a half step above the last sharp; for flats, it is the second-to-last flat (one flat is F major).
  • The circle of fifths adds a sharp for each fifth clockwise and a flat for each fifth counter-clockwise; neighbors share most notes.
  • Three pairs of keys are enharmonic, and each key shares its signature with a relative minor.

Next: Minor scales