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, because that traps moisture and rots the sheathing. Building code (IRC R806.5) governs how this assembly has to be built.
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 is 2 to 3 times more expensive but pulls ducts and equipment into conditioned space, which can raise HVAC efficiency by 15 to 20 percent when the ductwork lives in the attic.
| Factor | Attic floor insulation | Rafter / roof deck insulation |
|---|---|---|
| Where it goes | On the attic floor (over the ceiling) | At the roofline, against or between rafters |
| Attic stays | Vented, unconditioned | Unvented, conditioned |
| Best when | Empty attic, lowest cost | Ducts, air handler, or living space in the attic |
| Typical cost, 1,000 sq ft | $1,200 to $3,500 | $3,000 to $7,000 |
| Attic vents | Keep them open | Sealed (unvented assembly) |
| Moisture risk | Low | High if built wrong |
If your ducts sit on the attic floor, floor insulation leaves them out in the heat, where duct losses run 20 to 30 percent. That 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: under IRC Section R806.5, an unvented roof assembly needs air-impermeable insulation in direct contact with the underside of 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.
The code gives you two compliant paths. Either apply air-impermeable insulation (closed-cell or open-cell spray foam) directly to the deck, or install rigid foam above the deck at a minimum R-value for your climate before any air-permeable fill goes below it. The rigid foam keeps the sheathing above the dew point. Skipping this is the number one cause of rotted sheathing behind DIY rafter jobs.
If the deck is already soft or stained, insulating over it only hides the problem. 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 from soffit to ridge, so you can use ordinary batts. An unvented (conditioned) assembly seals the roofline and relies on air-impermeable foam. 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 | Spray foam on deck, or rigid foam above deck |
| 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 a 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 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 air-impermeable foam against the deck. 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, usually 2×8 to 2×12.
| Material | R-value per inch | Cost per sq ft | Use at rafters |
|---|---|---|---|
| Closed-cell spray foam | R-6.0 to R-7.0 | $1.00 to $4.50 | Unvented, direct to deck |
| Polyiso rigid board | R-5.5 to R-6.5 | $0.65 to $0.85 | Above or below deck |
| Open-cell spray foam | R-3.5 to R-4.0 | $0.60 to $1.30 | Unvented, direct to deck |
| Mineral wool batts | R-3.5 to R-4.5 | $1.40 to $4.00 | Vented bays only |
| Fiberglass batts | R-2.2 to R-4.3 | $0.30 to $1.50 | Vented bays only |
| Cellulose | R-3.1 to R-3.8 | $0.60 to $2.30 | Vented bays only |
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 (a thin layer of closed-cell foam on the deck, then batts below) cuts material cost 20 to 40 percent while keeping about 85 to 95 percent of the thermal performance. 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 IRC ceiling minimums are R-30 in Zone 1, R-49 in Zones 2 and 3, and R-60 in Zones 4 through 8. Because rafter depth is fixed, higher R-per-inch materials often become necessary to reach these numbers without furring out the framing.
A 2×10 rafter gives about 9.25 inches of usable depth. Closed-cell foam at R-6.5 per inch fills that to roughly R-49 to R-55 with an air gap allowance. Fiberglass at R-3.7 per inch tops out near R-30 to R-34 in the same cavity, which falls short in cold zones unless you add rigid foam.
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. Doing the steps out of order is what leaves gaps that cut insulation performance by 30 to 50 percent. This is the vented-batt version; a sprayed unvented assembly replaces steps 2 through 4 with a professional foam application.
- 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 a 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, no compression, no gaps at the edges.
- Add a vapor retarder if needed. Cold climates get a retarder on the warm (interior) side; hot-humid climates leave it off to avoid trapping moisture.
- Cover with a finished ceiling or an ignition barrier where required by code.
Cost of insulating attic rafters
Rafter insulation runs about $3,000 to $7,000 for a 1,000 square foot attic done in spray foam, versus $1,200 to $3,500 for blown-in insulation on the floor. The premium buys conditioned space and lower duct losses, not just a higher R-value. Payback lands around 5 to 12 years for spray foam and 4 to 9 years for a flash-and-batt hybrid, depending on climate and whether ducts run through the attic.
Frequently asked questions
Can you insulate between attic rafters?
Yes, but only two ways are code compliant. Keep a 1 inch vented air channel from soffit to ridge and put batts or blown fill below it, or seal the roofline and apply air-impermeable spray foam directly to the deck. Packing air-permeable batts against the deck with the vents closed is not allowed and leads to condensation and deck rot.
Can I put fiberglass batts against the roof deck?
Not in a sealed, unvented attic. Fiberglass is air permeable, so warm indoor moisture passes through it, hits the cold sheathing, and condenses. IRC R806.5 requires air-impermeable insulation (spray foam) against the deck for unvented assemblies. Fiberglass at the rafters is fine only when a clear vent channel stays open 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 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 channel clear behind the insulation.
Is rafter insulation better than floor insulation?
Neither is universally better; they solve different problems. Floor insulation is cheaper and ideal for an empty, vented attic. Rafter (roof deck) insulation costs 2 to 3 times more 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 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 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 or fiberglass batts below a baffle work well. Flash-and-batt hybrids balance cost and performance in deep rafter cavities.
Reviewed by The Roofing Brief Team. Last reviewed July 2026.