A bath fan that dead-ends in the attic isn’t saving you effort; it’s a code violation that feeds humid air into roof framing every time someone showers. If you’re learning how to install a ventilation fan in a bathroom, the project reduces to three calls: where the housing mounts, where the duct ends, and which circuit powers it.
For homes governed by the International Residential Code (IRC), a bathroom needs either a mechanical exhaust fan or a window that provides natural ventilation. Choosing the fan route means air moves straight outdoors, never into an attic, crawlspace, or between floors.
Code Rules That Apply Before Cutting the Ceiling
Most bath fan failures are decided before the drywall comes down—wrong duct size, attic termination, or a unit not rated for its location. Plan the layout against these rules, which most local US codes adopt:
| Code Rule | What It Means For Your Install |
|---|---|
| Direct outdoor termination | The duct ends at an exterior cap; attics, crawlspaces, and floor cavities cannot be used. |
| Airflow minimum | IRC Chapter 15 sets 50 cfm intermittent or 20 cfm continuous for bathroom local exhaust. |
| Exterior outlet clearance | Keep the outlet at least 10 ft from any air inlet, and 3 ft from a gravity air inlet per IRC M1504.3. |
| Duct size | Use the exact diameter the fan manual specifies; an undersized duct chokes airflow. |
| Tub and shower zones | The fan must be marked for that use and mounted at least 7 ft above the floor. |
Mount heights matter more than most shoppers expect. If you’re still choosing the unit, our tested list of the best bathroom heater ventilation fans flags models rated for damp locations and sized to code.
Bathroom Fan Installation, Step By Step
Work from the top down: open the ceiling, set the housing, run and seal the duct, then make wiring connections with the power off. For a typical US installation, follow this order:
- Turn off the circuit. Shut the breaker at the panel and confirm the planned location can reach a power source. Expect 120-volt, 60-hertz grounded wiring, and a manual that calls for supply conductors of at least 14 AWG.
- Cut the ceiling opening. With attic access, mark the hole from above. With no attic or roof access, hold the housing against the ceiling and cut from below using it as the template.
- Mount the housing. Fasten it to the framing so it sits flush with the finished ceiling, keeping it at least 7 ft above the floor.
- Run the duct to an exterior cap.
- Seal every seam and joint. Use mastic or UL 181-rated metal tape on duct connections, and caulk or spray foam around the ceiling penetration.
- Wire the fan. Follow the diagram on the unit, restore power, and test. A strip of tissue held to the grille should pull firmly when the fan runs.
Venting Errors That Undo a Good Installation
Moisture problems almost always trace back to one of four habits, all of them avoidable:
- Venting into the attic or crawlspace. This pumps humid air into insulation and framing, which encourages mold and rot.
- Using the wrong duct diameter or too many elbows. Airflow drops fast and the fan gets louder with every unnecessary bend.
- Skipping air sealing. Small gaps around the housing and duct joints pull dusty attic air into living spaces.
- Installing a fan not rated for tub or shower proximity. The housing must be specifically marked for that application.
The whole job in one line: choose a correctly sized fan rated for its location, mount the housing flush, run a straight sealed duct to an outdoor cap, and wire it per the diagram with the breaker off. A shower’s humidity then leaves the house in minutes, and the framing above stays dry.
FAQs
Can a bathroom fan vent into the attic instead of outside?
No. Bathroom exhaust must terminate directly outdoors; venting into an attic, crawlspace, or between floors pumps humid air into the structure and does not meet code. Plan the duct to end at an exterior wall or roof cap, with every seam and joint sealed so moisture can’t find its way back inside.
What CFM rating should my bathroom fan have?
The IRC sets the minimum at 50 cfm for an intermittent fan, or 20 cfm for one that runs continuously. Check the fan’s rated CFM against your room size before you buy.
Is a bathroom exhaust fan over a shower safe?
References & Sources
- DOE Building America Solution Center (PNNL). “Bathroom Exhaust Fans.” Official installation guidance covering ducting, air sealing, and vented-attic housing.
