You certainly paid a tax when you bought your home. I don’t know how it’s called or how much is it in your area, but you have to add that to the cost of what you bought, or deduce it from what you will sell (assuming the home value stays the same).
Then you also have to deduce all the real estate yearly taxes. And then all the costs associated with the real estate property itself (the ones you wouldn’t have to pay as a renter). Then you’ll have to deduce the real estate agency fees.
Then and only then you can start making some comparisons between buying and renting.