1. that's on capital gains. If they're selling for a loss in OP's scenario, that works out to a tax savings of $0.
2. realistically speaking this can be factored into the cost of cost of capital (ie. opportunity cost of the downpayment/mortgage payment), but I didn't want to get into that because the calculation can get subjective. Housing has historically under-performed the stock market, but if you're a housing permabull, you might argue that the housing bubble will continue and outperform the stock market, making the opportunity cost of buying a house negative.
>not to mention the salt and mortgage interest tax deductions
that's a savings on mortgage interest, which is a cost that wasn't in my calculations. Including that cost and factoring in that deduction will make the numbers worse, not better.
>The tax code heavily incentivizes home ownership.
no disagreement there.
For a married person with a million dollar home, they'll make ~$150k back from the section 121 nonrecognition provision alone if they ever sell, not to mention the salt and mortgage interest tax deductions. The tax code heavily incentivizes home ownership.