How accurate is automatic song key detection?
A key finder can name the exact key, a close neighbour or something unrelated. We tested automatic key detection on 1,441 songs with published keys to see how often each happens, which genres are hardest and what a near miss means for a DJ mix.
The short answer
On 1,441 songs, automatic key detection named the exact published key 57.7% of the time. Another 17.5% were the closest possible neighbours: a fifth away, or the relative major or minor. Those keys share almost all of their notes with the right one. Together, three readings in four (75.2%) would still mix in key on the Camelot wheel.
The remaining quarter splits between the right home note in the wrong mode (8.2%) and keys with no close relation (16.7%). Those are the readings worth checking by ear before you rely on them.

What we tested
We test the analysis behind our music tools on public research collections whose keys were set by people. For this guide we used 604 electronic dance tracks from GiantSteps Key, annotated from corrections submitted by users of a music store, and 837 songs in nine genres from GTZAN with published key annotations. GTZAN’s classical recordings have no key labels, so they are not included.
Each reading was sorted into the categories used in key-detection research. The examples below assume a song in A minor, Camelot code 8A.
| Reading | Example | Share | On the Camelot wheel |
|---|---|---|---|
| Exact key | A minor | 57.7% | Same code: 8A |
| A fifth away | E minor or D minor | 11.0% | One step around the wheel: 9A or 7A |
| Relative major or minor | C major | 6.5% | Same number, other letter: 8B |
| Same home note, other mode | A major | 8.2% | Three steps away, other letter: 11B |
| Unrelated key | For example B-flat minor | 16.7% | Far from 8A: 3A |
Why near misses happen
A key is a set of notes plus a home note that the music keeps returning to. C major and A minor use exactly the same seven notes; only the home note differs. Keys a fifth apart share six of their seven notes. A detector hears which notes are present and how strongly, and when the home note is not emphasised clearly, it can land on one of these neighbours.
Major and minor were the other common confusion. Of the songs labelled major, 27% were read as minor, and 24% of the minor songs were read as major. Blues and rock often mix major and minor thirds on purpose, and many songs use modes such as Dorian or Mixolydian that sit between the two.
What a near miss means for a DJ mix
The Camelot wheel numbers the 24 keys so that compatible keys sit next to each other. The same number with the other letter is the relative key, and one step around the wheel is a fifth away. That is why most near misses are harmless for mixing: if a track is really 8A and the reading says 9A or 8B, a transition planned from that reading will usually still sound in key.
The risky readings are the other two groups. A reading with the same home note in the other mode, such as 8A read as 11B, sits three steps away and can clash with the melody. An unrelated reading can clash outright. If a transition sounds sour, check the key before blaming the EQ or the beat match.
Some genres are much harder
| Genre | Songs | Exact key | Exact or a Camelot neighbour |
|---|---|---|---|
| Country | 99 | 78% | 92% |
| Reggae | 97 | 69% | 88% |
| Pop | 94 | 69% | 85% |
| Metal | 93 | 67% | 80% |
| Rock | 98 | 60% | 77% |
| Disco | 98 | 56% | 74% |
| Electronic dance music (GiantSteps) | 604 | 55% | 77% |
| Jazz | 79 | 53% | 71% |
| Blues | 98 | 46% | 49% |
| Hip hop | 81 | 35% | 49% |
Country and pop songs, with clear chords and melodies that settle on the home note, were the easiest. Hip hop and blues were the hardest: fewer than half of their readings were the exact key or a neighbour. Hip hop often rests on drum loops, samples and tuned bass with little harmony to analyse, and blues deliberately blends major and minor.
Electronic dance music sat in the middle, with 55.0% exact and 76.5% exact or a Camelot neighbour. It had more relative-key readings (9.8%) than the mixed-genre collection (4.1%), a near miss that is harmless for mixing.
Check a key by ear in two minutes
- Play the chorus and hum the note that feels like home: the one a phrase wants to end on.
- Find that note on a piano or keyboard app. If it matches the detected home note, the reading is at least close.
- Play the detected chord with the song, then the same chord in the other mode, for example A minor and then A major. The right one blends; the wrong one sounds sour against the vocal.
- If neither fits, try the relative key (A minor and C major) and the keys one step around the Camelot wheel.
- For DJ preparation, play the transition you plan to use for 16 bars before relying on the label in a set.
Reading the result in Song Key Finder
Song Key Finder shows the detected key with its Camelot code and the song’s tempo. Use the Camelot Wheel to see which keys sit next to it, and BPM Finder if you also need the half and double tempo readings.
Tempo has its own near misses. Read why a BPM finder shows half or double the tempo, and what a genre finder’s confidence score really means.
References
GiantSteps Key: Knees et al., “Two data sets for tempo estimation and key detection in electronic dance music annotated from user corrections”, ISMIR 2015.
GTZAN: Tzanetakis and Cook, “Musical genre classification of audio signals”, IEEE Transactions on Speech and Audio Processing, 2002. Key labels: the GTZAN key annotations.
Scoring categories: the key evaluation in mir_eval.
Known limits of GTZAN: Sturm, “The GTZAN dataset: Its contents, its faults, their effects on evaluation, and its future use”, 2013.