Text or WhatsApp (808) 600-9260

Tax Law

IRC Section 121 Explained: The Home Sale Exclusion in the Code

IRC Section 121 lets a taxpayer exclude gain from selling a principal residence, up to $250,000, or $500,000 for certain joint returns. The taxpayer generally must have owned and used the property as a principal residence for at least 2 years during the 5-year period ending on the sale date (IRC § 121(a), (b)).

This page is general research, not tax, legal, or investment advice. Do not take any action based on this page without first consulting a qualified CPA or tax attorney who knows your facts.

Statute at a glance26 U.S.C. §121

What Section 121 Does

Section 121 of the Internal Revenue Code lets a taxpayer exclude part or all of the gain from selling or exchanging a principal residence if the statutory requirements are met. The exclusion is not automatic and does not apply to every home sale. Whether it applies, and how much gain it covers, depends on ownership history, residence use, prior sales, filing status, and limits and exceptions in subsections (b) through (f).

The Core Test in Section 121(a)

Subsection (a) sets out the basic rule. Gross income does not include gain from the sale or exchange of property if, during the 5-year period ending on the sale or exchange date, the taxpayer owned the property and used it as the taxpayer's principal residence “for periods aggregating 2 years or more” (IRC § 121(a)).

Three features of this test are relevant:

  • Two separate requirements. The statute refers to both ownership and use as a principal residence. Meeting one does not by itself satisfy the other.
  • A look-back window. The 5-year period is measured backward from the date of the sale or exchange.
  • Aggregation. The 2-year figure refers to periods that add up to 2 years or more. On the face of the text, the periods do not need to be continuous.

Dollar Limits in Section 121(b)

Subsection (b) caps the exclusion.

RuleFigureDate labelPinpoint cite
General limit per sale or exchange$250,000Statutory figure, no tax year statedIRC § 121(b)(1)
Qualifying joint return$500,000Statutory figure, no tax year statedIRC § 121(b)(2)(A)
Other joint returnsSum of each spouse's individual limitStatutory figure, no tax year statedIRC § 121(b)(2)(B)

Joint returns that may qualify for the $500,000 limit. Under § 121(b)(2)(A), spouses filing a joint return may use the $500,000 limit if all of the following apply:

  • either spouse meets the ownership requirement
  • both spouses meet the use requirement
  • neither spouse is disqualified under the repeat-sale rule in § 121(b)(3)

Joint returns that do not meet those conditions. Under § 121(b)(2)(B), the limit is the sum of the limits each spouse would have had if unmarried. For this purpose, each spouse is treated as owning the property during the periods either spouse owned it.

The Repeat-Sale Rule

Section 121(b)(3) generally makes subsection (a) unavailable if, during the 2-year period ending on the date of the sale or exchange, the taxpayer had another sale or exchange that received the subsection (a) exclusion. Subsection (c), discussed below, can modify this result in specified circumstances.

Surviving Spouses

Section 121(b)(4) addresses a sale by an unmarried surviving spouse. If the sale takes place within 2 years after the spouse's death, the surviving spouse may be able to use the $500,000 limit. This applies only if the joint-return conditions in § 121(b)(2)(A) were met immediately before the death. Whether a particular surviving spouse qualifies depends on the facts and statutory conditions.

Nonqualified Use

Section 121(b)(5) limits the exclusion when the property had periods of “nonqualified use.” The exclusion does not cover the portion of gain allocated to those periods under the statutory ratio (IRC § 121(b)(5)(A) and (B)).

The statutory definition in § 121(b)(5)(C) contains several boundaries and exceptions:

  • Pre-2009 periods. The definition generally does not include periods before January 1, 2009.
  • Temporary absence. An exception covers certain temporary absences, for an aggregate period not exceeding 2 years (IRC § 121(b)(5)(C)(ii)(II)).
  • Qualified official extended duty. A separate exception covers qualifying extended-duty periods, for an aggregate period not exceeding 10 years (IRC § 121(b)(5)(C)(ii)(III)).

How the allocation works for a given property depends on its ownership and use history. A qualified professional can review that analysis.

Reduced Exclusion Under Section 121(c)

Section 121(c) applies to certain sales or exchanges caused by a change in place of employment, health, or qualifying unforeseen circumstances. For these sales, the statute provides that the ownership and use requirements and the repeat-sale rule do not apply. Instead, a reduced limit applies. That limit is calculated in proportion to a 2-year measure (IRC § 121(c)(1) and (2)).

Whether a sale falls within § 121(c) depends on the facts and statutory language. Regulations or IRS guidance may also affect how these categories are interpreted.

Special Rules in Section 121(d)

