Maurisson Music Hub

Music HubGuidesFinding your key › Finding the key of a song

Theory guide·20 min read

Finding the key of a song

Finding the key of a song means cross-checking several clues rather than relying on just one. The most reliable clue is your ear: the tonic is the note or chord the song genuinely settles on, usually the very last chord rather than the first, and the dominant chord, built a fifth above it, confirms it through its characteristic pull toward resolution. On a score that carries a key signature, that signature only narrows things down to two candidates, a major key and its relative minor, never more; choosing between the two means listening for the real tonic and looking, in the chart, for a major dominant chord, the telltale sign of a minor key. On a chart with no key signature at all, taking inventory of every chord used and checking it against the seven degrees a candidate key should produce takes over. Some songs slip out of this system altogether: modal songs, in Dorian or Mixolydian, don't fit into any of the twenty-four classic keys, and others switch tonal centre outright partway through, most famously through the key change that closes so many pop ballads. Run in this order, these checks almost always converge quickly on a single reliable answer.
Open the Music Hub →

The central clue: the tonic, the note where the music comes to rest

Before even thinking about a key signature or a chord, the very first thing to look for is the tonic: the note or chord the music naturally falls back to, the one that makes a phrase feel finished rather than left hanging. The most reliable way to spot it by ear is to listen to the very last chord of the song, or the resting point that closes each chorus: that is almost always where the real tonic hides, far more than in the first chord of the intro. Plenty of songs deliberately start somewhere else, on the subdominant or on what will later turn out to be the relative minor, precisely to create an opening tension before the ear settles down; looking for the tonic in the very first chord heard is the single most common beginner mistake.

This idea that a tonic is identified through a listening relationship, independent of the exact note name, is nothing new: it is exactly the principle behind tonic sol-fa, a sight-singing method developed in the nineteenth century by the Englishwoman Sarah Anna Glover and later popularised by John Curwen from his 1843 manual, which assigns the syllable "doh" not to a fixed pitch but to the tonic of whatever key is currently in play: unlike "fixed doh", which always names the same piano key, "movable doh" shifts with the key and trains the ear to hear functions rather than isolated notes. Mentally singing this "movable doh" on the note you suspect is the tonic, then checking that it sounds like a stable point of arrival every time it comes back in the song, remains the most direct exercise for building this listening reflex, well before pulling out a chord chart or counting sharps.

The dominant chord: the signal that points to the tonic

Once a candidate tonic emerges, the best way to confirm it is to look, within the song, for the chord built a perfect fifth above it: the dominant. This chord almost always contains the leading tone, the note sitting a semitone below the tonic, the one that seems desperate to climb and resolve onto the tonic itself. It is this mechanical tension, a leading tone pulling toward the tonic, that makes the dominant-to-tonic move recognisable above all others, even to an ear that knows no note names at all: the instant that tension chord releases onto a resting chord, that resting note is, in the vast majority of cases, the tonic itself.

This relationship between tonic, dominant and subdominant is no aesthetic accident: it sits at the heart of the system theorised by the French composer and theorist Jean-Philippe Rameau in his 1722 Traité de l'harmonie, the first work to explain tonal harmony through a coherent system grounded in the acoustic properties of the chord itself, rather than in counterpoint rules inherited from earlier polyphony. Rameau codifies there the idea that certain chord progressions, cadences, produce a feeling of resolution, and that the dominant chord naturally calls for the tonic chord. Introduced into Germany a few decades later by the theorist Friedrich Wilhelm Marpurg, these ideas then ran through the next three centuries of Western harmonic practice, right down to the simplest chord chart of a present-day pop song: the reflex of reaching for the dominant to confirm a tonic traces back, without exaggeration, to this eighteenth-century theorising.

In a chart where the tonic itself is ambiguous, the dominant chord is often still the clearest clue: in a minor key, the expected dominant is actually a major chord, not the minor chord the natural minor scale would suggest, precisely because the leading tone has to be raised a semitone to produce that pull toward resolution. Spotting a major chord built a fifth above an otherwise minor tonic is therefore not an anomaly to fix: it is, on the contrary, the most reliable sign that you are dealing with a minor key rather than its relative major.

