I investigate the aggregate effects of R&D tax credits in the US. Because it subsidizes R&D activity and because credit rates vary between states, this policy has both spatial and dynamic effects on the economy. To address this issue, I construct an endogenous growth model with spatial heterogeneity and agglomeration spillovers in innovation. Aggregate outcomes in this model are thus affected by the spatial distribution of the population in the economy, which is itself endogenous and reacts to policy. I use this framework to identify a set of local R&D subsidies that maximize aggregate welfare.