Text or WhatsApp (808) 600-9260

The home sale exclusion under Section 121

You may exclude up to $250,000 of gain when you meet the Section 121 requirements, including owning and using your home as your principal residence for at least 2 years during the 5 years ending on the sale date. Your limit may increase to $500,000 for a qualifying joint return. Prior exclusions, depreciation, and periods of nonqualified use can limit the gain you exclude.

Flowchart of the Section 121 tests, leading to up to $250,000 of gain excluded, or $500,000 on a qualifying joint return
The home sale exclusion, step by step. Section 121 for gain on the sale of your principal residence. Did you own the home for at least 2 years during the 5 years ending on the sale date? Did you use it as your principal residence for at least 2 years during the same 5 years? Did you exclude gain on another home sale in the 2 years before this one? If you answer yes, yes and no, up to $250,000 of gain is excluded (individual), or up to $500,000 (qualifying joint return). If any answer goes the other way, the full exclusion does not apply. Depreciation and periods of nonqualified use can limit the gain you exclude. The periods are totals, so they do not have to be continuous.Source: Home sale exclusion guide; 26 U.S.C. 121; IRS Pub. 523 (2025). Statutory rule, not tied to one year.

How much gain you can exclude

Section 121 generally lets you exclude up to $250,000 of gain from selling or exchanging your principal residence. If you qualify, the excluded gain does not enter your gross income. For certain joint returns, your exclusion limit increases to $500,000.

Your exclusion applies to gain from the transaction. The dollar limit is a ceiling on the gain you can exclude. Your ownership, use, prior home sales, depreciation, and periods of nonqualified use determine whether the exclusion applies and how much gain remains eligible.

Your ownership and use tests

You generally must satisfy both an ownership test and a use test. During the 5 years ending on your sale or exchange date, you must have owned the property for periods totaling at least 2 years. You must also have used it as your principal residence for periods totaling at least 2 years.

Your qualifying periods are measured within that 5 year window. The statute uses aggregate periods, so your ownership and use are evaluated by their total qualifying time within the window.

You must occupy the residence to satisfy the use requirement. Short temporary absences count as use, including vacations and other seasonal absences. Those short absences can count even if you rent the residence during them.

You do not have to use the property as your principal residence on the sale or exchange date. You must still meet the required ownership and use periods within the 5 years ending on that date.

When your joint return qualifies for $500,000

If you and your spouse file a joint return for the taxable year of the sale or exchange, your exclusion limit can increase to $500,000. You must meet all three conditions for that joint limit.

How your limit works when the joint conditions are unmet

You do not need joint ownership to meet the ownership condition for the $500,000 limit. For your joint return, qualifying ownership by a single spouse is sufficient. You both must satisfy the use condition, along with the restriction on prior excluded sales.

If you do not meet the conditions for the $500,000 joint limit, your limit is the sum of the limits you and your spouse would each have if unmarried. For that calculation, you each count as owning the property during any period either spouse owned it.

If only one of you meets the use test, you do not qualify for the full $500,000 limit. The exclusion is limited to $250,000 when only one spouse meets that test, subject to the other eligibility requirements.

Your prior excluded sale can affect eligibility

You generally cannot use Section 121 for a sale or exchange if you had another sale or exchange to which the exclusion applied during the 2 years ending on the current transaction date. Meeting your ownership and use tests does not remove this separate restriction.

For the $500,000 joint limit, this restriction applies to both you and your spouse. Neither spouse may be ineligible under the prior sale rule. A qualifying reduced exclusion can provide relief when your current sale meets the separate requirements for that relief.

When you may qualify for a reduced exclusion

If you sell your home because of a change in place of employment, health, or unforeseen circumstances before you meet the two year tests, you may still get a reduced exclusion. The reduced limit is the full exclusion limit multiplied by a fraction. The top of the fraction is the shorter of the time you owned and used the home as your main home during the 5 years before the sale, or the time since your last sale that used the exclusion. The bottom of the fraction is 2 years.

You may also qualify for this relief when the prior sale restriction prevents your exclusion. Your sale must be by reason of a change in place of employment, health, or unforeseen circumstances to the extent provided in regulations. Falling short of a timing requirement alone does not establish those qualifying reasons.

Your fraction reduces the applicable dollar limit. You use the shorter qualifying period in the numerator, rather than choosing whichever period produces a larger exclusion. The denominator remains 2 years.

Your exclusion after your spouse dies

You may qualify for a $500,000 limit if you are unmarried and your spouse is deceased on the sale or exchange date. Your transaction must occur no later than 2 years after your spouse's death.

Immediately before your spouse's death, you must have met the conditions in Section 121(b)(2)(A). You or your spouse must have met the ownership test, both of you must have met the use test, and neither of you could have been ineligible under the prior excluded sale rule. The special surviving spouse limit depends on these conditions as well as the sale deadline.

Depreciation you cannot exclude

If you were entitled to depreciation deductions because you used your home for business or as rental property, you cannot exclude gain equal to depreciation allowed or allowable for periods after May 6, 1997. This restriction applies even when you meet the ownership and use tests.

The restriction covers depreciation you were allowed to deduct and depreciation that was allowable. Your eligibility for a $250,000 or $500,000 exclusion does not make that portion of gain excludable.

You apply the depreciation restriction before allocating gain to periods of nonqualified use. The nonqualified use allocation excludes gain already covered by the depreciation restriction from its calculation.

How your nonqualified use limits the exclusion

