Every firm faces a basic choice: should it finance its business with debt, with equity, or with a mix of the two? That choice—the firm’s capital structure—may seem like just a financial detail, but it affects everything from the firm’s tax bill to how its managers behave. We start with a surprising result: in a perfect world, the mix does not matter at all. Then we add real-world problems that make it matter a lot, and we build a way to think about the best mix of debt and equity.