By The Roofing Brief Team. Last reviewed: October 2026.
Attic rafter insulation means putting the insulation at the roofline, against or between the rafters, instead of on the attic floor. Doing this moves the attic inside your home’s thermal boundary and changes it from a vented, unconditioned space into part of the conditioned house. It is the right move when ductwork, an air handler, or plumbing runs through the attic, and it is the wrong move if you just want to cut heating bills on a simple attic. The catch most guides skip: you cannot pack fiberglass batts against the roof deck and seal the vents without the added moisture controls the code requires, because that traps moisture and rots the sheathing. Building code, IRC R806.5 in IRC Chapter 8, governs how this assembly has to be built, and the ceiling R-value target is R-30 to R-60 by climate zone under Table R402.1.3 of the 2021 IECC Chapter 4.
Rafter insulation vs attic floor insulation: which one you need
Insulate the attic floor when the attic is empty storage space and the goal is a lower energy bill, and insulate the rafters when you need the attic itself to stay conditioned. Floor insulation keeps the attic vented and costs less. Rafter (roof deck) insulation costs roughly 3 times as much: HomeGuide’s spray foam cost guide (December 1, 2025) puts a spray-foamed attic at $3,000 to $8,000, against $1,000 to $2,800 for 1,000 square feet of blown-in on the floor at HomeGuide’s $1.00 to $2.80 per square foot. In exchange it pulls ducts and the air handler inside the conditioned space.
| Factor | Attic floor insulation | Rafter / roof deck insulation | Source |
|---|---|---|---|
| Where it goes | On the attic floor (over the ceiling) | At the roofline, against or between rafters | Definition |
| Attic stays | Vented, unconditioned | Unvented, conditioned (or vented bays with a 1 in channel) | IRC R806.3, R806.5 |
| Best when | Empty attic, lowest cost | Ducts, air handler, or living space in the attic | Editorial |
| Typical cost | $1,000 to $2,800 blown-in for 1,000 sq ft | $3,000 to $8,000 spray foam attic | HomeGuide, Nov and Dec 2025 |
| Attic vents | Keep them open | Sealed (unvented assembly) | IRC R806.5 |
| Moisture risk | Low | High if built wrong | IRC R806.5 (condensation control) |
If your ducts sit on the attic floor, floor insulation leaves them outside the thermal boundary, and ENERGY STAR says that in a typical house 20 to 30 percent of the air moving through ducts is lost to leaks, holes and poor connections. Moving that leakage inside a conditioned attic is the main reason homeowners choose the rafter approach. For the standard floor method and R-value targets, see our guide to insulating the attic floor.
The IRC R806.5 rule that keeps your roof deck from rotting
The single most important fact about rafter insulation is a code rule, not a product: IRC Section R806.5 (2021 edition) permits an unvented roof assembly only when the insulation is arranged to control condensation at the roof deck. In plain terms, you cannot stuff air-permeable batts (fiberglass, mineral wool, or cellulose) against the deck, seal the vents, and call it done. Moist indoor air reaches the cold sheathing, condenses, and the deck rots.
R806.5 Item 5 lists the compliant insulation paths, and outside Climate Zones 1 to 3 none of them is air-permeable fill alone against the deck. For the board-based path, see our guide to rigid foam board under the roof deck.
- Air-impermeable insulation against the deck (Item 5.1.1). Spray foam is the usual choice; where it is the only insulation it has to carry the full energy code R-value, R-30 to R-60 by zone. Item 5.3 also allows preformed insulation board as the air-impermeable layer if each sheet is sealed at its perimeter to form a continuous layer.
- Foam on the deck, batts below (Item 5.1.3). Air-impermeable insulation in contact with the deck at the R-value in Table R806.5, with air-permeable insulation directly under it. This is the flash-and-batt approach.
- Rigid insulation above the deck (Items 5.1.2 and 5.1.4). Rigid board or sheet insulation on top of the sheathing at the Table R806.5 R-value, with air-permeable insulation allowed directly below the deck, or enough above-deck insulation to keep the underside of the sheathing above 45 degrees F on a monthly average.
- Vapor diffusion port, Zones 1 to 3 only (Item 5.2). Air-permeable insulation with an approved vapor diffusion port within 12 inches of the roof peak, a roof slope of at least 3:12, and, where the fill sits directly below the deck, supply air of at least 50 CFM per 1,000 sq ft of ceiling.
Table R806.5 sets the condensation-control R-value for the foam layer from R-5 in Zones 1 to 3 up to R-35 in Zone 8. In Zones 5 through 8, Item 4 also requires any air-impermeable insulation to be a Class II vapor retarder or to carry a Class II vapor retarder coating or covering on its underside.
If the deck is already soft or stained, insulating over it only hides the problem; replace damaged sheathing before any foam goes on, because closed-cell foam bonded to the deck makes later deck repair harder. Read our breakdown of spray foam attic insulation for the open cell versus closed cell decision that drives R806.5 compliance.
Vented rafter assembly vs unvented conditioned attic
There are two ways to insulate at the rafters, and they are not the same job. A vented rafter assembly keeps a continuous air channel of at least 1 inch from soffit to ridge, per IRC R806.3, so you can use ordinary batts. An unvented (conditioned) assembly seals the roofline and relies on one of the R806.5 insulation paths above. Choosing the wrong one is what causes condensation.
| Vented rafter assembly | Unvented conditioned attic | |
|---|---|---|
| Air channel | 1 inch minimum, soffit to ridge, held by baffles | None, roofline sealed airtight |
| Insulation allowed | Batts or blown, below the baffle | Foam or sealed board on the deck, rigid foam above the deck, or a vapor diffusion port design in Zones 1 to 3 |
| Soffit and ridge vents | Stay open and clear | Closed off |
| Best for | Cathedral ceilings, deep rafters | Duct and equipment attics, tight retrofits |
| Common failure | Baffle crushed, channel blocked | Air-permeable fill against cold deck |
The vented path needs that 1 inch clear channel, which is what attic insulation baffles hold open. The unvented path deletes the vents on purpose, so if you go that route you are also retiring the soffit and ridge (IRC R806.2 normally requires 1/150 of the attic floor area as net free vent area) attic ventilation system, not leaving it half open.
Best insulation for attic rafters, by material
The best insulation for attic rafters depends on whether the assembly is vented or unvented. Unvented (sealed) roofs need one of the R806.5 paths, most often air-impermeable foam or sealed board against the deck, or rigid foam above it. Vented rafter bays with a clear baffle channel can take batts or blown fill. R-per-inch matters at the rafters because depth is fixed by the framing: a 2×8 is 7.25 inches deep, a 2×10 is 9.25 inches and a 2×12 is 11.25 inches.
| Material | R-value per inch | Installed cost per sq ft | Use at rafters | Source |
|---|---|---|---|---|
| Closed-cell spray foam | R-5 to R-7 | $3.00 to $5.00 | Unvented, direct to deck | HomeGuide spray foam guide, Dec 2025 |
| Polyiso rigid board (JM AP Foil-Faced) | R-6.0 at 1 in; R-13 at 2 in; R-26 at 4 in | $1.33 to $1.36 for a 2 in foil-faced 4×8 sheet, material only (Oct 2026 retail listings at Lowe’s and Supply Ontime) | Above or below deck | Johns Manville data sheet (ASTM C1289 aged R) |
| Open-cell spray foam | R-3.5 to R-3.7 | $1.50 to $3.50 | Unvented, direct to deck (Class II vapor retarder coating needed in Zones 5 to 8) | HomeGuide spray foam guide, Dec 2025; IRC R806.5 Item 4 |
| Mineral wool batts (ROCKWOOL Comfortbatt) | About R-4.0 to R-4.3 (R15 at 3.5 in, R23 at 5.5 in, R30 at 7.25 in, R38 at 9.5 in) | Priced like batts below | Vented bays only | ROCKWOOL data sheet (ASTM C518) |
| Fiberglass batts (Owens Corning PINK Next Gen) | About R-2.9 to R-3.7 (R-13 at 3.5 in, R-30C at 8.25 in, R-30 at 9.5 in, R-38C at 10.25 in) | $0.80 to $2.60 for batts | Vented bays only | Owens Corning data sheet; HomeGuide removal guide, Nov 2025 |
| Blown-in cellulose or fiberglass | Check the bag chart for settled R per inch | $1.00 to $2.80 | Vented bays only, behind netting or baffles | HomeGuide removal guide, Nov 2025 |
Closed-cell foam wins on tight retrofits because it hits code R-value in the least depth and acts as its own air and vapor control. A flash-and-batt hybrid (Item 5.1.3: closed-cell foam on the deck at the Table R806.5 R-value, then batts below) trims the foam to the condensation-control layer: R-5 in Zones 1 to 3 is under 1 inch of foam at R-6 per inch, and R-20 in Zone 5 is about 3 to 4 inches, with cheaper batts making up the rest. For how each material compares across the whole attic, see the attic insulation types and R-value guide.
What R-value do you need at the rafters?
Rafter insulation targets the same code R-value as any attic ceiling: R-30 in the warmest climates and up to R-60 in the coldest. The 2021 IECC Table R402.1.3 (IRC Table N1102.1.3) ceiling minimums are R-30 in Zone 1, R-49 in Zones 2 and 3, and R-60 in Zones 4 through 8. Where a ceiling has no attic space and the design cannot fit that R-value, Section R402.2.2 allows R-30 over up to 500 square feet or 20 percent of the total insulated ceiling area, whichever is less, per the 2021 IECC Chapter 4. Because rafter depth is fixed, higher R-per-inch materials often become necessary to reach these numbers without furring out the framing.
Worked example, 2×10 rafter (9.25 inches deep). In a vented bay, subtract the 1 inch R806.3 channel and 8.25 inches remain, which is exactly the thickness of the R-30C batt in the Owens Corning PINK Next Gen data sheet: R-30, short of the R-49 or R-60 target. Adding 2 inches of polyiso under the rafters (R-13 per the Johns Manville AP Foil-Faced data sheet) brings the assembly to about R-43; 4 inches (R-26) brings it to about R-56. In an unvented bay, closed-cell foam at HomeGuide’s R-5 to R-7 per inch would need about 7 to 10 inches to reach R-49, and the ROCKWOOL Comfortbatt data sheet shows R38 at 9.5 inches for mineral wool, which only fits a 2×12.
| Rafter | Depth | Vented bay fill (depth minus 1 in channel) | Unvented closed-cell foam at full depth | Source |
|---|---|---|---|---|
| 2×8 | 7.25 in | 6.25 in: R-19 fiberglass (6.5 in) will be slightly compressed; R23 mineral wool at 5.5 in fits | About R-36 to R-51 | Owens Corning; ROCKWOOL; HomeGuide R-5 to R-7 per in |
| 2×10 | 9.25 in | 8.25 in: R-30C fiberglass or R30 mineral wool (7.25 in) | About R-46 to R-65 | Owens Corning; ROCKWOOL; HomeGuide |
| 2×12 | 11.25 in | 10.25 in: R-38C fiberglass or R38 mineral wool (9.5 in) | About R-56 to R-79 | Owens Corning; ROCKWOOL; HomeGuide |
How to insulate attic rafters, step by step
Insulating at the rafters follows a fixed order because air sealing and moisture control come before R-value. This is the vented-batt version; a sprayed unvented assembly replaces steps 2 through 4 with a professional foam application at the Table R806.5 R-value (R-5 in Zones 1 to 3 up to R-35 in Zone 8).
- Inspect the deck. Confirm the sheathing is dry and sound before covering it. Any staining or softness means a repair first.
- Install baffles. Staple a rafter vent baffle in each bay to hold the IRC R806.3 minimum 1 inch channel from soffit to ridge.
- Air seal penetrations. Foam or caulk around wiring, fixtures, and top plates so indoor air cannot reach the deck.
- Fit the insulation. Push batts snug below the baffle with no gaps at the edges; pick the batt by thickness (R-30C at 8.25 in for a 2×10, R-38C at 10.25 in for a 2×12) so it is not compressed.
- Add a vapor retarder if needed. Cold climates get a retarder on the warm (interior) side, mirroring the IRC R702.7 rule for frame walls in Zones 5 to 8 and Marine 4, and kraft-faced batts serve as a Class II retarder; hot-humid climates leave it off to avoid trapping moisture.
- Cover with a finished ceiling or an ignition barrier where required by code. Spray foam left exposed in an attic needs the ignition barrier or thermal barrier set by IRC R316.
Cost of insulating attic rafters
Rafter insulation in spray foam runs $3,000 to $8,000 for an attic, per HomeGuide’s spray foam guide (December 2025), or $3.00 to $5.00 per square foot for closed-cell and $1.50 to $3.50 for open-cell, versus $1.00 to $2.80 per square foot for blown-in on the floor. Price the roof deck area, not the floor: a 1,000 square foot footprint under a 6:12 roof has about 1,118 square feet of deck (slope factor 1.118), so closed-cell at full rates is roughly $3,350 to $5,600. Payback depends on climate and on whether ducts run through the attic; no source cited here publishes a national payback figure.
Frequently asked questions
Can you insulate between attic rafters?
Yes. In a vented rafter bay, keep a 1 inch air channel from soffit to ridge and put batts or blown fill below it. In a sealed, unvented roof, IRC R806.5 requires one of its listed insulation paths: air-impermeable spray foam or sealed foam board against the deck, foam against the deck with batts below it at the Table R806.5 R-value, rigid foam above the deck, or in Climate Zones 1 to 3 a vapor diffusion port design. Packing air-permeable batts against the deck with the vents closed and none of those measures in place leads to condensation and deck rot.
Can I put fiberglass batts against the roof deck?
Not on their own in a sealed, unvented attic. Fiberglass is air permeable, so warm indoor moisture passes through it, hits the cold sheathing, and condenses. Under IRC R806.5, batts directly under the deck of an unvented roof need rigid insulation above the deck at the Table R806.5 R-value, or, in Climate Zones 1 to 3 only, an approved vapor diffusion port and supply air (Item 5.2). Batts can also sit directly under a layer of air-impermeable foam that is in contact with the deck. Otherwise, fiberglass at the rafters belongs in a vented bay with a clear channel above it.
Do I have to seal the attic vents when insulating the rafters?
Only if you are building an unvented, conditioned attic. That assembly under IRC R806.5 requires the soffit and ridge vents to be closed so the foam-sealed roofline works as designed. If you are using batts in a vented rafter bay, the vents stay open and a baffle keeps the 1 inch R806.3 channel clear behind the insulation.
Is rafter insulation better than floor insulation?
Neither is universally better; they solve different problems. Floor insulation is cheaper, at $1.00 to $2.80 per square foot blown-in, and fits an empty, vented attic. Rafter (roof deck) insulation costs roughly 3 times more, $3,000 to $8,000 for a spray-foamed attic per HomeGuide, but conditions the attic, which matters when ductwork, an air handler, or living space sits up there. Choose based on what the attic holds, not on R-value alone.
What R-value do I need for attic rafter insulation?
The same as any attic ceiling: R-30 in the warmest U.S. climate zone up to R-60 in the coldest, per the 2021 IRC. Because rafter depth is fixed by the framing, cold zones often need a high R-per-inch material like closed-cell foam or polyiso (R-6.0 per inch for JM AP Foil-Faced) to reach the target without building out the rafters.
What is the best insulation for attic rafters?
For a sealed conditioned attic, closed-cell spray foam (R-5 to R-7 per inch, $3.00 to $5.00 per square foot per HomeGuide) is usually best because it reaches code R-value in the least depth and controls air and vapor by itself. For a vented rafter bay, mineral wool such as ROCKWOOL Comfortbatt R30 (7.25 in) or Owens Corning R-30C fiberglass (8.25 in) below a 1 inch baffle fits a 2×10. Flash-and-batt hybrids cut the foam to the Table R806.5 layer, R-5 to R-35 by zone.