Air sealing. Spray foam insulates and air-seals in one pass; batt and blown-in add R-value only, leaving air infiltration untreated, which matters when the outside air is 90 degrees and 80 percent humidity.
Moisture resistance. Closed-cell spray foam blocks vapor at the roof deck. Fiberglass batt and cellulose both absorb moisture over time, reducing their effective R-value in high-humidity conditions.
R-value per inch. Closed-cell reaches R-6 to R-7 per inch; open-cell around R-3.7; fiberglass batt R-2.9 to R-3.8; blown-in cellulose R-3.2 to R-3.8.
Where it is applied. Spray foam goes on the underside of the roof deck, conditioning the whole attic space. Batt and blown-in sit on the attic floor and leave your ductwork baking in a vented attic.
Longevity. Spray foam bonds to the substrate and does not settle or compress. Blown-in loses depth over time and batt can shift, both reducing installed R-value without any visible sign.
Upfront cost. Batt is the lowest entry point; blown-in runs somewhat more for full attic coverage; spray foam costs more per square foot but eliminates a separate air-sealing pass and typically lasts the life of the structure.