Plan on two years back in the home as your primary residence, and remember the exclusion is only available once every two years. The primary-residence capital gains exclusion (IRS Section 121) requires that you owned and lived in the home as your primary residence for at least two of the five years before the sale. When you move back into a former rental, the residency clock runs from the day it became your primary residence again, so you generally need to reach that two-year mark before selling if you want the exclusion. The rule that catches people: one exclusion per two years. If you claimed it on the primary home you just sold, a full two years must pass before you can use it again, even once the next home passes the two-of-five-years test. Also expect depreciation recapture on the years the home was a rental. The exclusion does not erase that. Tax rules carry exceptions and change over time, so confirm your specific timeline and any recapture with a tax professional before you list. Getting the sale date right can be the difference between a large tax bill and none at all.