German submarine U-40 may refer to one of the following German submarines:
, 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: , a Type UB II submarine launched in 1916 and scuttled on 5 October 1918 , a Type UC II submarine launched in 1916 and sunk on 21 January 1919 while on way to surrender , a Type IX submarine that served in the Second World War until sunk on 13 October 1939