Short answer
It depends on the job the foam has to do. In Western Pennsylvania's climate zone 5, 2 to 3 inches of closed-cell handles rim joists, basement and crawlspace walls, and metal buildings. About 3.3 inches meets the R-23 wall requirement, and a roof deck needs about 7 inches for R-49, or at least R-20 of foam against the deck with other insulation below it. Past 3 inches, each added inch cuts heat loss by only a point or two.
Key points
- Pennsylvania's code (the 2021 IRC and IECC with state amendments, in effect since January 1, 2026) puts Western PA in climate zone 5: R-49 ceilings; R-23 wood-frame walls, or R-20 plus R-3.8 continuous, or R-13 plus R-7.5 continuous; R-15 continuous or R-19 cavity on basement and crawlspace walls.
- In an unvented roof with insulation under the foam, IRC Table R806.5 requires at least R-20 of foam against the deck in zone 5. That's about 2.9 inches of closed-cell.
- Closed-cell is an air barrier at about 1 inch and a Class II vapor retarder at about 1.1 to 1.9 inches, depending on the product. On cold steel, concrete and rim joists, 2 inches is the practical minimum.
- In hot-box testing, 3 inches of closed-cell cut heat loss 90% and 6 inches cut it 94%.
- Manufacturers cap each pass, commonly at 2 to 4 inches, so thick sections go on in layers.
How thick should spray foam insulation be? Three things decide
- Code. New homes, additions and other permitted work have to hit an R-value.
- Moisture. Enough closed-cell to keep warm indoor air off cold sheathing, steel or concrete.
- Payback. Each inch past the first few saves less than the one before.
The math here uses R-7 per inch for closed-cell, a typical aged value for HFO closed-cell foam, and R-3.7 per inch for open-cell. Your product's data sheet may list a little more or less at your thickness; see spray foam R-value per inch.
On climate zones: the 2021 code map Pennsylvania now uses has two zones, 4 and 5, down from three on the 2018 map. Northern-tier counties such as McKean and Elk, once zone 6, are now zone 5 like Erie and the rest of Western PA.
Spray foam thickness by location
| Location | What sets the thickness | Closed-cell | Open-cell |
|---|---|---|---|
| Rim joist | Air seal and vapor control; over 3¼ in. needs a covering | 2–3 in. | Closed-cell preferred |
| Basement walls | R-15 continuous or R-19 cavity | About 2.2 in. for R-15; 2.5 in. is a common spec | No: not below grade |
| Crawlspace walls (sealed crawl) | R-15 continuous or R-19 cavity | Same as basement | No: not below grade |
| 2×4 wall | R-23 cavity, or R-13 + R-7.5 continuous | About 3.3 in., most of the 3.5-in. cavity | 3.5 in. is about R-13; needs R-7.5 continuous outside |
| 2×6 wall | R-23 cavity, or R-20 + R-3.8 continuous | About 3.3 in. | 5.5 in. is about R-20; needs R-3.8 continuous outside |
| Unvented roof deck, all foam | R-49 total | About 7 in. | Needs a Class II coating; closed-cell is the usual choice |
| Unvented roof deck, hybrid | At least R-20 against the deck, the rest below | At least 2.9 in., then batts or blown to R-49 | Needs a Class II coating; closed-cell is the usual choice |
| Vented attic floor | Air sealing; blown insulation is cheaper per R | Seal the leaks only | Seal the leaks only |
| Pole barn, metal building | Keep room air off cold steel | 2–3 in. | No |
Walls
Zone 5 walls need R-23 in the cavity, R-20 plus R-3.8 of continuous insulation, or R-13 plus R-7.5 continuous. At R-7 per inch, 3.3 inches of closed-cell is R-23, most of a 2×4's 3.5-inch cavity. Filling a 2×6 deeper adds less than the label suggests, because the studs carry heat around the foam (see R-value per inch).
Open-cell fills a 2×4 at about R-13 and a 2×6 at about R-20, so new walls need continuous insulation outside as well. In zone 5 the IRC (R702.7) also calls for a Class I or II vapor retarder on the room side of framed walls, with some exceptions. Closed-cell at about 2 inches is itself a Class II vapor retarder; open-cell isn't, as closed-cell vs open-cell in Climate Zone 5 explains. Pennsylvania's performance (ERI) path and its PA Alternative Residential Energy Provisions allow other combinations.
Rim joists
The rim joist needs an air seal and a vapor retarder more than a big R-value. Two to three inches of closed-cell does both. The IRC lets foam up to 3¼ inches thick stay exposed on rim joists and sill plates; thicker than that, it needs a thermal barrier or other approved covering. See rim joist spray foam.
Basement and crawlspace walls
Zone 5 calls for R-15 continuous insulation or R-19 in a stud cavity on basement walls and on the walls of a sealed crawlspace. At R-7 per inch, R-15 is about 2.2 inches of closed-cell. A 2.5-inch spec leaves margin so thin spots still clear R-15. The DOE warns against open-cell below ground level, where it can absorb water. Fix water problems first (basement wall insulation, crawl space spray foam).
Roof decks and unvented attics
The energy code sets the total: R-49 for a zone 5 ceiling in Pennsylvania. All foam, that's about 7 inches of closed-cell.
Condensation control falls under IRC Section R806.5. In zones 5 through 8, foam against the deck must be a Class II vapor retarder or be coated with one. If batts or blown insulation go under the foam, Table R806.5 requires at least R-20 of foam against the deck in zone 5, about 2.9 inches at R-7 per inch, and the insulation below makes up the rest of the R-49.
Cathedral ceilings with no attic space get one break. Where the assembly doesn't have room, the IRC (N1102.2.2) accepts R-30, about 4.3 inches of closed-cell, on up to 500 square feet or 20% of the ceiling area, whichever is less. Penn State's housing research center advises using only closed-cell foam in these roofs in zone 5 and colder. More in sealed attic with spray foam.
Attic floors
In a vented attic, spray foam is the wrong tool for bulk R-value. Seal the leaks at top plates, wiring, plumbing and the hatch, then blow in cellulose or fiberglass to R-49. Foam to that depth costs several times as much for the same R-value (spray foam vs fiberglass vs cellulose).
Pole barns and metal buildings
Here the job is condensation. On a 0°F night with the shop at 60°F, bare steel runs far below the dew point of the inside air, and any warm, damp air that reaches it leaves water behind. Closed-cell bonded to the steel keeps that air off. At 2 inches it's past the Class II threshold on every data sheet we checked, and its room-side surface stays near 57°F that night (pole barn insulation options). Two to three inches is the usual range for walls and roof. Open-cell doesn't belong on steel in this climate.
Code minimums vs diminishing returns
FoamGuard's hot-box case study used a guarded hot-box test to ASTM C-236, which measures heat flow through a whole assembly, at increasing thicknesses of closed-cell foam:
| Closed-cell thickness | Heat-loss reduction | Gain over the inch before |
|---|---|---|
| 1 in. | 72% | n/a |
| 2 in. | 86% | +14 points |
| 3 in. | 90% | +4 points |
| 4 in. | 92% | +2 points |
| 5 in. | 93% | +1 point |
| 6 in. | 94% | +1 point |
The first inches do most of the work because they stop air movement as well as conduction. Where code applies, meet it: an R-23 wall still needs R-23. Where no code number applies, as with many pole barns and retrofit rim joists, 2 to 3 inches captures most of the benefit, and a fourth or fifth inch is the easiest place to save money.
Maximum thickness per pass
Closed-cell foam gives off heat as it cures. Spray too much at once and the core can overheat, which can scorch or weaken the foam and, in extreme cases, start a fire. Manufacturers set a maximum per pass, and installers build deeper sections in layers, letting each one cool.
On the data sheets we checked:
- Most closed-cell products allow 2 to 4 inches per pass.
- One high-lift product allows up to 6.5 inches when it's 70°F or cooler, but only 4 inches between 70°F and 80°F and 3.25 inches above 80°F.
- Between passes, sheets call for a set wait (5 to 10 minutes on two of them) or for the foam's core to drop below 100°F.
- One sheet warns that passes over 4 inches "can reduce physical properties and cause local overheating and possible fire."

