While the relationship between the size of the government budget and the levels of fragmentation and polarization in Congress has been previously studied, the two political variables have been considered in isolation. However, fragmentation should matter for public spending only to the extent that the degree of polarization is high enough that a larger number of parties does imply greater tensions in the legislature. We examine the joint impact of polarization and fragmentation, allowing for interdependence between them. We find that the effect of fragmentation on government spending is increasing in polarization and significantly different from zero only when there is some degree of polarization. We also find that polarization has a positive effect on public spending, but only when the effective number of parties is large enough. Above that threshold, the effect of polarization is increasing in the number of parties. Our findings indicate that ignoring the possible interaction between the effects of polarization and fragmentation may imply misled conclusions about each of these effects.