You cannot exclude gain allocated to periods of nonqualified use. Generally, these are periods beginning January 1, 2009, when neither you nor your spouse or former spouse used the property as a principal residence. Time before that date is excluded from the definition.

Your allocation uses a ratio. The numerator is your aggregate periods of nonqualified use during your ownership. The denominator is your total ownership period. You multiply the remaining gain, after excluding gain covered by the depreciation restriction, by that ratio.

The resulting allocated gain is ineligible for the exclusion. This allocation can apply even if you satisfy the ownership and use tests. Meeting those tests does not eliminate the separate nonqualified use restriction.

Periods you leave out of nonqualified use

Your nonqualified use calculation has three exceptions. Each exception has its own conditions or time limits.

Your property acquired through Section 1031

If you acquire property through an exchange in which gain is wholly or partly unrecognized under Section 1031(a) or (b), Section 121 does not apply to a sale or exchange during the 5 years beginning on your acquisition date.

The restriction also reaches a sale by anyone whose basis in the property is determined wholly or partly by reference to your basis. Your ownership and use requirements remain separate from this restriction on property acquired in an exchange.

When your transaction qualifies under both provisions, Section 121 applies before the Section 1031 nonrecognition rules. In the approved office and residence example, gain allocated to an office within a single dwelling unit qualifies for exclusion, but gain attributable to depreciation does not. The remaining gain in that example may be deferred under Section 1031.

Your gain above the exclusion

You can have taxable recognized gain after applying Section 121. In the approved IRS examples, realized gain above the applicable exclusion is subject to regular income taxes and included in Net Investment Income.

Your recognized gain being included in Net Investment Income does not by itself establish that you owe Net Investment Income Tax. In the approved individual example, your modified adjusted gross income of $195,000 is below the $200,000 threshold, so you owe no Net Investment Income Tax despite having $150,000 of recognized gain.

Worked example

Illustrative example: Your gain exceeds your exclusion

Illustrative example: You realize $400,000 of gain and qualify for a $250,000 Section 121 exclusion. Subtracting your exclusion leaves $150,000 of recognized gain. That $150,000 is subject to regular income taxes and is also included in your Net Investment Income. In this example, your modified adjusted gross income is $195,000. Because that amount is below the applicable $200,000 threshold, you owe no Net Investment Income Tax. Your Section 121 exclusion reduces the recognized gain, while your modified adjusted gross income determines the threshold result described here.

From Richard C. Wilson

We're about 50 interviews deep into our 100 tax expert interview series.

Questions

Must you live in your home on the sale date?
No. You can move out before completing your sale or exchange without losing Section 121 eligibility solely because you no longer live there. Your eligibility generally requires at least 24 months of ownership and 24 months of occupancy as your main home within the final 60 months before closing.
Do your vacations interrupt the use test?
You retain qualifying occupancy credit for brief trips away, whether for a vacation or another seasonal absence, including trips when tenants occupy your home. Occupancy is otherwise required to establish your qualifying use.
Does your joint return automatically give you a $500,000 exclusion?
No. To claim that amount, you or your spouse must meet the ownership test, both of you must meet the use test, and neither of you may be ineligible under the rule limiting the exclusion to 1 sale or exchange every 2 years. If those conditions are unmet, your limit follows the separate calculation for other joint returns.
Can you exclude gain attributable to rental depreciation?
Even when you pass both residence tests, your exclusion leaves out the gain corresponding to deductions taken or available for business or rental depreciation covering periods later than May 6, 1997.
Can you receive an exclusion before meeting the full timing tests?
Your reason for selling can support a smaller exclusion when it involves a job location change, health, or an unforeseen circumstance covered by regulations. This relief can apply when you fail the ownership and use tests or the prior sale restriction. Your reduced dollar limit uses the statutory fraction with a denominator of 2 years.
Does renting your home after moving out always create nonqualified use?
No. For your nonqualified use allocation, the final 5 year window omits time following the home's last occupancy as the main home of either spouse. You normally need 2 years as an owner and 2 years living there within the final 5 years, unless the separate reduced exclusion provisions apply. Section 121 leaves you with taxable gain matching deductions claimed or available for depreciating rented housing or business space for periods later than May 6, 1997.
Research notice. As of October 20, 2026, based on 26 U.S. Code Section 121, Exclusion of gain from sale of principal residence, Rev. Proc. 2005-14, Publication 523 (2025), Selling Your Home, 26 CFR 1.121-1, Exclusion of gain from sale or exchange of a principal residence and Internal Revenue Bulletin: 2005-7, our research shows this may be the case. The law changes, so this could be outdated or wrong. Confirm with a licensed tax attorney or CPA before acting. This page is general education, not tax or legal advice for your situation.
Sources
  1. 26 U.S. Code Section 121, Exclusion of gain from sale of principal residence
  2. Rev. Proc. 2005-14
  3. Publication 523 (2025), Selling Your Home
  4. 26 CFR 1.121-1, Exclusion of gain from sale or exchange of a principal residence
  5. Internal Revenue Bulletin: 2005-7
  6. Topic no. 701, Sale of your home
  7. Limits To Converting Rental Property Into A Primary Residence To Plan For IRC Section 121 Capital Gains Exclusion
  8. Questions and Answers on the Net Investment Income Tax
Richard C. Wilson, founder of Family Office Club
Questions about a sale

Talk to Richard

Richard C. Wilson, founder of Family Office Club