Selling my home

I want to sell my home to make a profit but I want to rent my for a while before I buy a new home. My question is do I have to pay income tax on the profit I make from the sale  

if not how long do I have before I purchase a new home.