Selling Your Home? How IRC § 121 Can Let You Walk Away Tax-Free — And the Critical Rules Most People Overlook

Few tax breaks are as valuable—or as misunderstood—as the Section 121 exclusion. For most homeowners, the rule is simple: Sell your home, live there two out of the last five years, and up to 500,000 for married couples) of capital gain disappears from your tax return. See, e.g., IRC §121(b)(1)-(2). But the cases and rulings beneath that simple surface are far more complex. When does a “partial exclusion” apply even if you moved early? How do you handle a home that was rented out before you lived in it? And what happens when the sale is due to divorce, job loss, or a medical crisis?

This post walks through the law, the Treasury Regulations, and the Tax Court decisions that actually decide these cases. By the end, you will have a working knowledge of one of the most powerful exclusions in the Internal Revenue Code and, just as important, the pitfalls that can cost you the exclusion entirely.


The Core Rule: IRC § 121(a)

The starting point is the language of the statute itself. Internal Revenue Code § 121(a) provides as follows:

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. 26 U.S.C. § 121(a); see also Bloomberg Tax IRC (“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”).

That is the entire general rule in a single sentence.

Dollar Limitations

The amount of gain that can be excluded is capped:

  • $250,000 for single filers or married taxpayers filing separately.
  • 250,000 of capital gains from the sale of their primary residence — or $500,000 if married filing jointly”).

Frequency Limitation

The exclusion generally can be used only once every two years. IRC §121(b)(3) provides that the exclusion does not apply to a sale if, during the two-year period ending on the date of the sale, the taxpayer used the exclusion for another home sale. See CPA Journal (“The core of IRC section 121 is fairly simple — provided that they satisfy the ownership requirements”).


The Treasury Regulations Fill In the Gaps

The statute is short, but the Treasury Regulations are where the actual operating rules live.

The Two-Year Test Is Measured in Days

While the statute refers to “periods aggregating 2 years or more,” the regulations make clear that this means 24 full months or 730 days. Ownership and use can be satisfied during non-concurrent periods as long as both tests are met within the five-year window ending on the date of sale. Treas. Reg. § 1.121-1(a); 26 CFR § 1.121-1(a) (a taxpayer may exclude gain only if, during the five-year period ending on the date of sale, the taxpayer owned and used the property as the taxpayer’s principal residence for periods aggregating two years or more).

What Is a “Principal Residence”? The Regulations List Six Factors

The Code does not define “principal residence.” For taxpayers who own multiple homes, the determination is highly factual. Treas. Reg. § 1.121-1(b)(2) lists six non-exclusive factors:

  1. The taxpayer’s place of employment;
  2. The principal place of abode of the taxpayer’s family members;
  3. The address listed on the taxpayer’s federal and state tax returns, driver’s license, automobile registration, and voter registration card;
  4. The taxpayer’s mailing address for bills and correspondence;
  5. The location of the taxpayer’s banks; and
  6. The location of religious organizations and recreational clubs with which the taxpayer is affiliated. Treas. Reg. § 1.121-1(b)(2)(i)-(vi).

If a taxpayer alternates between two properties, the property used a majority of the time during the year ordinarily will be considered the principal residence. Treas. Reg. § 1.121-1(b)(2).

Vacant Land Can Qualify (With Conditions)

A sale of vacant land can qualify for the exclusion only if the vacant land is adjacent to the dwelling unit of the principal residence, the taxpayer owned and used the land as part of the principal residence, and the dwelling unit is sold within two years before or two years after the sale of the vacant land. Treas. Reg. § 1.121-1(b)(3)(i)(A)-(D).


Critical Limitation: Gain Allocable to “Nonqualified Use” Is Not Excluded