Reading the key signature: a quick clue, never enough on its own

On a score that genuinely carries a key signature, reading it is by far the fastest shortcut for narrowing the problem down: the Music Hub guide "Understanding keys and key signatures" covers the full method in detail, but in short, the last sharp plus a semitone, or the second-to-last flat, gives the name of the matching major key in a few seconds. The catch is that this shortcut only ever narrows things down to two candidates, a major key and its relative minor, never a single one: a signature with two sharps still doesn't say whether a song is in D major or B minor, and you have to switch to listening for the tonic and the dominant, as described above, to settle between the two.

There is an even bigger limitation: a good share of the chord charts musicians actually use, especially the song sheets and tabs circulating online, carry no key signature at all. Many of these documents write the chords directly with their alterations spelled out in full, using letter-name chord symbols, without ever placing a clef or sharps at the head of the staff: on that kind of document, the key-signature method is simply unusable, for lack of any signature to read. It is precisely in this situation, very common for anyone playing from a chart rather than a classical score, that the chord-inventory method described in the next section takes over, since it depends on neither a clef nor a key-signature symbol to work.

The chord-inventory method: listing the chart to find the key

Faced with a chart that carries no key signature, the most systematic method is to list every distinct chord that appears in it, then check that list against the seven chords each major key naturally produces, one on each degree of the scale.

The seven diatonic chords of a major key, degree by degree
DegreeChord typeNameRole in the chart
IMajorTonicResting chord; often the very first and very last chord of the chart
iiMinorSupertonicSets up the subdominant or dominant, rarely a resting point
iiiMinorMediantUnderstated, mostly serves as a passing chord between I and IV or vi
IVMajorSubdominantA frequent starting chord for a phrase, never a true resting point
VMajorDominantThe strongest signal: its tension almost always calls for a return to the tonic
viMinorRelative minorOften mistaken for a tonic in its own right if the song lingers on it
vii°DiminishedDiminished leading-tone chordExtremely rare as a resting chord, mostly a brief passage toward I

This comparison works both ways. If every chord in a chart matches exactly the seven degrees of a candidate key, the question is settled: all that's left is to spot which of those seven chords plays the role of the real resting point, usually the one that opens and closes the chart, or the one it lingers on longest. If, on the other hand, a chord in the chart matches none of the seven expected degrees, two explanations remain possible: either the candidate key is the wrong one and the inventory needs to start over on another hypothesis, or that chord is a deliberate borrowing, what's called a "borrowed" chord or a secondary dominant, a harmonic colour knowingly borrowed from another key for a bar or two without the song's tonal centre actually changing. A single passing chord doesn't necessarily invalidate the hypothesis; several recurring foreign chords, on the other hand, almost always signal that you need to look elsewhere.

The most useful clue in this inventory remains frequency: the chord that comes back most often in the chart, and that closes the largest number of musical phrases, is a serious candidate for the tonic, far more reliable than a simple count taken in isolation. Conversely, a minor chord that shows up only once or twice, in a passing position between two more stable chords, almost always matches one of the secondary degrees in the table above rather than a rival second tonal centre.

Major or relative minor: settling the classic mix-up, by ear and on the chart

The most common mix-up, once the key signature or chord inventory is in hand, remains choosing between a major key and its relative minor: the two share exactly the same seven notes and, on a chart with no key signature, often the same seven basic chords. Three concrete checks settle it, in this order of decreasing reliability.

The first, already described above, remains the most reliable: listen for which chord the song actually closes on, usually the very last chord of the chart or just before the final silence. The second is to look, within the chart itself, for a major dominant chord built a fifth above the minor candidate: its presence, described in the previous section, is an almost certain signature of a minor centre, since a major key never produces that exact chord on that degree. The third is to notice how long the chart lingers on each of the two candidate chords: a song that opens on the minor candidate, returns to it at the end of every phrase and closes on it is very likely genuinely centred on that key, even if its theoretical signature matches the major.

