For sales and exchanges made after May 6, 1997, gross income shall not include gain from the sale or exchange of property if, during the 5-year period ending on the date of the sale or exchange, such property has been owned and used by the taxpayer as the taxpayer’s principal residence for periods aggregating 2 years or more (Section 121(a)).

Property Owned By Spouse or Former Spouse:

Property Transferred to Spouse from Spouse or Former Spouse: In the case of an transfer described in Section 1041(a), the period of ownership of the transferee spouse includes the period the transferor owned the property (Sec. 121(d)(3)(A)). Observation: The period of use does not include the period used by the former spouse.

Property Used by Former Spouse Pursuant to Divorce, Etc.: Solely for purposes of determining the exclusion of gain, an individual shall be treated as using such property as such individual’s principal residence during any period while such individual’s spouse or former spouse is granted use of the property under a divorce or separation instrument defined in Section 71(b)(2).

SOURCE: DivorceSource