26 U.S.C. § 121
Exclusion of gain from sale of principal residence
United States · Title 26 — INTERNAL REVENUE CODE · Status: effective
Cite this
- Citation
- 26 U.S.C. § 121, Exclusion of gain from sale of principal residence, United States, version 1 as recorded 2026-07-09, yourstate.us, https://yourstate.us/provision/462197
- Permanent ID
ys:prov:462197@1- SHA-256
14c466a313b6f9f123a018247b6c52aca222f8148e40d345cbae0a8f91fe4993
The hash is SHA-256 of this version's text, with every run of whitespace collapsed to a single space and the ends trimmed. The ID always leads back here, and checking it says whether the text you cited is still the current version.
Full text
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.
In the case of a husband and wife who make a joint return for the taxable year of the sale or exchange of the property—
Paragraph (1) shall be applied by substituting “$500,000” for “$250,000” if—
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.
For purposes of subparagraph (A), gain shall be allocated to periods of nonqualified use based on the ratio which—
For purposes of this paragraph—
The term “period of nonqualified use” means any period (other than the portion of any period preceding January 1, 2009) during which the property is not used as the principal residence of the taxpayer or the taxpayer’s spouse or former spouse.
The term “period of nonqualified use” does not include—
For purposes of this paragraph—
In the case of a sale or exchange to which this subsection applies, the ownership and use requirements of subsection (a), and subsection (b)(3), shall not apply; but the dollar limitation under paragraph (1) or (2) of subsection (b), whichever is applicable, shall be equal to—
the shorter of—
This subsection shall apply to any sale or exchange if—
subsection (a) would not (but for this subsection) apply to such sale or exchange by reason of—
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.
For purposes of this section—
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 paragraph, the term “divorce or separation instrument” means—
For purposes of this section, if the taxpayer holds stock as a tenant-stockholder (as defined in section 216) in a cooperative housing corporation (as defined in such section), then—
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 May 6, 1997, in respect of such property.
In the case of a taxpayer who—
For purposes of this section—
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).
At the election of an individual with respect to a property, the running of the 5-year period described in subsections (a) and (c)(1)(B) and paragraph (7) of this subsection with respect to such property shall be suspended during any period that such individual or such individual’s spouse is serving on qualified official extended duty—
The 5-year period described in subsection (a) shall not be extended more than 10 years by reason of subparagraph (A).
For purposes of this paragraph—
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 “employee of the intelligence community” means an employee (as defined by section 2105 of title 5, United States Code) of—
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.
At the election of an individual with respect to a property, the running of the 5-year period described in subsections (a) and (c)(1)(B) and paragraph (7) of this subsection with respect to such property shall be suspended during any period that such individual or such individual’s spouse is serving outside the United States—
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 11 See References in Text note below. (as in effect on the day before the date of the enactment of this section) in the nonrecognition of any part of the gain realized on the sale or exchange of another residence, in determining the period for which the taxpayer has owned and used such property as the taxpayer’s principal residence, there shall be included the aggregate periods for which such other residence (and each prior residence taken into account under section 1223(6) 1 in determining the holding period of such property) had been so owned and used.
Legislative history
The public laws that enacted or amended this section. Tallies are for the whole bill as it passed each chamber — often an omnibus covering far more than this provision — not a vote on this section alone. The law that originally enacted this section predates the public laws loaded here, so only later amendments are listed.
- Tax Reform Act of 1976House: no recorded tallySenate: no recorded tally
- Revenue Act of 1978House: no recorded tallySenate: no recorded tally
- Economic Recovery Tax Act of 1981House: no recorded tallySenate: no recorded tally
- Technical and Miscellaneous Revenue Act of 1988House: no recorded tallySenate: no recorded tally
- Taxpayer Relief Act of 1997
- Internal Revenue Service Restructuring and Reform Act of 1998
- Economic Growth and Tax Relief Reconciliation Act of 2001
- Military Family Tax Relief Act of 2003House: 413–0Senate: no recorded tally
- American Jobs Creation Act of 2004
- Gulf Opportunity Zone Act of 2005House: 415–4Senate: no recorded tally
- Tax Relief and Health Care Act of 2006House: no recorded tallySenate: no recorded tally
- Mortgage Forgiveness Debt Relief Act of 2007House: 386–27Senate: no recorded tally
- Tax Technical Corrections Act of 2007House: no recorded tallySenate: no recorded tally
- Heroes Earnings Assistance and Relief Tax Act of 2008House: 403–0Senate: no recorded tally
- Housing and Economic Recovery Act of 2008
- Tax Relief, Unemployment Insurance Reauthorization, and Job Creation Act of 2010House: 277–148Senate: no recorded tally
- Tax Increase Prevention Act of 2014
- An act to provide for reconciliation pursuant to titles II and V of the concurrent resolution on the budget for fiscal year 2018.