There is an important oversimplification that these formulas/programs/spreadsheets often make, and I see it happening here. Consider two alternatives where everything is the same except the amount of money used for the mortgage down payment. The formula assume that money not used for the down payment is invested at a certain rate of return. If the mortgage interest rate is greater than the investment return, then the…
If I borrow at 4% and invest the same sum at 4%, then I'm guaranteed to lose money on the deal. How much more your investments have to yield, in order to break even on a loan-to-invest strategy depends on the degree of tax liability that your investments are subject to.