How to use the key finder
- Choose whether your list holds notes or chords.
- Type or paste them, separated by spaces or commas. Notes use letters A to G with # or b, such as F# or Bb, and octave numbers are ignored. Chords can be C, Am, G7, Fmaj7, Bdim, Dsus4 or C/E.
- Read the headline for the keys that contain every note, and the table of the best eight keys with their scale notes and any notes outside the key.
- Use the ranking order to choose between keys that share the same notes.
Formula
major scale steps: 2 2 1 2 2 2 1 natural minor steps: 2 1 2 2 1 2 2
a key fits when every pitch class of your notes is in its seven-note scale
rank by fewest notes outside, then tonic chord notes present, then first or last note, then major first
Each note becomes one of 12 pitch classes, from C = 0 to B = 11, and chords are broken into their notes. All 12 major and 12 natural minor keys are tested against them. Relative major and minor keys share the same seven notes, so only the tie-break tells them apart.
A tune built on five notes
The default list C E G A C D E G A has five different pitch classes: C, D, E, G and A. Six keys contain all of them: C major, A minor, F major, G major, D minor and E minor. The best match is C major, then A minor, because the tune starts on C and ends on A.
Adding a note outside those keys changes the answer. The list C E G A# D fits D minor and F major exactly, because A# is the same note as Bb. The chords C, Am, F and G7 fit C major and A minor.
Why more than one key can fit
A key is a set of seven notes, and many tunes use only some of them. A tune that uses five notes of a scale fits every key whose scale contains those five. A pentatonic melody, for example, fits several keys at once. Only the music itself, such as where it rests and which chords it uses, shows which key is meant.
The ranking uses the tonic chord and the first and last notes as hints. They are rules of thumb and not proof. For the sharps and flats of each key, see the Circle of Fifths, and to move a chord chart to another key, the Chord Transposer.
What this page does not detect
Only major and natural minor keys are tried, so a tune in a mode such as Dorian or in harmonic minor may show a note outside the best key. Passing notes and borrowed chords do the same. The list of scale notes on each row helps you see whether the outside notes are just decoration. The Musical Scale Generator lists the notes of any scale, and the Chord Progression Generator suggests progressions in a key.
More hobby and sport tools
For other hobbies, sports and music, try the Maidenhead Locator Converter, Poker Chip Distribution Calculator and Cycling Climb Speed Calculator.
Assumptions and limits
- Notes are treated as pitch classes, so C# and Db are the same note, and octaves are ignored.
- Only 12 major and 12 natural minor keys are searched.
- Chords are read with a fixed list of qualities; unknown chord names are refused.
- The ranking among tied keys is a convention and not a musical verdict.
Frequently asked questions
What is a relative minor?
The minor key that shares the notes of a major key, starting on its sixth note. A minor is the relative minor of C major, and both use no sharps or flats.
Why does my melody fit so many keys?
It uses few different notes. Every key that contains all of those notes fits. Add more of the tune, especially notes that are rare, to narrow the choice.
Does it handle sharps and flats in key names?
Yes. Keys are named with the usual choice of sharps or flats, such as F# major and Db major, and the scale notes on each row are spelled correctly for that key.
Can I enter lyrics or tab?
No. Enter note names or chord names only. A line of tab or lyrics is not understood, and the page names the entry it could not read.