The size of wire that you need for a 30 amp breaker is 10 gauge wire also known as 10 AWG wire.
The size wire that you need for a 40 amp breaker is a size 8 AWG which is an 8 gauge wire.
8 AWG wire is the standard wire size for electrical circuits that are on a 40 amp circuit breaker.
The gauge number of a wire indicates its thickness, with lower numbers representing thicker wires that can carry more current.
10 AWG wires and 12 AWG wires are not suitable for 40-amp circuit breakers.
10 AWG and 12 AWG copper wires have 35 Amp and 25 Amp wire ampacity.
Using the 10 AWG or 12 AWG for a 40 Amp circuit is inherently wrong and might result in an electric accident.
A 20-amp 240-volt circuit calls for 12-gauge wire.
A 30-amp circuit calls for 10-gauge wire.
A 40-amp circuit calls for 8-gauge wire.
And a 50-amp circuit calls for 6-gauge wire.