keyandbpm

How to find the key of a song (by ear, instrument or software)

By Mike Farina ยท

To find the key of a song, loop the chorus, hum the note the music wants to rest on, and find that note on a keyboard: that's the tonic. Then play the note three semitones above it and the note four above; if the three-semitone note fits, the song is minor, if the four fits, it's major. Check by playing the whole scale over the track, or drop the file into a key detector and confirm the result by ear.

What does "the key of a song" actually mean?

A key is two things: a home note (the tonic) and a scale built around it, usually major or minor. A song in A minor keeps pulling back to A, and most of its melody and chords come from the notes A B C D E F G.

Look at those seven notes again. They're the same seven notes as C major. The only difference between A minor and C major is which note sounds like home, and that one fact causes most of the arguments about keys you'll ever have. There's a whole post on it: why key finders disagree.

How to find the key of a song by ear

You don't need perfect pitch. You need a keyboard (a free piano app on your phone is fine) and about five minutes.

  1. Loop the chorus or the last few bars. Choruses and endings tend to land on the home chord.
  2. Hum the note that feels like the song could stop on it. Not the highest note, the most settled one. Keep humming it through a pause; if it still feels right in the silence, you're close.
  3. Press keys on the keyboard until one matches your hum. That's your likely tonic.
  4. Play the note three semitones above it, then the note four semitones above it, while the track plays. Three semitones up is a minor third, four is a major third. Whichever one blends tells you minor or major.
  5. Play the whole scale over the track. If nothing clashes, you've got it.

If one note keeps sounding wrong, or the scale fits but the tonic feels off, you've probably landed on the relative key. Try the note three semitones below your tonic (if you guessed major) or three above (if you guessed minor) and repeat step 4. There's a full list of these pairs in relative major and minor keys.

I usually start with the bass line before anything else. In most pop, hip hop and dance music the bass plays the root of each chord, and the note it returns to at the end of a phrase is very often the tonic. Vocals wander. Bass lines go home.

How do you tell if a song is major or minor?

Forget "happy or sad". Plenty of heartbreak songs are in major keys and plenty of party records are in minor. Use the third, as in step 4 above. It's a physical test, and it doesn't depend on your mood.

One thing trips people up. Minor-key songs often use a major chord on the fifth note of the scale because it pulls harder back to the tonic. In A minor that's an E major chord, which contains G sharp, a note that isn't in the plain A minor scale. If that single note is the only thing clashing with your minor scale, don't throw out your answer. You're almost certainly still in the minor key; the song is just using the raised seventh (that's what the harmonic minor scale is).

How to find the key with a guitar or keyboard

If you can play along, work out the chords and let them tell you. Write down the chord for each bar of a verse and a chorus. Then find a major key that contains all of them.

Every major key has the same pattern of chords built on its scale: major on the 1st, 4th and 5th notes, minor on the 2nd, 3rd and 6th, and a diminished chord on the 7th. In C major that gives you:

Scale noteCDEFGAB
ChordCDmEmFGAmBdim

Say the song loops Am, F, C, G. All four chords live in C major, which also means they live in A minor. Now you listen for which one feels like the resting point. If the loop sounds settled when it comes back round to Am, call it A minor. If it sounds like it's been waiting to get to C, call it C major. Some progressions honestly sit on the fence, and that's fine.

Two quick traps for guitarists. If the player uses a capo, the shapes lie: G shapes with a capo on the 2nd fret sound in A. And old recordings are often slightly sharp or flat of standard tuning, so your in-tune guitar can sound sour against them even when your chords are right. More on that below.

How to find the key of a song with software

The quickest route is a key detector. Drop the file into the keyandbpm analyser and it shows the key (tonic plus major or minor), the relative key, and a strength figure from 0 to 1. It runs in your browser using a WebAssembly build of Essentia, the audio library from the Music Technology Group at Universitat Pompeu Fabra, so the file is never uploaded and there's no account.

How I read the result:

DJ software such as Rekordbox, Serato and Traktor also analyses key when you import tracks, and that's fine for mixing. Whatever you use, treat the number as a strong suggestion and give it ten seconds of listening before you commit to it.

What if the record isn't tuned to A440?

Lots of older records sit somewhere between two keys because of tape speed, varispeed or the lathe. A song cut 30 cents sharp of standard pitch will make a keyboard tuned to A440 sound slightly wrong against every note, and that can send you hunting for a key that doesn't exist. The reasons are covered in why old records sound out of tune.

The analyser measures the record's own tuning first (shown as the Hz of A4 and cents from 440) and reads the key against that, so a detuned record still gets the right key name. If you're working by ear, retune your keyboard or plugin by the cents it reports and the clashes go away.

What if the key changes partway through?

Some songs modulate. The classic move is shifting everything up a semitone or a tone for the last chorus. Any tool that gives one key per file, keyandbpm included, will report whichever key dominates or a compromise between them. If you suspect a change, trim the section you care about and check it on its own, or just use your ear on that part.

Which method should you use?

My honest take: use software for speed and your ear for the final call. If you're tagging a few hundred tracks for a DJ set, let the detector do it and spot-check anything with a low strength. If you're sampling or writing a part over a song, spend the five minutes with a keyboard, because you'll need to know where the notes are anyway. And if you're matching a loop rather than a full song, the process is a bit different; see what key is this sample in.

Questions people ask

Can I find the key of a song without an instrument?

Yes. Use a free piano app to match the note you hum, or drop the file into a key detector. The humming and third test works on any instrument that can play single notes, including a phone keyboard.

Is the key of a song always its first chord?

No. Plenty of songs open on another chord, such as the IV or the vi. The last chord of the song or chorus is a better clue, and the note that feels like rest is the real test.

What's the difference between A minor and C major?

They use the same seven notes, but A minor treats A as home and C major treats C as home. That shared note set is why they're called relative keys and why detectors sometimes swap them.

Do I need perfect pitch to find a song's key?

No. Relative pitch is enough: you only need to hear whether a note you play matches the one you hum and whether it clashes with the track. Most producers who do this daily don't have perfect pitch.

Why does a website list a different key for the same song?

Usually it's the relative key, a key a fifth away, or a version of the song at a different speed or tuning. Check which of those relationships the two answers have before assuming either is wrong.