Inputs

Main settings
Loan A

Loan B

Advanced: taxes, selling costs, names

Taxes

Selling and loans

Results at the horizon

Charts

Net worth if sold that year

Net worth difference, B minus A

Yearly payment split, Loan A

Yearly payment split, Loan B

Investments, Loan A: money put in vs growth

Investments, Loan B: money put in vs growth

Loan balance

Yearly values table

Assumptions

Returns are a smooth yearly average. Each month, the cash not needed for the higher payment is invested; tax benefits are invested at year end. Selling costs apply at the horizon, and so does the tax on investment gains unless you keep the investments.

Not modeled: market volatility and sequence of returns, PMI, closing costs and points, refinancing, inflation, liquidity (cash tied up in the house versus investments), and loan qualification or income limits.