The Well-Tempered Clavier, BWV 846–893, is a collection of two sets of preludes and fugues in all 24 major and minor keys, composed for solo keyboard by Johann Sebastian Bach. In the German of Bach's time Clavier (keyboard) was a generic name indicating a variety of keyboard instruments, most typically a harpsichord or clavichord – but not excluding an organ either.
The modern German spelling for the collection is Das wohltemperierte Klavier (WTK; German pronunciation: [das ˌvoːlˌtɛmpəˈʁiːɐ̯tə klaˈviːɐ̯]). Bach gave the title Das Wohltemperirte Clavier to a book of preludes and fugues in all 24 major and minor keys, dated 1722, composed "for the profit and use of musical youth desirous of learning, and especially for the pastime of those already skilled in this study". Some 20 years later Bach compiled a second book of the same kind, which became known as The Well-Tempered Clavier, Part Two (in German: Zweyter Theil, modern spelling: Zweiter Teil).
Modern editions usually refer to both parts as The Well-Tempered Clavier, Book I (WTC I) and The Well-Tempered Clavier, Book II (WTC II), respectively. The collection is generally regarded as being among the most important works in the history of classical music.