How to find the key of a song
September 28, 2026 · Updated September 30, 2026
The signature narrows it to two candidates, a major key and its relative minor. The note the music ends on usually decides between them, and a raised seventh showing up as an accidental settles the argument for the minor.
Step 1, read the signature
Sharps and flats at the start of every line name the major candidate directly, by two rules that need no counting.
With sharps, take the last sharp and go up a semitone. Four sharps end on D sharp, which gives E major.
With flats, the second to last flat names it. Four flats are B flat, E flat, A flat, D flat, which gives A flat major. The two signatures with a single accidental have to be memorised: one sharp for G major, one flat for F major.
| Signature | Major | Relative minor |
|---|---|---|
| none | C | A |
| 1 sharp | G | E |
| 2 sharps | D | B |
| 3 sharps | A | F sharp |
| 4 sharps | E | C sharp |
| 5 sharps | B | G sharp |
| 6 sharps | F sharp | D sharp |
| 1 flat | F | D |
| 2 flats | B flat | G |
| 3 flats | E flat | C |
| 4 flats | A flat | F |
| 5 flats | D flat | B flat |
| 6 flats | G flat | E flat |
The relative minor starts on the sixth degree of the major scale, three semitones below the major note. The two share every note and every accidental, which is why one signature serves both.
Step 2, decide which of the two
Three pieces of evidence, in descending order of how much they tell you.
The raised seventh is the strongest. Minor keys nearly always sharpen their seventh degree so that the chord before the last one pulls home. That note sits outside the signature, so it appears as an accidental again and again. A song with an empty signature that keeps writing G sharp is in A minor, and the G sharp is the tell.
The final bass note comes next. Music tends to end on its home note, so look at the lowest note of the last chord before anything else. The first bass note is weaker evidence of the same kind.
The last two chords finish the job. A major chord built on the fifth degree, moving to the tonic, is the strongest cadence in the system. See which note those two chords resolve onto.
Step 3, check it against the opening
Read the first few bars against your candidate. In the right reading, the music sits on degrees 1, 3 and 5 more than it sits anywhere else, and the accidentals you meet explain themselves as the raised seventh or as a brief borrowing.
Where the opening fights the answer, the music may begin away from home and arrive later, which is common in longer works.
Finding it without a score
Most songs never put a key signature in front of you, so the evidence has to come from sound and from chord symbols.
Play the song and hum the note it feels finished on. That note is almost always the key, and the test is whether stopping on it sounds like an ending or like a question.
On a chord sheet, look for the chord the progression keeps returning to and the one the song ends on. Then check whether the other chords fit that key's set, per How to read a chord symbol. A song using G, C, D and E minor is in G major, because those are degrees 1, 4, 5 and 6 of it.
Where a capo is marked, the sounding key is the shape key moved up one semitone per fret, which is covered in How to transpose a song.
When the rule does not apply
A folk tune with no sharps or flats that circles around D and ends on D is in D Dorian, and neither C major nor A minor describes it. The signature tells you the note collection. The tune tells you the centre.
A modulation moves the centre mid-song, usually to the dominant or to the relative minor. It often arrives with new accidentals that look like mistakes until you name the new centre.
A twelve bar blues in C uses a C7 chord as home, with a flat seventh built into the tonic, which no major key does. The centre is still C, and the vocabulary is borrowed from elsewhere.
A worked example
A song with two flats, ending on a G in the bass, with F sharp written in as an accidental in most bars.
Two flats give B flat major or G minor as candidates. The final bass note is G. The recurring F sharp is the raised seventh of G minor, a note outside the signature. Every piece of evidence points one way, so the song is in G minor.
Suppose instead it ended on B flat with no F sharp anywhere. The same signature would then have meant B flat major. The signature alone never separates the two.
Sources
Open Music Theory, on key signatures, relative keys, cadences, modal centres
How to build a major scale, for why the sharps and flats arrive in a fixed order