The Adagio in B minor for piano, K. 540, by Wolfgang Amadeus Mozart is a standalone composition for solo piano, and was entered into his Verzeichnis aller meiner Werke (Catalogue of all my Works) on March 19, 1788.
At 57 measures, the length of the piece is largely based on the performer's interpretation, including the decision of whether to do both repeats; it may last between 5½ and 12 minutes. The key of B minor is very rare in Mozart's compositions; it is used in only one other instrumental work, the slow movement from the Flute Quartet No. 1 in D major, K. 285.
The Austrian composer and academic Gerhard Präsent has made an arrangement for string quartet in four movements Fantasy Quartet in D in which this piece acts as the third one.
The autograph is at the Stiftelsen Musikkulturens Främjande Library, Stockholm.