One of the most frequently misunderstood provisions is IRC §121(b)(5), which denies the exclusion for gain allocable to periods of “nonqualified use.” This was added by the Housing and Economic Recovery Act of 2008 for sales after December 31, 2008. Journal of Accountancy (2008) (“For sales after Dec. 31, 2008, the IRC § 121 exclusion of gain will not apply to any gain allocated to a period of ‘nonqualified use'”).

“Period of nonqualified use” means any period during which the property is not used as the taxpayer’s principal residence (or as the principal residence of the taxpayer’s spouse or former spouse). IRC §121(b)(5)(C)(i).

Exceptions. The following periods are not treated as nonqualified use:

  • Any period before January 1, 2009; IRC §121(b)(5)(C)(ii)(I).
  • Any period during which the property is used as a principal residence by the taxpayer’s spouse or former spouse; IRC §121(b)(5)(C)(ii)(II).
  • Any period of temporary absence due to change of employment, health conditions, or such other unforeseen circumstances (not to exceed an aggregate of two years). IRC §121(b)(5)(C)(ii)(III); see also Journal of Accountancy (“periods when the homeowner did not live in the residence due to military service, change of employment, health conditions or other unforeseen circumstances also do not count as periods of nonqualified use”).

Practical effect. If you owned a rental property for several years, then moved into it as your primary residence, a portion of the gain attributable to the rental period will not be eligible for exclusion under this provision.


Depreciation Recapture: The Gain That Cannot Be Excluded

For property that was used partially for business or rental purposes, depreciation deductions taken after May 6, 1997 must be recaptured as ordinary income and cannot be excluded under section 121. IRC §121(d)(6); see also IRC §121(d)(9) (gain shall be excluded only to the extent it does not exceed the gain that would have been recognized without depreciation).

The regulations confirm that allocation is required for gain allocable to a portion of the property separate from the dwelling unit. Treas. Reg. § 1.121-1(e)(1) (“Section 121 will not apply to the gain allocable to any portion (separate from the dwelling unit) of property sold or exchanged with respect to which a taxpayer does not satisfy the use requirement”). However, if the business portion is not separate from the dwelling unit (e.g., a home office within the house), allocation is generally not required except for depreciation recapture. See ThinkAdvisor (2024) (“Allocation is only required if the property used for business purposes is separate from the taxpayer’s principal residence”).


Partial Exclusion Under IRC § 121(c) and Treas. Reg. § 1.121-3

What if you sell before satisfying the two-year ownership and use test? Under IRC §121(c) and Treas. Reg. § 1.121-3, a reduced maximum exclusion may be available if the sale is by reason of:

  1. A change in place of employment;
  2. Health; or
  3. Unforeseen circumstances. Treas. Reg. § 1.121-3(a)-(b).

The regulations include specific safe harbors.

Change in Place of Employment (Distance Safe Harbor)

A sale is deemed to be by reason of a change in place of employment if the new place of employment is at least 50 miles farther from the residence than the old place of employment. Treas. Reg. § 1.121-3(c)(2).

Health Reasons

A sale is by reason of health if the primary reason is to obtain, provide, or facilitate the diagnosis, cure, mitigation, or treatment of disease, or to obtain medical care for a qualified individual. Treas. Reg. § 1.121-3(d). Moving to a better climate for a health condition can qualify. Treas. Reg. § 1.121-3(d)(2).

Unforeseen Circumstances — The Catch-All Category

Unforeseen circumstances are defined as events that the taxpayer could not reasonably have anticipated before purchasing and occupying the residence. Treas. Reg. § 1.121-3(e)(1) (“events the taxpayer could not reasonably have anticipated before purchasing and occupying the residence”).

Specific-event safe harbors under Treas. Reg. § 1.121-3(e)(2) include:

  • Divorce or legal separation;
  • Multiple births from a single pregnancy;
  • Job loss that leaves the taxpayer unable to pay mortgage or reasonable living expenses;
  • Death of a co-owner of the property; and
  • Casualty loss to the residence (even if not deductible). Treas. Reg. § 1.121-3(e)(2).

The IRS has also ruled that the creation of a blended family through marriage, combining two households, could qualify as an unforeseen circumstance. Journal of Accountancy (2007) (“The IRS said that under Treas. Reg. § 1.121-3(e)(1) the marriage and combining of families was an event the taxpayer could not reasonably have anticipated”).

If a safe harbor does not apply, a taxpayer may still qualify under a facts-and-circumstances test. The regulations list multiple factors, including proximity in time, material change in the suitability of the property, material impairment of financial ability, and whether the circumstances were reasonably foreseeable. Treas. Reg. § 1.121-3(b)(1)-(6).

How the Partial Exclusion Is Calculated

The reduced exclusion is calculated as a fraction:

(Number of months the taxpayer owned and used the property as a principal residence during the 5-year period ending on the date of sale) ÷ 24 months × Maximum exclusion (500,000)

See Treas. Reg. § 1.121-3(g)ThinkAdvisor (2024) (“The reduced maximum exclusion is computed by multiplying the maximum dollar limitation of 500,000 for certain joint filers) by a fraction”).


