German submarine U-40

German submarine U-40 may refer to one of the following German submarines:


 * SMU U-40 (Germany), was a Type U 31 submarine launched in 1914 and that served in the First World War until sunk 23 June 1915
 * During the First World War, Germany also had these submarines with similar names:
 * SMU UB-40, a Type UB II submarine launched in 1916 and scuttled on 5 October 1918
 * SMU UC-40, a Type UC II submarine launched in 1916 and sunk on 21 January 1919 while on way to surrender
 * GS U-40 (1938), a Type IX submarine that served in the Second World War until sunk on 13 October 1939

U-40 or U-XL may also refer to:
 * SMU U-40 (Austria-Hungary), a U-27 class submarine of the Austro-Hungarian Navy