It’s a function of how long you’ll be in the property. If you’re in the property long enough to cover the selling expense, then you’re golden.
Simple math, no appreciation in the property:
$100,000 house/ $500 per month mortgage / $1000 per month rent / 10% or $10k in selling costs
You will recover the $10k selling costs in 20 months, so that’s your break-even point. After 20 months, you’re putting $500 in your pocket each month.
If you’re staying in the home less than one year and eight months, rent! Longer than one year and 8 months, buy.
Plug in your numbers and do the math to see how long you have to live there to break even. Good luck!