If you're staying in the same place for ~10 years, that is right. However, if you are NOT staying long term, you pay that + a profit margin to your landlord, but avoid the (usually 6%-8% all things considered) friction that goes to real estate agents, etc.
If you live in NYC, and your studio apartment is worth $500K, that's $40K in friction costs -- rent for 16-18 months for the same unit. Ammortized over 10 years, it is not a big deal. However, if you move after 3 years, that brings your "owner equivalent rent" up by 50%.
Circumstance is everything.
In a city like NYC or SF where most people can't afford a house larger than they need at the moment, the introduction of kids forces you to move -- thus, if you're planning kids in the next few years, you're better off renting even if you know you'll stay in SF for the next 20 years.
If you live in NYC, and your studio apartment is worth $500K, that's $40K in friction costs -- rent for 16-18 months for the same unit. Ammortized over 10 years, it is not a big deal. However, if you move after 3 years, that brings your "owner equivalent rent" up by 50%.
Circumstance is everything.
In a city like NYC or SF where most people can't afford a house larger than they need at the moment, the introduction of kids forces you to move -- thus, if you're planning kids in the next few years, you're better off renting even if you know you'll stay in SF for the next 20 years.