**People do use foam in attics, but for a conventional vented attic, its extra cost often buys little benefit.** The key distinction is whether you’re insulating the attic floor or the roof.

For **attic-floor insulation**, fiberglass or cellulose is usually economical because there’s room for a thick layer. Blown insulation also fits around joists, wiring and other obstructions without cutting and sealing lots of rigid boards. Foam’s greater insulation value per inch is more useful where space is limited. [DOE insulation guide](https://www.energy.gov/sites/prod/files/2013/11/f5/insulation_guide.pdf?trk=article-ssr-frontend-pulse_little-text-block)

Foam has a few additional caveats:

- **Rigid boards require careful fitting and sealing.** Gaps between boards and around framing can undermine their performance.
- **Spray foam depends heavily on installation quality** and makes later access to covered components harder.
- **Foam plastics have fire-protection requirements.** Depending on the product and attic’s use, an approved barrier or protective coating may be required. [Residential Spray Foam Guide](https://buildingscience.com/documents/guides-and-manuals/gm-2102-residential-spray-foam-guide)

**Spray foam under the roof deck is a different project.** It’s commonly used to create an unvented attic within the home’s thermal enclosure, which can benefit HVAC equipment and ducts located there. That requires a coordinated design for ventilation, humidity and vapor control; an unsuitable assembly can accumulate moisture at the roof sheathing. [Building Science guidance](https://buildingscience.com/documents/building-science-insights-newsletters/bsi-119-conditioned-unconditioned)

For your upgrade, assuming an ordinary vented attic, I’d generally **air-seal the ceiling first, then add blown cellulose or fiberglass**, keeping the soffit ventilation paths clear. Small amounts of foam are useful for sealing suitable gaps even when the bulk insulation is fibrous. [DOE air-sealing guidance](https://bsesc.energy.gov/energy-basics/air-sealing-existing-attics)

Check the target for your climate before settling on R-30: current U.S. recommendations reach R-49 or R-60 in many regions. [ENERGY STAR recommended R-values](https://www.energystar.gov/saveathome/seal_insulate/identify-problems-you-want-fix/diy-checks-inspections/insulation-r-values)