What the Tax Court Teaches Us About the Exclusion

Gates v. Commissioner, 132 T.C. 10 (2009): The Property Sold Must Be the Principal Residence

In Gates v. Commissioner, the taxpayers purchased a property in Santa Barbara, demolished the existing house, built a new house, but never lived in the new house before selling it. The court held that the taxpayers could not exclude the gain under section 121(a) because the new house was never used as their principal residence. The court clarified that “property” under section 121(a) refers to the dwelling actually used as the principal residence, not merely the land on which it sits. Gates v. Commissioner, 132 T.C. 10, 13-15 (2009).

Takeaway: Both the ownership and use tests are separate, and both must be satisfied with respect to the exact dwelling that is sold.

Guinan v. United States: Where Is Your “Principal Residence”?

In Guinan v. United States, the court rejected taxpayers’ claim that a Wisconsin home was their principal residence when the weight of the evidence (driver’s license, voter registration, place of employment) pointed to Illinois. Guinan v. United States (“The court rejected taxpayers’ attempt to claim a Wisconsin home as their principal residence”). The case underscores the importance of the multi-factor test under the regulations.

Gummer v. United States, 40 Fed. Cl. 812 (1998)

Gummer v. United States involved a taxpayer who sought a refund on the basis that her home sale gain should be excluded under section 121. The court analyzed the ownership and use requirements, demonstrating that the exclusion is not automatic and depends on strict adherence to the statutory conditions. Gummer v. United States, 40 Fed. Cl. 812 (1998) (“At issue in this tax refund suit is whether plaintiff qualifies for an exclusion of gain from gross income for the sale of her residence under section 121 of the Internal Revenue Code”).

McKinney v. Commissioner (1981 T.C. Memo)

McKinney v. Commissioner—though not primarily a section 121 case—is frequently cited for the proposition that the failure to maintain consistent use of a property as a principal residence can defeat claims for various residential tax benefits. McKinney v. Commissioner, 1981 Tax Ct. Memo LEXIS 563 (“the first issue for decision is whether petitioners’ activity in connection with owning and renting their Hawaiian condominium is an activity not engaged in for profit”).


Special Situations and Planning Strategies

Multiple Residences

Taxpayers who own more than one home must pay careful attention to the “principal residence” determination. The factors in Treas. Reg. § 1.121-1(b)(2) are applied to determine which home qualifies. A second home that is not the principal residence does not qualify for the exclusion. See CPA Journal (“The core of IRC section 121 is fairly simple. Individual homeowners can exclude from gross income up to 500,000 for certain married couples filing jointly) provided that they satisfy the ownership requirements”).

Conversion of Rental Property to Principal Residence

If a property is first used as a rental (or investment property) and later converted to a principal residence, special rules apply:

  • Gain allocated to periods of nonqualified use before 2009 is disregarded.
  • Gain allocated to periods of nonqualified use after 2008 is not excludable under IRC §121(b)(5).
  • Depreciation taken after May 6, 1997, must be recaptured under IRC §121(d)(6) and is not eligible for exclusion.

The safest strategy is to use the property as a principal residence for a sufficient period before sale to minimize the ratio of nonqualified use to total ownership.

Timing of a Second Sale

Since the exclusion generally can be used only once every two years under IRC §121(b)(3), taxpayers who sell a home, claim the exclusion, and then sell another home within two years will not qualify for the exclusion on the second sale (absent a partial exclusion under section 121(c)). Timing is critical.

Documentation Is Everything

Taxpayers who claim a partial exclusion under IRC §121(c) bear the burden of proving that the sale was primarily by reason of a qualifying event. The regulations provide that whether the requirements are satisfied depends upon all the facts and circumstances. Treas. Reg. § 1.121-3(b). Taxpayers should maintain:

  • Employment change documentation (job offer letters, distance calculations, relocation records);
  • Medical records and physician recommendations supporting the need to move for health reasons;
  • Documentation of unforeseen events (divorce decrees, death certificates, job termination notices, casualty loss reports).

Interaction With Section 1031 Like-Kind Exchanges

