Does this take into account the risk of a housing market crash? For me, the biggest reason for renting rather than buying is to avoid putting all my bags in one basket; I wouldn't buy $500k worth of shares of one company, so spending $500k on a single house seems similarly risky.
But if buying is like putting $500k of shares in a company (this is a really expensive house, man), renting is throwing your cash out the window. I mean, your mileage is going to vary on location, and a generic thread like this isn't necessarily all that useful, but in my area, a mortgage payment is actually less than a rental payment for a similar place. So even if it's a "bad investment", I can reclaim at least som…
With a mortgage, you're essentially leveraging around 1:5, which means you put down your 20%ish and get 100% of an asset. If the asset moves down 20%, your net equity is worth exactly 0. If the asset moves up 20%, you've made a profit of 100% (simplified, not considering the fees and other costs).
The trick to understand this is, if you put your down-payment money somewhere else, like a long-term index fund, what kinds of profits would you have expected? What about the risk, considering you're highly leveraged in a mortgage?
Thus the calculator to do the math for you.