Buying
Renting
"Net cost of buying" = mortgage interest + taxes/maintenance − appreciation. "Net cost of renting" = total rent paid − investment growth on the down payment you didn't spend.
Free Rent vs. Buy Calculator
Buying isn't automatically better just because you build equity — this calculator also credits renting with the investment growth your down payment could have earned elsewhere. The shorter your time horizon, the more renting tends to win, since buying costs (closing costs, interest-heavy early payments) take years to be offset by appreciation.