Subsection (d) contains a series of special rules:

  • Joint returns and a deceased spouse's ownership and use. Rules on attributing ownership and use between spouses in specified situations.
  • Transfers between spouses or former spouses. Rules on how these transfers interact with the ownership and use tests.
  • Cooperative housing. Treatment of stock in a cooperative housing arrangement.
  • Involuntary conversions. Coordination of § 121 with involuntary conversions.
  • Depreciation. A rule on gain attributable to depreciation adjustments for periods after May 6, 1997 (IRC § 121(d)(6)).
  • Care-facility residence. A rule that requires at least 1 year of ownership and principal-residence use during the 5-year period (IRC § 121(d)(7)).
  • Remainder interests. Treatment of sales of certain remainder interests.
  • Qualified official extended duty. The definition requires a duty station at least 50 miles from the property, or residence in government quarters. “Extended duty” means active duty for more than 90 days or for an indefinite period (IRC § 121(d)(9)(C)(i) and (v)).
  • Like-kind exchange property. For property acquired in certain like-kind exchanges, subsection (a) does not apply to a sale or exchange during the 5-year period beginning on the date of acquisition (IRC § 121(d)(10)).
  • Peace Corps service. A rule addressing certain Peace Corps service (IRC § 121(d)(12)).

Each of these rules has its own conditions. A summary list does not replace reading the statute with a qualified professional.

When Section 121 Does Not Apply: Subsections (e) and (f)

Two further provisions can make § 121 unavailable for a sale or exchange:

  • Expatriates. Under § 121(e), § 121 does not apply if the expatriate rule in § 877(a)(1) applies to the taxpayer.
  • Election out. Under § 121(f), § 121 does not apply if the taxpayer elects not to have it apply.

Whether an election out could matter in a particular case is a question for a CPA or tax attorney.

Hypothetical Example

This is a hypothetical example for illustration only. It is not an official example and does not come from an IRS or Treasury source.

Assume a single taxpayer sells a home. Assume a qualified advisor has determined that the realized gain is $320,000. Also assume every requirement of § 121(a) is met, and no limitation or exception applies other than the dollar limit in § 121(b)(1).

  • Under § 121(b)(1), the exclusion would be limited to $250,000.
  • The remaining $70,000 would not be excluded under § 121. How that amount is taxed is outside the scope of this page.

Now assume the same facts, except that the sellers are spouses filing a qualifying joint return that meets every condition in § 121(b)(2)(A). The applicable limit would be $500,000. The full $320,000 might then be excludable if all statutory requirements are met.

These assumptions remove much of the real-world complexity. Real transactions often raise questions about basis, selling expenses, depreciation, nonqualified use, and ownership history. This example does not address those questions, and its result should not be read as applying to any actual sale.

Questions to Take to a CPA or Tax Attorney

These questions are meant to help structure a conversation with a qualified professional. They are not recommendations.

  1. Based on the full ownership and use history, does the property appear to meet the 2-year and 5-year tests in § 121(a)?
  2. Did any earlier sale or exchange within the preceding 2 years receive the § 121(a) exclusion, and how does § 121(b)(3) apply?
  3. If the sellers are married and filing jointly, are the conditions in § 121(b)(2)(A) met, or does § 121(b)(2)(B) govern the limit?
  4. If a spouse has died, do the conditions in § 121(b)(4) apply to the timing and facts of the sale?
  5. Were there periods of nonqualified use after January 1, 2009, and do the temporary-absence or extended-duty exceptions in § 121(b)(5)(C) apply?
  6. Could the sale fall within § 121(c), and if so, how would the reduced limit be calculated?
  7. Does any special rule in § 121(d) apply, such as the depreciation rule, the care-facility rule, the extended-duty rule, or the like-kind exchange rule?
  8. Could § 121(e) or § 121(f) make § 121 unavailable?
  9. What regulations or IRS guidance could affect the analysis?
  10. How should basis, selling expenses, and any depreciation be documented for this transaction?

This page is general research, not tax, legal, or investment advice. Do not take any action based on this page without first consulting a qualified CPA or tax attorney who knows your facts.

Sources

All citations are to 26 U.S.C. § 121. Official URL: https://www.law.cornell.edu/uscode/text/26/121

  1. IRC § 121(a): ownership and use test, 2 years within the 5-year period
  2. IRC § 121(b)(1): $250,000 limit
  3. IRC § 121(b)(2)(A) and (B): joint-return limits
  4. IRC § 121(b)(3): 2-year repeat-sale rule
  5. IRC § 121(b)(4): surviving-spouse rule
  6. IRC § 121(b)(5)(A) through (C): nonqualified use, January 1, 2009 boundary, 2-year and 10-year exceptions
  7. IRC § 121(c)(1) and (2): reduced limit for specified sales
  8. IRC § 121(d)(1) through (10) and (12): special rules
  9. IRC § 121(d)(6): depreciation adjustments after May 6, 1997
  10. IRC § 121(d)(7): care-facility rule, 1-year requirement
  11. IRC § 121(d)(9)(C)(i) and (v): 50-mile and 90-day extended-duty definitions
  12. IRC § 121(d)(10): 5-year rule for like-kind exchange property
  13. IRC § 121(e): expatriate rule cross-reference to § 877(a)(1)
  14. IRC § 121(f): election not to apply § 121