What size wires do I need for 240 single phase 40A 2P breaker?
According to Table 310.15(B)(16) of the National Electrical Code, #8 Gauge AWG Copper is good for 40 amps.
That would require a minimum of 8 AWG.
Under the NEC (NFPA 70) Table 310(b)(16), copper wires having 90F THHN insulation at normal ambient temperatures, no smaller than 10 AWG, in cables of up to three current-carrying conductors, can safely carry 40 amps.
However, under 240.4(D)(7), the maximum breaker allowed for protection of 10 AWG is 30A, so you would be required to use a conductor size that is 8 AWG or greater, when protected by a 40 A circuit breaker.