A classic mistake is to trust the song's overall emotional feel rather than these concrete checks: a slow tempo, sparse orchestration or melancholy lyrics can make a structurally major song feel minor, and conversely a fast tempo or dense orchestration can mask a genuinely minor centre. That feeling is a useful starting point for forming a hypothesis, never proof: only the tonic actually heard, and the presence or absence of that characteristic major dominant, allow you to conclude with certainty.

Not every chart fits neatly into one of the twenty-four classic major or minor keys: a good deal of folk, rock and Celtic- or blues-flavoured pop rests on a different mode, particularly Dorian or Mixolydian, which the Music Hub guide "Dorian and Mixolydian modes for improvising" covers in depth. The clearest sign of a Mixolydian song is a major chord built on the seventh degree that stubbornly refuses to behave like a leading tone: instead of climbing to resolve onto the tonic the way a genuine dominant chord would, it just sits there, almost as stable as the tonic itself, without creating the slightest pull toward resolution. A song that sounds broadly major but where the ear waits in vain for that usual resolving tension is an excellent Mixolydian candidate.

The Dorian signal, by contrast, hides around the sixth degree: a chart that sounds broadly minor, but where a brighter, almost upbeat colour appears, carried by a major sixth degree where the natural minor scale would call for a minor sixth, leans toward Dorian rather than classic minor. That colour, neither fully dark nor fully bright, explains why so many rock songs that sound "minor, but a bit too cheerful to really be minor" are actually written in this mode rather than in a genuine minor key.

Trying to force the classic method regardless, dominant-to-tonic or major-versus-relative-minor, onto a genuinely modal song consistently produces frustration: the ear will wait in vain for the resolution a real V-I should deliver, or will hesitate endlessly between major and minor without ever really settling it, simply because the song doesn't rest on either logic. Recognising that stuck feeling, rather than forcing a wrong answer, is itself useful information about the nature of the song.

Key changes partway through: spotting a modulation

A single song doesn't always stay in one key from start to finish: a bridge, a final chorus or an improvised section can perfectly well swing toward a different tonal centre, a modulation.

Types of mid-song key change
Type of modulationHow it happensEffect on the ear
Pivot-chord modulationA chord shared by both keys acts as a hinge, reinterpreted along the wayA smooth transition, almost imperceptible in the moment
Modulation to the relative keySwitches between a major key and its relative minor, or the reverseA change of colour, but the theoretical key signature doesn't move
Modulation to the dominantThe new centre sits a fifth above the old oneCommon in classical music and jazz, a rising sense of tension
End-of-song key changeA direct switch, with no transition, up a semitone or a whole toneAn immediate, recognisable effect, heavily used in 1970s-1980s pop ballads and at Eurovision

The most discreet of these modulations goes through a pivot chord, a chord shared by both keys that the ear reinterprets along the way without ever perceiving a clean break: the transition happens smoothly, almost by surprise, and is really only heard in hindsight, by comparing the end of the song to its very beginning. By contrast, the most blatant modulation, and by far the most recognisable by ear, is the sudden key change that closes certain pop ballads, a direct jump of a semitone or a whole tone upward, with no transition or pivot chord, usually brought in just before the very last chorus. This trick, so common in 1970s and 1980s pop ballads and at the Eurovision Song Contest that English-speaking musicologists have given it its own mocking nickname, the "Truck Driver's Gear Change", hits the listener immediately: an almost physical sense of lift at the exact moment of the jump, with no need to know a single note name to notice it.

To spot a modulation while analysing a song, it's best to give up wanting a single answer for the whole piece and instead redo the tonic-and-dominant listening exercise separately for each clearly distinct section, verse, bridge, final chorus. A chart that seemed shaky or inconsistent when analysed as one block often becomes perfectly coherent once split into two or three successive tonal zones, each treated as its own detection problem.