Taxpayers may sometimes combine the section 121 exclusion with a section 1031 like-kind exchangeRevenue Procedure 2005-14 provides guidance on how to apply both provisions:

  • Section 121 must be applied to the gain realized before applying section 1031.
  • The amount of gain excluded under section 121 is permanently excluded and is not required to be deferred into replacement property. Rev. Proc. 2005-14, § 3.01 (2005).

For taxpayers who have significant appreciation in a property that was once used as a rental, coordinating these two provisions can dramatically reduce tax liability.


Common Mistakes to Avoid

Mistake #1: Assuming you automatically qualify because you “lived there.” The two-year test is measured in days, and the occupancy does not have to be continuous. But if you moved out more than three years before the sale, you likely fall outside the five-year lookback.

Mistake #2: Forgetting about nonqualified use. The gain attributable to periods when the property was not a principal residence (post-2008) is ineligible for exclusion, even if you later move in and satisfy the use test.

Mistake #3: Ignoring depreciation recapture. Depreciation claimed on a home office or rental portion must be recaptured as ordinary income and cannot be excluded.

Mistake #4: Failing to document a partial exclusion. If you sell before two years, the burden of proof is on you. Without documentation of the employment change, health reasons, or unforeseen circumstances, the IRS may deny the partial exclusion entirely.

Mistake #5: Using the exclusion too frequently. The once-every-two-years rule is absolute. Attempting to claim the exclusion on a second sale within 24 months will result in the full gain being taxable.


Conclusion

Section 121 of the Internal Revenue Code provides one of the most generous tax benefits available to individual taxpayers. The ability to exclude up to 250,000 for single filers) on the sale of a principal residence can result in significant tax savings. But the exclusion is not automatic, and its application is governed by a detailed framework of statutory provisions, Treasury Regulations, and judicial decisions.

Whether you are planning to sell your primary residence, have converted a rental property into your home, or are facing an early sale due to a change in employment or unforeseen circumstances, understanding the rules—and the exceptions—is essential to preserving the exclusion.


Important Disclosure: Tax laws, regulations, and judicial interpretations are subject to change. The information in this post is based on current law as of the date of publication, but the Internal Revenue Code is frequently amended by Congress, and Treasury Regulations are subject to revision. New court decisions can alter the application of Section 121. Nothing in this post constitutes legal or tax advice, and no attorney-client relationship is formed. Taxpayers should consult a qualified tax professional to evaluate their specific situations.

For questions or to schedule a consultation, please contact Alan Goldstein.


Citations Summary Table

SourceCitation
IRC §121(a)Exclusion of gain from sale or exchange of principal residence
IRC §121(b)(1)-(2)Dollar limitations of 500,000
IRC §121(b)(3)Frequency limitation (once every two years)
IRC §121(b)(5)Gain allocated to nonqualified use
IRC §121(c)Reduced maximum exclusion for employment change, health, unforeseen circumstances
IRC §121(d)(6)Depreciation recapture after May 6, 1997
Treas. Reg. § 1.121-1General rules for exclusion
Treas. Reg. § 1.121-1(b)(2)Factors to determine principal residence
Treas. Reg. § 1.121-1(b)(3)Vacant land rules
Treas. Reg. § 1.121-1(e)(1)Allocation for separate business portion
Treas. Reg. § 1.121-3Reduced exclusion for early sale
Treas. Reg. § 1.121-3(c)Employment change safe harbor (50-mile rule)
Treas. Reg. § 1.121-3(d)Health reasons
Treas. Reg. § 1.121-3(e)Unforeseen circumstances (including safe harbors)
Rev. Proc. 2005-14Coordination of Sections 121 and 1031
Gates v. Commissioner, 132 T.C. 10 (2009)Principal residence must be actual dwelling sold
Guinan v. United StatesMulti-factor test for principal residence
Gummer v. United States, 40 Fed. Cl. 812 (1998)Application of section 121 requirements
McKinney v. Commissioner, 1981 T.C.M.Residential use requirements

About the Author: Alan Goldstein is a tax expert with extensive experience in real estate taxation, including Section 121 exclusions, Section 1031 like-kind exchanges, and residential tax planning.

Disclaimer: This post is provided for informational purposes only and does not constitute legal advice. You should consult with qualified legal counsel regarding your individual circumstances.

Contact: Alan Goldstein

Was this helpful?

0 / 0