I strongly disagree. You compare all costs. Interest, principal, maintenance, insurance, taxes... If I knew how to calculate them I'd add things like risk that you need to move (realtor fees, potentially making payments on a house you are not living in...)
If you sell the house before you die, then you can pull out the difference, which can be applied to nursing home costs. Otherwise the gain of a house is in the lower rent you pay after you pay it off.
> I strongly disagree. You compare all costs.
Both can work, but if you include the principal as a cost you need to account for the asset value that is increasing your net worth. Of if you don't want to bother with that, counting just the interest as an expense is a resonable simplification.
But if you count all rent and all mortgage as a pure expense, then it's not apples to apples.
What has made owning a house vastly worth it over the past couple of decades is severe under-construction of new housing which has led to prices spiraling upward and creating a gold mine for homeowners. Will that continue? Probably yes. But consider the risk that it doesn't.