Because of the number of possible situations and the variations of what is allowed in one jurisdiction versus another, this is too complicated for a brief forum explanation. It also depends on the type and construction of various appliances. Sometimes the particular conditions are such that the neutral is exposed to currents less than in the line conductors, and thus can be smaller by one or perhaps two standard wire sizes. You must consult local codes.
__________________
In vino veritas; in cervisia carmen; in aqua E. coli.