How to Find the Key of a Song

The key of a song is the set of notes and the home note (the tonic) that it is built around. Knowing it tells you which chords and scales will fit, which is what you need to play along, write a solo, or transpose to a different singer’s range.

By ear

  1. Find the home note. Play the song and hum or play along on a note that feels like rest, the note that would be a natural place to stop. Songs tend to end on the tonic, so try the last note or chord first.
  2. Decide major or minor. Play the third above that note. If the chord built on the home note sounds bright and happy, it is major; if it sounds darker or sadder, it is minor.
  3. Check against the chords. In a major key the common chords are I, IV and V, with ii, iii and vi as minor chords. If the chords you can hear all belong to one key’s family, you have found it. The circle of fifths shows which chords go together.

From the chords

If you already know the chords, the key is usually the one all of them belong to. For C, F, G and A minor, the only major key containing all of them is C major (or A minor, its relative). The first and last chords are good clues to the tonic. If a progression keeps returning to a chord and ends on it, that chord is probably the tonic.

From sheet music

Count the sharps or flats in the key signature. With sharps, the major key is a half step above the last sharp (the one furthest to the right). With flats, it is the second-to-last flat (and F major, with one flat, is the one case you simply remember). Then pick between the major key and its relative minor by looking at the final chord and the melody. A key signature of one sharp, for example, means G major or E minor.

Why relative keys are confused

A major key and its relative minor use exactly the same seven notes, so they differ only in emphasis. A song in A minor and one in C major can use the same chords: C, F, G and Am appear in both. The deciding factor is which chord feels like home. A song that opens on Am and ends on Am is in A minor, even if C, F and G appear throughout. The same note-for-note similarity applies to keys a fifth apart, which share six notes. These are the confusions that trouble both people and software most.

Using the key finder

The key finder works on audio you give it, from a file or the microphone. It splits the sound into short windows, measures how much energy falls on each of the twelve pitch classes, regardless of octave, and compares that total profile with templates for 24 keys (12 major and 12 minor). The templates are the Krumhansl–Kessler profiles, which came from listening experiments in which people rated how well each note fit a key. The closest match wins, and a confidence score tells you how clearly it won.

Know its limits before relying on it:

  • Modulations: a song that changes key partway through blends into a single profile and may give the wrong answer. Analyze a section at a time instead.
  • Relative and neighboring keys: as above, these are the most likely mistakes, so check the result against the song’s chords.
  • Ambiguous material: songs with little harmony, heavy percussion, or non-Western scales don’t match the templates well. Pitch-less sounds add noise.
  • Tuning: recordings at a reference other than 440 Hz can place energy between pitch classes and reduce confidence.

Treat the result as a strong first guess to confirm with your ears or on an instrument, not as a final answer. To learn which chords fit the key it finds, see common chord progressions.

All guides