Capital requirements involve a trade-off between financial intermediation and financial stability. I analyze this trade-off in a macroeconomic model that allows for systemic bank runs, à la Gertler and Kiyotaki (2015). I show that fixed capital requirements make the economy more prone to runs because they slow down the recovery and reduce welfare compared to the laissez-faire benchmark. On the other hand, appropriately chosen countercyclical capital requirements can increase both financial stability and welfare. To weigh the costs and benefits of this policy, I estimate the probability of a systemic shock to the financial sector from CDS data and find it to be around 0.5% per year prior to the 2007-09 financial crisis. I then show that implementing a countercyclical capital requirement that would have prevented the run on repo markets in 2008 would have cost 3% of steady state bank capital and less than 0.1% in consumption terms.