I estimate the market's valuation of the net benefits to leverage using panel data from 1994 to 2004, identified from market values and betas of a company's debt and equity. The median firm captures net benefits of up to 5.5% of firm value. Small and profitable firms have high optimal leverage ratios, as predicted by theory, but in contrast to existing empirical evidence. Companies are on average slightly underlevered relative to the optimal leverage ratio at refinancing. This result is mainly due to zero leverage firms. I also look at implications for financial policy.