So a 7-inch roof deck takes two or more passes and real waiting time, which shows up in the labor on a quote.
Checking the thickness on your quote
- Each surface should have its own thickness and the product's R-value at that thickness.
- Compare each line to the table above or to your permit's energy worksheet.
- Ask whether the thickness is a minimum or an average. Sprayed foam is never perfectly flat.
- For roof decks, ask how R806.5 is met: all foam, or foam plus insulation below.
How to read a spray foam quote walks through the rest.
Want a number for your own project? Price My Project or call (814) 208-3478.
FAQ
Is 1 inch of closed-cell spray foam enough?
One inch air-seals and, in hot-box testing, cut heat loss 72%. It's below the Class II vapor retarder thickness on the data sheets we checked, so on rim joists, steel and concrete in Western PA, 2 inches is a safer minimum.
Can spray foam be too thick?
Per pass, yes: every product has a maximum lift. In total, extra thickness past what code and condensation control need mostly adds cost.
How thick should closed-cell spray foam be on a pole barn?
Two to three inches on the walls and roof of an unheated or lightly heated building. A shop with living space has to meet the energy code; see heated garage and workshop insulation.
Sources
- Pennsylvania Energy Code: 2021 IECC with PA amendments, effective January 1, 2026 (NAIMA)
- 2021 IRC/IECC energy code webinar handout: Pennsylvania climate zone maps (Pennsylvania Housing Research Center)
- 2021 International Residential Code, Chapter 8: Section R806.5 and Table R806.5 (ICC)
- Cathedral Ceiling Assemblies (Pennsylvania Housing Research Center)
- Types of Insulation (U.S. Department of Energy)
- HEATLOK HFO High Lift Technical Data Sheet (Huntsman Building Solutions)
- WALLTITE LWP closed-cell HFO Technical Data Sheet (BASF)
- Natural-Therm 2.0 HFO closed-cell data sheet (Natural Polymers, Owens Corning)
- JM IV HFO Installation Guide (Johns Manville)