The final budget is also going to depend a lot on whether you do it just on the façades (which is the most common for summer heat) or if you also put it in interior walls. In my building there are people who did it only on the south-facing side and it changed their life with the air conditioning, but of course, they spent less than the ones who insulated the whole house.
Another factor that not always gets mentioned is whether you need to remove the current cladding or if they can apply the foam directly on top. If your house has a finish that needs to be demolished first, that adds labor and debris removal, which can be as expensive or more expensive than the material itself. That's why I'd recommend you call three or four local companies and ask them to come see the space - they all give free quotes with no obligation and that way you see the difference depending on exactly where you live. It's not the same in a central area as on the outskirts, and that detail changes the numbers a lot.