In music theory, the circle of fifths is a way of organizing the 12 chromatic pitches as a sequence of perfect fifths. If C is chosen as a starting point, the sequence is: C, G, D, A, E, B (=C♭), F♯ (=G♭), C♯ (=D♭), A♭, E♭, B♭, F. Continuing the pattern from F returns the sequence to its starting point of C. This order places the most closely related key signatures adjacent to one another. It is usually illustrated in the form of a circle.
The circle of fifths organizes pitches in a sequence of perfect fifths, generally shown as a circle with the pitches (and their corresponding keys) in a clockwise progression. Musicians and composers often use the circle of fifths to describe the musical relationships between pitches. Its design is helpful in composing and harmonizing melodies, building chords, and modulating to different keys within a composition.^{[1]}
Using the system of just intonation, a perfect fifth consists of two pitches with a frequency ratio of 3:2, but generating a twelve perfect fifths in this way does not result in a return to the pitch class of the starting note. To adjust for this, instruments are generally tuned with the equal temperament system. Twelve equaltemperament fifths lead to a note exactly seven octaves above the initial tone—this results in a perfect fifth that is equivalent to seven equaltemperament semitones.
The top of the circle shows the key of C Major, with no sharps or flats. Proceeding clockwise, the pitches ascend by fifths. The key signatures associated with those pitches also change: the key of G has one sharp, the key of D has 2 sharps, and so on. Similarly, proceeding counterclockwise from the top of the circle, the notes change by descending fifths and the key signatures change accordingly: the key of F has one flat, the key of B♭ has 2 flats, and so on. Some keys (at the bottom of the circle) can be notated either in sharps or in flats.
Starting at any pitch and ascending by a fifth generates all twelve tones before returning to the beginning pitch class (a pitch class consists of all of the notes indicated by a given letter regardless of octave—all "C"s, for example, belong to the same pitch class). Moving counterclockwise, the pitches descend by a fifth, but ascending by a perfect fourth will lead to the same note an octave higher (therefore in the same pitch class). Moving counterclockwise from C could be thought of as descending by a fifth to F, or ascending by a fourth to F.


