We study the dynamic consumption-portfolio problem over the life cycle, with respect to tax-deferred investing for investors who acquire housing services by either renting or owning a home. The joint existence of these two investment vehicles creates potential for tax arbitrage. Specifically, investors can deduct mortgage interest payments from taxable income, while simultaneously earning interest in tax-deferred accounts tax-free. Matching empirical evidence, our model predicts that investors with higher retirement savings choose higher loan-to-value ratios to exploit this tax arbitrage opportunity. However, many households could benefit from more effectively taking advantage of tax arbitrage.