No more than 1/4" setback in non combustible wall surfaces such as tile, drywall, etc.. Must be flush with combustible wall surfaces.
All responses based on the 2011 NEC.
If you live in New Jersey click here. All other states click here.
Please check with local, county and state officials as laws may vary.
Sizing motors here. Online motor calculator here. Online calculators here.