Each of the twelve pitches can serve as the tonic of a major or minor key, and each of these keys will have a diatonic scale associated with it. The circle diagram shows the number of sharps or flats in each key signature, with the major key indicated by a capital letter and the minor key indicated by a lowercase letter. Major and minor keys that have the same key signature are referred to as relative major and relative minor of one another.
Tonal music often modulates to a new tonal center whose key signature differs from the original by only one flat or sharp. These closelyrelated keys are a fifth apart from each other and are therefore adjacent in the circle of fifths. Chord progressions also often move between chords whose roots are related by perfect fifth, making the circle of fifths useful in illustrating the "harmonic distance" between chords.
The circle of fifths is used to organize and describe the harmonic function of chords. Chords can progress in a pattern of ascending perfect fourths (alternately viewed as descending perfect fifths) in "functional succession". This can be shown "...by the circle of fifths (in which, therefore, scale degree II is closer to the dominant than scale degree IV)".^{[2]} In this view the tonic is considered the end point of a chord progression derived from the circle of fifths.
According to Richard Franko Goldman's Harmony in Western Music, "the IV chord is, in the simplest mechanisms of diatonic relationships, at the greatest distance from I. In terms of the [descending] circle of fifths, it leads away from I, rather than toward it."^{[3]} He states that the progression I–ii–V–I (an authentic cadence) would feel more final or resolved than I–IV–I (a plagal cadence). Goldman^{[4]} concurs with Nattiez, who argues that "the chord on the fourth degree appears long before the chord on II, and the subsequent final I, in the progression I–IV–vii^{o}–iii–vi–ii–V–I", and is farther from the tonic there as well.^{[5]} (In this and related articles, uppercase Roman numerals indicate major triads while lowercase Roman numerals indicate minor triads.)
Using the exact 3:2 ratio of frequencies to define a perfect fifth (just intonation) does not quite result in a return to the pitch class of the starting note after going around the circle of fifths. Equal temperament tuning produces fifths that return to a tone exactly seven octaves above the initial tone and makes the frequency ratio of each half step the same. An equaltempered fifth has a frequency ratio of 2^{7/12}:1 (or about 1.498307077:1), approximately two cents narrower than a justly tuned fifth at a ratio of 3:2.
Ascending by justly tuned fifths fails to close the circle by an excess of approximately 23.46 cents, roughly a quarter of a semitone, an interval known as the Pythagorean comma. In Pythagorean tuning, this problem is solved by markedly shortening the width of one of the twelve fifths, which makes it severely dissonant. This anomalous fifth is called the wolf fifth – a humorous reference to a wolf howling an offpitch note. The quartercomma meantone tuning system uses eleven fifths slightly narrower than the equally tempered fifth, and requires a much wider and even more dissonant wolf fifth to close the circle. More complex tuning systems based on just intonation, such as 5limit tuning, use at most eight justly tuned fifths and at least three nonjust fifths (some slightly narrower, and some slightly wider than the just fifth) to close the circle. Other tuning systems use up to 53 tones (the original 12 tones and 42 more between them) in order to close the circle of fifths.
Some sources imply that Pythagoras invented the circle of fifths in the sixth century B.C. but there is no proof of this.^{[6]}^{[7]}^{[8]} Pythagoras was primarily concerned with the theoretical science of harmonics and is credited with having devised a system of tuning based upon the interval of a fifth, but did not tune more than eight notes, and left no written records of his work.^{[9]}
In the late 1670s Ukrainian composer and theorist Nikolay Diletsky wrote a treatise on composition entitled Grammatika, "the first of its kind, aimed at teaching a Russian audience how to write Westernstyle polyphonic compositions." It taught how to write kontserty, polyphonic a cappella works usually based on liturgical texts and created by putting together musical sections with contrasting rhythm, meter, melodic material and vocal groupings. Diletsky intended his treatise to be a guide to composition using rules of music theory. The first circle of fifths appears in the Grammatika and it was used for students as a composition tool.^{[10]}
In musical pieces from the Baroque music era and the Classical era of music and in Western popular music, traditional music and folk music, when pieces or songs modulate to a new key, these modulations are often associated with the circle of fifths.
In practice, compositions rarely make use of the entire circle of fifths. More commonly, composers make use of "the compositional idea of the 'cycle' of 5ths, when music moves consistently through a smaller or larger segment of the tonal structural resources which the circle abstractly represents."^{[11]} The usual practice is to derive the circle of fifths progression from the seven tones of the diatonic scale, rather from the full range of twelve tones present in the chromatic scale. In this diatonic version of the circle, one of the fifths is not a true fifth: it is a tritone (or a diminished fifth), e.g. between F and B in the "natural" diatonic scale (i.e. without sharps or flats). Here is how the circle of fifths derives, through permutation from the diatonic major scale:
And from the (natural) minor scale:
The following is the basic sequence of chords that can be built over the major bassline:
And over the minor:
Adding sevenths to the chords creates a greater sense of forward momentum to the harmony:
According to Richard Taruskin, Arcangelo Corelli was the most influential composer to establish the pattern as a standard harmonic "trope": "It was precisely in Corelli's time, the late seventeenth century, that the circle of fifths was being 'theorized' as the main propellor of harmonic motion, and it was Corelli more than any one composer who put that new idea into telling practice."^{[12]}
The circle of fifths progression occurs frequently in the music of J. S. Bach. In the following, from Jauchzet Gott in allen Landen, BWV 51, even when the solo bass line implies rather than states the chords involved:
Handel uses a circle of fifths progression as the basis for the Passacaglia movement from his Harpsichord suite No. 6 in G minor.
Baroque composers learnt to enhance the "propulsive force" of the harmony engendered by the circle of fifths "by adding sevenths to most of the constituent chords." "These sevenths, being dissonances, create the need for resolution, thus turning each progression of the circle into a simultaneous reliever and restimulator of harmonic tension... Hence harnessed for expressive purposes."^{[13]} Striking passages that illustrate the use of sevenths occur in the aria "Pena tiranna" in Handel's 1715 opera Amadigi di Gaula:
– and in Bach's keyboard arrangement of Alessandro Marcello's Concerto for Oboe and Strings.
During the nineteenth century, composers made use of the circle of fifths to enhance the expressive character of their music. Franz Schubert's poignant Impromptu in E flat major, D 899, contains such a passage:
– as does the Intermezzo movement from Mendelssohn's String Quartet No.2:
Robert Schumann's evocative "Child falling asleep" from his Kinderszenen springs a surprise at the end of the progression: the piece ends on an A minor chord, instead of the expected tonic E minor.
In Wagner's opera, Götterdämmerung, a cycle of fifths progression occurs in the music which transitions from the end of the prologue into the first scene of Act 1, set in the imposing hall of the wealthy Gibichungs. "Status and reputation are written all over the motifs assigned to Gunther",^{[14]} chief of the Gibichung clan:
The enduring popularity of the circle of fifths as both a formbuilding device and as an expressive musical trope is evident in the number of "standard" popular songs composed during the twentieth century. It is also favored as a vehicle for improvisation by jazz musicians.
The song opens with a pattern of descending phrases – in essence, the hook of the song – presented with a soothing predictability, almost as if the future direction of the melody is dictated by the opening five notes. The harmonic progression, for its part, rarely departs from the circle of fifths.^{[15]}
Main article: Circle progression 
The diatonic circle of fifths is the circle of fifths encompassing only members of the diatonic scale. Therefore, it contains a diminished fifth, in C major between B and F. See structure implies multiplicity. The circle progression is commonly a circle of fifths through the diatonic chords, including one diminished chord. A circle progression in C major with chords I–IV–vii^{o}–iii–vi–ii–V–I is shown below.
Main article: Chromatic circle 
The circle of fifths is closely related to the chromatic circle, which also arranges the twelve equaltempered pitch classes in a circular ordering. A key difference between the two circles is that the chromatic circle can be understood as a continuous space where every point on the circle corresponds to a conceivable pitch class, and every conceivable pitch class corresponds to a point on the circle. By contrast, the circle of fifths is fundamentally a discrete structure, and there is no obvious way to assign pitch classes to each of its points. In this sense, the two circles are mathematically quite different.
However, the twelve equaltempered pitch classes can be represented by the cyclic group of order twelve, or equivalently, the residue classes modulo twelve, . The group has four generators, which can be identified with the ascending and descending semitones and the ascending and descending perfect fifths. The semitonal generator gives rise to the chromatic circle while the perfect fifth gives rise to the circle of fifths.
Main article: Chromatic scale 
The circle of fifths, or fourths, may be mapped from the chromatic scale by multiplication, and vice versa. To map between the circle of fifths and the chromatic scale (in integer notation) multiply by 7 (M7), and for the circle of fourths multiply by 5 (P5).
Here is a demonstration of this procedure. Start off with an ordered 12tuple (tone row) of integers
representing the notes of the chromatic scale: 0 = C, 2 = D, 4 = E, 5 = F, 7 = G, 9 = A, 11 = B, 1 = C♯, 3 = D♯, 6 = F♯, 8 = G♯, 10 = A♯. Now multiply the entire 12tuple by 7:
and then apply a modulo 12 reduction to each of the numbers (subtract 12 from each number as many times as necessary until the number becomes smaller than 12):
which is equivalent to
which is the circle of fifths. Note that this is enharmonically equivalent to:
Main article: Theoretical key 
The key signatures found on the bottom of the circle of fifths diagram, such as D♭ major, are often written one way in flats and in another way using sharps. These keys are easily interchanged using enharmonic equivalents. Enharmonic means that the notes sound the same, but are written differently. For example, the key signature of D♭ major, with five flats, contains the same sounding notes, enharmonically, as C♯ major (seven sharps).
After C♯ comes the key of G♯ (following the pattern of being a fifth higher, and, coincidentally, enharmonically equivalent to the key of A♭). The "eighth sharp" is placed on the F♯, to make it F
There does not appear to be a standard on how to notate theoretical key signatures: