Data from U.S. public firms show that in booms large firms finance with debt and payout equity, whereas small firms issue both equity and debt. Therefore, large firms generally substitute between debt and equity financing over the business cycle, whereas small firms adhere to a procyclical financing policy for debt and equity. We explain these cyclical financing patterns quantitatively using a heterogeneous firm model with endogenous firm dynamics. We find that cross-sectional differences in investment returns and, therefore, funding needs and exposures to financial frictions are essential to understanding how firms' financing policies respond to macroeconomic shocks. Authors have furnished an Internet Appendix, which is available on the Oxford University Press Web site next to the link to the final published paper online.