Johann Sebastian Bach's Prelude and Fugue in D major, BWV 532, is a prelude and fugue written, like most of his organ compositions, during his tenure in Weimar between 1709 and 1717. The Prelude and Fugue in D major was probably composed in 1710, although this is not certain. However, it was definitely written before Bach codified the clear two-section prelude and fugue in the form of what is used in the The Well-Tempered Clavier, BWV 846–893, which was composed in 1722. This is because BWV 532 features a lengthy, complex, self-contained fugue preceded by a multisectional prelude. The whole work has an approximate duration of 11½ minutes.