KarenJ
Intuit Alumni

Deductions & credits

If you did not move back into your home after it was rented and before it was sold, the period of time after its use as a principal residence does not qualify as "nonqualified use."

For example: After owning and living in it for several years, you move out of your main home on August 1, 2016, and rent it out for a year before selling it. The time it is rented out doesn't count as "nonqualified use" because it is AFTER being used as a principal residence.

If your home was a rental when you sold it, you will need to report the sale on Form 4797.  It appears that you meet the ownership and use test but you will need to use actual dates to confirm.  You can not exclude the part of the gain equal to the depreciation you claimed or could have claimed for renting the house.  The recaptured depreciation is taxed at ordinary income tax rates not to exceed 25%.

https://www.irs.gov/publications/p523