I've seen a number of people bring up the question of what if you had bought your house in 2002 and could have paid off the mortgage just before the stock market crashed. The assumption seems to be that paying off the mortgage would surely have been better in that case.

Is that assumption correct?

I made

this spreadsheet to try and explore that question.

We take out a $250k mortgage at a 7% interest rate in January 2002, which

seems to be about the typical market rate at the time.

In the first scenario, the mortgage is paid off in August 2008, a few months before the big crash.

In the second scenario, the exact same amount of extra payments from Scenario 1 are instead used to purchase VTI shares through August 2008. After that, shares are sold to pay the required mortgage payments.

Scenario 2 is a little bit ahead until 2008, at which point it falls way behind Scenario 1 for some time. It slowly recovers as the stock market goes up, finally pulling back ahead of Scenario 1 just a few months ago.

Just looking at these two scenarios, paying off the mortgage seems like a fine option. Scenario 2 is never ahead by much, and it could easily fall behind again if the stock market went back down.

However this Scenario 2 assumes that the person is carrying a 7% mortgage in 2017. That's madness! I also plotted a third scenario, where we refinance the remaining balance into a new 30-year loan at 5% in 2009, and again at 4% in 2012. In this scenario, stock investing pulls back ahead of the early mortgage payoff in mid-2013, and is more than $100k ahead today. Even if the stock market fell by 30% tomorrow, Scenario 3 would still be ahead at this moment.

Note that I'm ignoring the effect of the mortgage interest tax deduction and taxes on dividends. These would tend to counteract each other somewhat. Everyone's tax situation is different, but I'd expect the mortgage interest deduction to be worth a bit more than the dividend tax for most people, pushing Scenarios 2 and 3 a bit ahead of what's shown in the spreadsheet.