The Prelude and Fugue in C Major, BWV 846, is a keyboard composition written by Johann Sebastian Bach. It is the first prelude and fugue in the first book of The Well-Tempered Clavier, a series of 48 preludes and fugues by the composer. An early version of the prelude, BWV 846A, is found in the Klavierbüchlein für Wilhelm Friedemann Bach.
The prelude is 35 bars long and consists mostly of broken chords, and it ends with a single C major chord.
The fugue is 27 bars long and is written for four voices. It starts with a two-measure subject in the alto voice. The first voice to join is the soprano, which replies with the answer in the dominant key (G major).
The answer is repeated in the tenor and bass voices, respectively, when they enter. The piece then modulates through various related keys, with the subject being repeated in each of the four voices. The piece eventually ends up back in the home key. It ends with each voice stopping at a note and holding it until the end, forming a C-major chord.
Charles Gounod composed a melody that was designed to be based on the prelude; a setting of that melody to Ave Maria is popular. The edition of the prelude used by Gounod contains the Schwencke measure.