What software does: how an algorithm finds the key

Automatic computer key detection, used by transcription and audio-analysis software, has rested since the 1990s on a single family of methods, pioneered by the researchers Carol Krumhansl and Edward Schmuckler. The idea starts from a music-psychology experiment: listeners rated, on a scale, how well each note seemed to fit after hearing a context that established a given key. These averaged ratings form what's called a key profile; for a major key, starting from the tonic and moving up semitone by semitone, the values obtained are 6.35, then 2.23, 3.48, 2.33, 4.38, 4.09, 2.52, 5.19, 2.39, 3.66, 2.29 and 2.88.

The Krumhansl-Schmuckler major-key profile (empirical values, example in C major)
Degree from the tonic (semitones)Note in C majorProfile value
0C6.35
1D♭2.23
2D3.48
3E♭2.33
4E4.38
5F4.09
6F♯2.52
7G5.19
8A♭2.39
9A3.66
10B♭2.29
11B2.88

On an actual audio recording, the algorithm slices the signal into short frames analysed with a Fourier transform, sorts the detected energy into each of the twelve pitch classes, C, C sharp, D, and so on, then adds up those values over the whole length of the song to get a histogram, often called a chroma vector. That vector is then compared, through a simple statistical correlation, against twenty-four reference profiles, one for each major and minor key; whichever key's profile best matches the song's histogram is picked as the answer. A more recent variant, developed by the theorist David Temperley, replaces the profiles drawn from listeners' subjective ratings with profiles calculated statistically from a large corpus of popular melodies actually labelled by key, a Bayesian approach that treats key detection as a probability problem rather than a simple correlation.

These methods now reach a reliability of roughly 85 to 90 percent on mainstream music, a figure that can be surprising given how simple the task seems once the tonic has been spotted by human ear. The cases where the algorithm gets it wrong are, tellingly, exactly the ones that trip up a musician too: a modulation partway through a song that the software averages out over the whole duration instead of detecting, or a persistent ambiguity between a major key and its relative minor, two profiles so close statistically that a small shift in the mix is enough to tip the correlation one way or the other. Far from being a magic shortcut, this family of algorithms runs into the exact same two difficulties detailed earlier in this guide.

The full method, in order: a checklist so you never hesitate again

Taken separately, each of the previous methods leaves some margin of uncertainty; combined in a logical order, they generally converge very quickly on a single reliable answer. Faced with an unfamiliar song, the most effective order is this: first check whether a key signature is written anywhere and, if so, pull out the two possible candidates, a major key and its relative minor; then listen to the very last chord of the song to identify the real tonic rather than trusting the first chord heard; next look, in the chart or by ear, for the dominant chord that confirms that tonic through its characteristic pull toward resolution; if needed, draw up the full inventory of the chart's chords to check that they do match the seven expected degrees of that key; ask whether a chord on the seventh or sixth degree resists that pattern, a possible sign of a modal colour rather than a classic key; and finally, if the chart still seems inconsistent taken as one block, split it into sections and redo the exercise separately for each, in case of a modulation partway through.

None of these six steps is foolproof on its own, whether for an experienced musician or the most sophisticated algorithm: it is their overlap, far more than any single one taken alone, that turns a fragile hypothesis into certainty. With practice, most of these checks happen in a few seconds without conscious thought; starting out, it's better to run through them one by one, in order, rather than guessing on instinct and getting it wrong on half of the less obvious songs.

Common pitfalls to avoid

MistakeLooking for the tonic in the very first chord of the song rather than in its real resting point.

Why — Plenty of songs deliberately open on a chord other than the tonic, the subdominant or what will later turn out to be the relative minor, to create an opening tension before the ear settles down; stopping at the first chord heard throws off the whole rest of the analysis.

Do this instead : Listen first to the very last chord of the song, or the resting point that closes each chorus, rather than the opening chord of the intro.

