We derive the first closed-form optimal refinancing rule: refinance when the current mortgage interest rate falls below the original rate by at least
In this formula W(.) is (the principal branch of) the Lambert W-function,
where ρ is the real discount rate, λ is the expected real rate of exogenous mortgage repayment, σ is the standard deviation of the mortgage rate, is the ratio of the tax-adjusted refinancing cost and the remaining mortgage value, and τ is the marginal tax rate. This expression is derived by solving a tractable class of refinancing problems. Our quantitative results closely match those reported by researchers using numerical methods.