This paper presents a quantitative dynamic general equilibrium model for the purpose of determining the optimal capital requirement for banks. Banks play two roles in this model: They contribute to the production of a final good, and they provide liquidity in the form of bank debt, which households value. Banks also benefit from an implicit bailout guarantee from the government, which motivates them to take on excessive risk. I quantify this model using data from the national income and product accounts as well as the Federal Deposit Insurance Corporation and find that the dynamics of the model are consistent with business cycle facts. Higher capital requirements lower risk-taking and increase consumption, but they also reduce the supply of bank debt. The reduction in bank debt leads to a lower interest rate on bank debt through a general equilibrium effect. This reduces the overall funding costs of banks and allows them to grow larger, which increases the capital stock and consequently, production as well as consumption. The optimal capital requirement weighs the reduction in economic volatility and the increase in consumption against the reduction in liquidity. Welfare is maximized at 14% equity as a share of risk-weighted assets.