You can avoid capital gains taxes on up to $250,000 in gains for single tax filers or $500,000 in gains for married joint filers if you successfully convert a rental property to a primary residence and meet the requirements for excluding gains. You must own and use the property as your primary residence for at least two of the five years before the sale to take advantage of the capital gains tax exclusion.