I've run the numbers for SF and even before interest rates went up, the per month carry costs of owning (mortgage, insurance, property taxes, maintenance, etc) are 50-100% higher than renting.
If you include historic price appreciation over certain periods, you can end up ahead owning, but nothing guarantees that same price appreciation going forward.
If you include historic price appreciation over certain periods, you can end up ahead owning, but nothing guarantees that same price appreciation going forward.