Logo Computer scientist,
engineer, and educator
• Articles • Music articles

How many major keys are there?

It's not, I hope, as daft a question as it might first appear. Among contemporary musicians, particularly in the jazz and rock genres, it's generally accepted that there are twelve major keys — one for each semitone in the octave.

C Db D Eb E F F#/Gb G Ab A Bb B
Table 1: Standard jazz/rock major keys

There's a certain amount of ambiguity regarding the choice of F# or Gb although, to be honest, both are keys approached with some trepidation by many musicians. Of course, in modern (equally tempered) tuning practice, Gb and F# sound the same, so the choice of which to use in a particular piece of music is made on criteria other than accoustic ones.

If Gb and F# are the same note in modern tuning ('enharmonically equivalent' in the theory textbooks) the same can, of course, be said for C# and Db, and many other note pairs. In modern practice the difference between C# and Db is only one of name, although the same might not have been true in the 18th century. But it's pretty rare to see a piece of music written in the key of C# — Db is the more common choice, at least since the 19th century.

Does the existence of the key of C# (and other enharmonically equivalent notes) mean that there are more than twelve major keys? That depends on whether we are focussing on academic completeness or expediency. There are, in principle, as many major keys as we want.

There are 21 major keys that can be written with a keynote spelled with no more than one sharp or flat — three for each of the note names A, B, C, etc. For completeness these are listed in table 2.

C C# Db D D# Eb E E# Fb F F# Gb G G# Ab A A# Bb B B# Cb
Table 2: Major keys whose keynote has no more than one sharp or flat

Some of these keys are pretty impractical, because they can't be written neatly using a conventional key signature. For example, the key of G# major has the scale notes shown in table 3.

G# A# B# C# D# E# F##
Table 3: Notes of the scale of G# major

The presence of the F## makes writing music in this key a bit awkward, particularly when the same (enharmonically the same, anyway) music can be written in Ab (four flats).

It's interesting to look at which of the 21 major keys in table 2 can be written using a conventional key signature, and which can not (see table 4).

Key signature
Major key
7 flats Cb
6 flats Gb
5 flats Db
4 flats Ab
3 flats Eb
2 flats Bb
1 flat F
None C
1 sharp G
2 sharps D
3 sharps A
4 sharps E
5 sharps B
6 sharps F#
7 sharps C#
Table 4: Conventional key signatures and their major key assignments

There are, of course, 15 conventional key signatures: 1-7 sharps, 1-7 flats, and no sharps or flats. But if there are only twelve major keys in common (contemporary) use, then some of them must be redundant. That is, indeed, the case — C# and Db are equivalent, as are B and Cb, and F# and Gb. Pragmatically, the choice which of the equivalent pairs to use is straightforward, except in the case of F#/Gb: C# requires seven sharps but the equivalent Db needs only five sharps; Cb needs seven flats, but the equivalent B needs only five sharps. It's only F#/Gb that creates uncertainty, because both need six sharps or flats.

Our modern preference for Db over C# is understandable and yet, oddly enough, was not always followed in the past. One of the most influential composers to work with a complete range of keys in the modern sense was JS Bach. His Well-Tempered Clavier has in each book twelve pieces in each of the major keys corresponding to semitones in the octave. But Bach preferred C# (seven sharps) to Db (five flats), at least in that work. Interestingly, Bach does use five flats for Bb minor, rather than the seven sharps of A# minor. So it's the key, rather than the key signature, he prefers for the major keys. But that's an aside.

21 major keys is a lot (compared to the twelve that are commonly used), but it's still not as many as 'as many as we want'. In fact, there's no theoretical reason to limit ourselves to the keys whose key note has no more than one sharp or flat. Table 5 shows the scale notes of the key of Ebb (E double flat).

Ebb Fb Gb Abb Bbb Cbb Db
Table 5: Notes of the scale of Ebb major

Of course, Ebb is enharmonically identical to D, and it's doubtful that even in the days before equal temperament there was any practical distinction between D and Ebb. Nevertheless, it's a perfectly valid key in its own right. It's even possible to conceive of keys with triple sharps or triple flats or more, although their practical application is limited, to say the least.

The fact that a key cannot be represented by a key signature does not prevent its use, although the question naturally arises whether such a use is justified. There needs to be strong theoretical grounds to write in the key of G#, which has no key signature, compared to Ab, which is a straightforward four flats. In fact, the same is true for unpopular keys like Cb, compared to the more manageable B. But these theoretical constraints do arise from time to time.

Consider the common musical device of modulation to the subdominant key. For example, in the key of C major we might sound the notes C, E, and Bb (to make a C7 chord), and follow with the notes F and A, in some order or other. At this point we are, at least transiently, suggesting the key of F major. Whether the music continues in the key of F or slips back into C or some other key depends on the composer's intentions, but nevertheless this modulation to the subdominant (fourth note of the scale) is one of the most widely used and recognized effects in Western music.

Now consider a piece of music which is predominantly in the key of Gb. If there is a modulation to the subdominant, we are in the key of Cb and most emphatically not in the key of B. The fourth note of the scale of Gb is Cb, not B. To notate the music following the transposition as if it were in the key of B would simply be wrong, however much easier it would be for the performer. Furthermore, if the music undergoes a further modulation to the subdominant, it will now be in the key of (gulp) Fb major. At this point, at least in the world of jazz, there is a tendency to say 'enough is enough', and normalize the notation as if it were in the key of E.

This expediency was less common in the baroque era. Consider, for example, the C# fugue from book II of the Well-Tempered Clavier. Like most fugues, there is a modulation to the dominant key in the first few bars of the piece (bar 4 in this case). Like modulation to the sub-dominant, modulation to the dominant is a well-recognized musical device, and the dominant key of C# is G#, not Ab. The piece therefore has a profusion of F## notes. In bar 14 onwards we also have C## notes, indicating that the key centre is now D#, an even nastier key to write in. This section of music could easily enough have been written as if it were in Eb (although this might have required a change of key signature). But Bach does not do this sort of thing. Beethoven, on the other hand, was equally-tempered to the core, and there are examples (albeit only a few) in his orchestral music of his writing for one instrument in one key and another in the equivalent one (A# and Bb, for example).

In summary, the number of major keys that exist is, in theory, unlimited, but the use of equally-tempered tuning has reduced the number of keys to twelve or so on pragmatic grounds, not theoretical ones.

Comments welcome, as always.

Copyright © 1994-2013 Kevin Boone. Updated Apr 26 2012