MistakeTrusting the key signature of a score or tab found online without ever checking it by ear.

Why — Many charts published online carry wrong key signatures, copied from one transcription to the next without ever being replayed, and a large share of chord sheets simply carry no key signature at all, relying instead on alterations spelled out chord by chord.

Do this instead : Treat any key signature you see as a starting point to confirm, never as a certainty, and always cross-check it against the tonic actually heard and the dominant chord.

MistakeJudging major versus minor purely from the song's emotional feel, happy versus sad.

Why — A slow tempo, sparse orchestration or melancholy lyrics can make a structurally major song feel minor, and vice versa; the overall feel depends on at least as many factors as the key's mode alone.

Do this instead : Objectively check which chord the song closes on and whether the chart contains a major dominant chord characteristic of minor, rather than trusting the overall impression.

MistakeForcing a modal song, Dorian or Mixolydian, into whichever classic major or minor box seems closest.

Why — A major seventh-degree chord that refuses to behave like a leading tone, or an unexpected major sixth degree in an otherwise minor chart, aren't anomalies to fix but the signatures of a mode: ignoring them leads to misreading one or two whole chords in the chart.

Do this instead : If the ear waits in vain for the resolving tension of a genuine dominant chord, consider a modal colour rather than forcing one of the twenty-four classic keys at any cost.

MistakeAnalysing a whole song as a single key when it actually modulates partway through.

Why — A bridge or a final chorus can perfectly well swing toward a different tonal centre, notably through the sudden key change that closes so many pop ballads; looking for a single answer valid for the whole song amounts to averaging out two keys that each only exist over part of the song.

Do this instead : Split the song into clearly distinct sections, verse, bridge, final chorus, and redo the detection exercise separately for each rather than demanding a single answer.

Explore in the Music Hub

More guides

It is all in the app, for free

The Music Hub gathers over 2 597 songs with chords, click-to-hear piano, transposition and a capo helper. Free, no account required.

Open the Music Hub →

Frequently asked questions

What's the fastest way to find the key of a song by ear?

First look for the tonic by listening for the chord the song naturally falls back to, almost always the very last chord rather than the first; then confirm it with the dominant chord, a fifth above, which should sound like a tension calling for that resting point. These two clues are enough to settle the vast majority of popular songs, without reading a single note of sheet music.

How do you tell a major key apart from its relative minor?

The key signature alone can never settle it, since it is exactly the same for both keys. You have to listen for the tonic actually heard at the end of the song and look, in the chart, for a major dominant chord containing the leading tone of the harmonic minor: its presence almost always signals that the real centre is the relative minor rather than the major key sharing the same signature.

What is the dominant chord, and why does it help so much in finding the key?

It's the chord built a perfect fifth above the tonic; it contains the leading tone, the note a semitone below the tonic that calls for its own resolution. This mechanical pull toward resolution, theorised as early as 1722 by Jean-Philippe Rameau in his Traité de l'harmonie, makes the dominant-to-tonic move recognisable even without knowing the names of the notes involved.

How does transcription software automatically detect the key of a song?

It slices the audio into short frames, sorts the detected energy into the twelve pitch classes to build a histogram, then compares that histogram, through statistical correlation, against the twenty-four reference profiles established by Krumhansl and Schmuckler from listener judgements. Whichever key's profile fits best is picked, with a reliability of roughly 85 to 90 percent on mainstream music.

How can you tell a song is modal rather than in a classic major or minor key?

The clearest sign is a chord meant to play the role of dominant or leading tone that refuses to resolve as expected: a major seventh degree that stays stable instead of climbing toward the tonic, typical of the Mixolydian mode, or an unusually major sixth degree in an otherwise minor chart, typical of Dorian.

What should you do when the key changes partway through a song?

Give up wanting a single answer for the whole song and redo the tonic-and-dominant listening exercise separately for each clearly distinct section, verse, bridge, final chorus: a chart that seemed inconsistent when analysed as one block often becomes perfectly clear once split into successive tonal zones.