26 U.S.C. § 121
Exclusion of gain from sale of principal residence
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.
The amount of gain excluded from gross income under subsection (a) with respect to any sale or exchange shall not exceed $250,000.
If such spouses do not meet the requirements of subparagraph (A), the limitation under paragraph (1) shall be the sum of the limitations under paragraph (1) to which each spouse would be entitled if such spouses had not been married. For purposes of the preceding sentence, each spouse shall be treated as owning the property during the period that either spouse owned the property.
Subsection (a) shall not apply to any sale or exchange by the taxpayer if, during the 2-year period ending on the date of such sale or exchange, there was any other sale or exchange by the taxpayer to which subsection (a) applied.
In the case of a sale or exchange of property by an unmarried individual whose spouse is deceased on the date of such sale, paragraph (1) shall be applied by substituting “$500,000” for “$250,000” if such sale occurs not later than 2 years after the date of death of such spouse and the requirements of paragraph (2)(A) were met immediately before such date of death.
Subsection (a) shall not apply to so much of the gain from the sale or exchange of property as is allocated to periods of nonqualified use.
The term “period of nonqualified use” means any period (other than the portion of any period preceding
If a husband and wife make a joint return for the taxable year of the sale or exchange of the property, subsections (a) and (c) shall apply if either spouse meets the ownership and use requirements of subsection (a) with respect to such property.
For purposes of this section, in the case of an unmarried individual whose spouse is deceased on the date of the sale or exchange of property, the period such unmarried individual owned and used such property shall include the period such deceased spouse owned and used such property before death.
In the case of an individual holding property transferred to such individual in a transaction described in section 1041(a), the period such individual owns such property shall include the period the transferor owned the property.
Solely for purposes of this section, an individual shall be treated as using property as such individual’s principal residence during any period of ownership while such individual’s spouse or former spouse is granted use of the property under a divorce or separation instrument.
For purposes of this section, the destruction, theft, seizure, requisition, or condemnation of property shall be treated as the sale of such property.
In applying section 1033 (relating to involuntary conversions), the amount realized from the sale or exchange of property shall be treated as being the amount determined without regard to this section, reduced by the amount of gain not included in gross income pursuant to this section.
If the basis of the property sold or exchanged is determined (in whole or in part) under section 1033(b) (relating to basis of property acquired through involuntary conversion), then the holding and use by the taxpayer of the converted property shall be treated as holding and use by the taxpayer of the property sold or exchanged.
Subsection (a) shall not apply to so much of the gain from the sale of any property as does not exceed the portion of the depreciation adjustments (as defined in section 1250(b)(3)) attributable to periods after
At the election of the taxpayer, this section shall not fail to apply to the sale or exchange of an interest in a principal residence by reason of such interest being a remainder interest in such residence, but this section shall not apply to any other interest in such residence which is sold or exchanged separately.
Subparagraph (A) shall not apply to any sale to, or exchange with, any person who bears a relationship to the taxpayer which is described in section 267(b) or 707(b).
The 5-year period described in subsection (a) shall not be extended more than 10 years by reason of subparagraph (A).
The term “qualified official extended duty” means any extended duty while serving at a duty station which is at least 50 miles from such property or while residing under Government orders in Government quarters.
The term “uniformed services” has the meaning given such term by section 101(a)(5) of title 10, United States Code, as in effect on the date of the enactment of this paragraph.
The term “member of the Foreign Service of the United States” has the meaning given the term “member of the Service” by paragraph (1), (2), (3), (4), or (5) of section 103 of the Foreign Service Act of 1980, as in effect on the date of the enactment of this paragraph.
The term “extended duty” means any period of active duty pursuant to a call or order to such duty for a period in excess of 90 days or for an indefinite period.
An election under subparagraph (A) with respect to any property may not be made if such an election is in effect with respect to any other property.
An election under subparagraph (A) may be revoked at any time.
If a taxpayer acquires property in an exchange with respect to which gain is not recognized (in whole or in part) to the taxpayer under subsection (a) or (b) of section 1031, subsection (a) shall not apply to the sale or exchange of such property by such taxpayer (or by any person whose basis in such property is determined, in whole or in part, by reference to the basis in the hands of such taxpayer) during the 5-year period beginning with the date of such acquisition.
For purposes of subparagraph (A), rules similar to the rules of subparagraphs (B) and (D) of paragraph (9) shall apply.
This section shall not apply to any sale or exchange by an individual if the treatment provided by section 877(a)(1) applies to such individual.
This section shall not apply to any sale or exchange with respect to which the taxpayer elects not to have this section apply.
For purposes of this section, in the case of property the acquisition of which by the taxpayer resulted under section 1034 1
The date of the enactment of this paragraph, referred to in subsec. (d)(9)(C)(ii), (iii), is the date of enactment of Pub. L. 108–121, which was approved
Section 103 of the Foreign Service Act of 1980, referred to in subsec. (d)(9)(C)(iii), is classified to section 3903 of Title 22, Foreign Relations and Intercourse.
Section 1034 (as in effect on the day before the date of the enactment of this section), referred to in subsec. (g), probably means section 1034 of this title as in effect on the day before the date of enactment of Pub. L. 105–34 which amended this section generally and was approved
Section 1223(6), referred to in subsec. (g), was repealed by Pub. L. 113–295, div. A, title II, § 221(a)(80)(C),
Pub. L. 109–135, title IV, § 403(ee)(1), (nn),
Pub. L. 108–121, title I, § 101(a), (b)(1),
A prior section 121 was renumbered section 140 of this title.
2017—Subsec. (d)(3)(B). Pub. L. 115–97, § 11051(b)(3)(A)(i), struck out “(as defined in section 71(b)(2))” after “divorce or separation instrument”.
Subsec. (d)(3)(C). Pub. L. 115–97, § 11051(b)(3)(A)(ii), added subpar. (C).
2014—Subsec. (b)(3). Pub. L. 113–295, § 221(a)(20), struck out subpar. (A) designation and heading and subpar. (B) and realigned margins. Prior to amendment, text of subpar. (B) read as follows: “Subparagraph (A) shall be applied without regard to any sale or exchange before
Subsec. (b)(4), (5). Pub. L. 113–295, § 212(c), redesignated par. (4), relating to exclusion of gain allocated to nonqualified use, as (5).
Subsec. (d)(12)(B). Pub. L. 113–295, § 213(c)(1), inserted “of paragraph (9)” after “and (D)”.
2010—Subsec. (d)(11). Pub. L. 111–312 amended subsec. (d) to read as if amendment by Pub. L. 107–16, § 542(c), which originally added par. (9), had never been enacted. See Codification notes above and 2001 Amendment note and Effective Date of 2010 Amendment note below. Prior to amendment, par. (11) read as follows: “
“(A) the estate of a decedent,
“(B) any individual who acquired such property from the decedent (within the meaning of section 1022), and
“(C) a trust which, immediately before the death of the decedent, was a qualified revocable trust (as defined in section 645(b)(1)) established by the decedent,
determined by taking into account the ownership and use by the decedent.”
2008—Subsec. (b)(4). Pub. L. 110–289 added par. (4) relating to exclusion of gain allocated to nonqualified use.
Subsec. (d)(9)(C)(vi). Pub. L. 110–245, § 113(b), struck out heading and text of cl. (vi). Text read as follows: “An employee of the intelligence community shall not be treated as serving on qualified extended duty unless such duty is at a duty station located outside the United States.”
Subsec. (d)(9)(E). Pub. L. 110–245, § 113(a), struck out heading and text of subpar. (E). Text read as follows: “Clause (iii) of subparagraph (A) shall not apply with respect to any sale or exchange after
Subsec. (d)(12). Pub. L. 110–245, § 110(a), added par. (12).
2007—Subsec. (b)(4). Pub. L. 110–142 added par. (4) relating to special rule for certain sales by surviving spouses.
Subsec. (d)(9)(E). Pub. L. 110–172 added subpar. (E).
2006—Subsec. (d)(9). Pub. L. 109–432, § 417(d), substituted “Uniformed services, Foreign Service, and intelligence community” for “Members of uniformed services and Foreign Service” in heading.
Subsec. (d)(9)(A). Pub. L. 109–432, § 417(a), substituted “duty—
“(i) as a member of the uniformed services,
“(ii) as a member of the Foreign Service of the United States, or
“(iii) as an employee of the intelligence community.”
for “duty as a member of the uniformed services or of the Foreign Service of the United States.”
Subsec. (d)(9)(C)(iv), (v). Pub. L. 109–432, § 417(b), added cl. (iv) and redesignated former cl. (iv) as (v).
Subsec. (d)(9)(C)(vi). Pub. L. 109–432, § 417(c), added cl. (vi).
2005—Subsec. (d)(10). Pub. L. 109–135, § 403(ee)(2), amended heading and text of par. (10) relating to property acquired in like-kind exchange generally. Prior to amendment, text read as follows: “If a taxpayer acquired property in an exchange to which section 1031 applied, subsection (a) shall not apply to the sale or exchange of such property if it occurs during the 5-year period beginning with the date of the acquisition of such property.”
Subsec. (d)(11). Pub. L. 109–135, § 403(ee)(1), redesignated par. (10), formerly par. (9), as added by Pub. L. 107–16, as (11). See Codification notes above and 2001 and 2003 Amendment notes and Effective Date of 2001 Amendment note below.
Subsec. (g). Pub. L. 109–135, § 402(a)(3), substituted “section 1223(6)” for “section 1223(7)”.
2004—Subsec. (d)(10). Pub. L. 108–357 added par. (10) relating to property acquired in like-kind exchange.
2003—Subsec. (d)(9), (10). Pub. L. 108–121 added par. (9) and redesignated former par. (9), as added by Pub. L. 107–16, as (10). See Codification notes above and 2001 Amendment note and Effective Date of 2001 Amendment note below.
2001—Subsec. (d)(9). Pub. L. 107–16, § 542(c), added par. (9). See Codification notes above and Effective Date of 2001 Amendment note below.
1998—Subsec. (b)(2). Pub. L. 105–206, § 6005(e)(1), substituted “Special rules for joint returns” for “$500,000 limitation for certain joint returns” in heading and amended text generally. Prior to amendment, text read as follows: “Paragraph (1) shall be applied by substituting ‘$500,000’ for ‘$250,000’ if—
“(A) a husband and wife make a joint return for the taxable year of the sale or exchange of the property,
“(B) either spouse meets the ownership requirements of subsection (a) with respect to such property,
“(C) both spouses meet the use requirements of subsection (a) with respect to such property, and
“(D) neither spouse is ineligible for the benefits of subsection (a) with respect to such property by reason of paragraph (3).”
Subsec. (c)(1). Pub. L. 105–206, § 6005(e)(2), reenacted heading without change and amended text generally. Prior to amendment, text read as follows: “In the case of a sale or exchange to which this subsection applies, the ownership and use requirements of subsection (a) shall not apply and subsection (b)(3) shall not apply; but the amount of gain excluded from gross income under subsection (a) with respect to such sale or exchange shall not exceed—
“(A) the amount which bears the same ratio to the amount which would be so excluded under this section if such requirements had been met, as
“(B) the shorter of—
“(i) the aggregate periods, during the 5-year period ending on the date of such sale or exchange, such property has been owned and used by the taxpayer as the taxpayer’s principal residence, or
“(ii) the period after the date of the most recent prior sale or exchange by the taxpayer to which subsection (a) applied and before the date of such sale or exchange,
bears to 2 years.”
1997—Pub. L. 105–34 amended section catchline and text generally. Prior to amendment, section related to one-time exclusion of gain from sale of principal residence by individual who had attained age 55.
1988—Subsec. (d)(9). Pub. L. 100–647 added par. (9).
1981—Subsec. (b)(1). Pub. L. 97–34 substituted “$125,000 ($62,500” for “$100,000 ($50,000”.
1978—Pub. L. 95–600, § 404(a), substituted “One-time exclusion of gain from sale of principal residence by individual who has attained age 55” for “Gain from sale or exchange of residence of individual who has attained age 65” in section catchline.
Subsec. (a). Pub. L. 95–600, § 404(a), substituted “55” for “65”, “5-year” for “8-year”, and “3 years” for “5 years”.
Subsec. (b). Pub. L. 95–600, § 404(a), in par. (1) substituted provisions respecting dollar limitations for amount of gain for provisions setting forth applicable limitations where the adjusted sales price exceeds $35,000 and added par. (3).
Subsec. (d)(2). Pub. L. 95–600, § 404(c)(1), substituted “5-year period” for “8-year period”.
Subsec. (d)(5). Pub. L. 95–600, § 404(c)(2), substituted “5-year period” for “8-year period” and “3 years” for “5 years”.
Subsec. (d)(8). Pub. L. 95–600, § 404(b), added par. (8).
1976—Subsec. (b)(1). Pub. L. 94–455, § 1404(a), substituted “$35,000” for “$20,000” in three places.
Subsecs. (c), (d)(5). Pub. L. 94–455, § 1906(b)(13)(A), struck out “or his delegate” after “Secretary”.
Amendment by Pub. L. 115–97 applicable to any divorce or separation instrument (as defined in former section 71(b)(2) of this title as in effect before
Amendment by section 212(c) of Pub. L. 113–295 effective as if included in the provisions of the Housing Assistance Tax Act of 2008, Pub. L. 110–289, div. C, to which such amendment relates, see section 212(d) of Pub. L. 113–295, set out as a note under section 42 of this title.
Pub. L. 113–295, div. A, title II, § 213(d),
Amendment by section 221(a)(20) of Pub. L. 113–295 effective
Pub. L. 111–312, title III, § 301(e),
Pub. L. 111–312, title III, § 304,
[Amendment by Pub. L. 112–240 (repealing section 304 of Pub. L. 111–312, formerly set out above) applicable to taxable, plan, or limitation years beginning after
Pub. L. 110–289, div. C, title III, § 3092(b),
Pub. L. 110–245, title I, § 110(b),
Pub. L. 110–245, title I, § 113(c),
Pub. L. 110–142, § 7(b),
Pub. L. 109–432, div. A, title IV, § 417(e),
Amendment by section 402(a)(3) of Pub. L. 109–135 effective as if included in the provisions of the Energy Policy Act of 2005, Pub. L. 109–58, to which it relates, but not applicable with respect to any transaction ordered in compliance with the Public Utility Holding Company Act of 1935 (15 U.S.C. 79 et seq.) before its repeal, see section 402(m) of Pub. L. 109–135, set out as an Effective and Termination Dates of 2005 Amendments note under section 23 of this title.
Amendment by section 403(ee) of Pub. L. 109–135 effective as if included in the provision of the American Jobs Creation Act of 2004, Pub. L. 108–357, to which such amendment relates, see section 403(nn) of Pub. L. 109–135, set out as a note under section 26 of this title.
Pub. L. 108–357, title VIII, § 840(b),
Pub. L. 108–121, title I, § 101(b),
Pub. L. 107–16, title V, § 542(f),
Amendment by Pub. L. 105–206 effective, except as otherwise provided, as if included in the provisions of the Taxpayer Relief Act of 1997, Pub. L. 105–34, to which such amendment relates, see section 6024 of Pub. L. 105–206, set out as a note under section 1 of this title.
Pub. L. 105–34, title III, § 312(d),
Pub. L. 100–647, title VI, § 6011(b),
Pub. L. 97–34, title I, § 123(b),
Pub. L. 95–600, title IV, § 404(d)(1),
Pub. L. 94–455, title XIV, § 1404(b),
Pub. L. 88–272, title II, § 206(c),
Pub. L. 105–261, div. A, title X, § 1074,
Pub. L. 95–600, title IV, § 404(d)(2),