The Basic Rule
IRC Section 121 excludes from gross income up to $250,000 of gain ($500,000 on a joint return) realized on the sale or exchange of a principal residence. To qualify, the taxpayer must have owned and used the property as a principal residence for at least two of the five years immediately preceding the sale. The ownership and use tests are independent - both must be satisfied, but the two-year periods do not have to overlap.
The exclusion applies per taxpayer, not per property. A married couple filing jointly can exclude up to $500,000 only if: (1) either spouse meets the ownership test, (2) both spouses meet the use test, and (3) neither spouse has used the exclusion within the prior two years.
What the Exclusion Does Not Cover
Depreciation Recapture
Section 121 does not shelter depreciation previously claimed on the property. If any portion of the home was used as a home office or rental and depreciation was deducted, that depreciation is recaptured under Section 1250 and taxed at a maximum rate of 25%, regardless of how much gain the exclusion otherwise covers. This catches sellers who claimed home office deductions for years and then assume the Section 121 exclusion wipes the slate clean.
Gain Attributable to Nonqualified Use
The Housing Assistance Tax Act of 2008 added Section 121(b)(5), which allocates a portion of gain to nonqualified use - periods after December 31, 2008, when the property was not used as a principal residence. That allocated gain is not excludable. The fraction is calculated as: periods of nonqualified use after 2008 divided by total ownership period.
Periods of nonqualified use do not include: (a) any portion of the five-year lookback period after the last date the property was used as a principal residence, (b) temporary absences of up to two years for health, employment, or unforeseen circumstances, and (c) certain absences for uniformed services or Foreign Service.
Gain Above the Exclusion Cap
The exclusion is capped. If gain exceeds $250,000 (or $500,000 MFJ), the excess is taxable as long-term capital gain assuming the holding period is met. In high-appreciation markets, this is not a rare outcome.
The Ownership and Use Tests in Practice
Two years means 730 days, but the IRS does not require consecutive days. Short temporary absences - vacations, medical stays - count as periods of use. The five-year lookback window is measured backward from the date of sale, not from the date of purchase.
The use test is about actual use as a principal residence, not legal ownership. A taxpayer who owns a home but rents it out for three years before selling does not meet the use test for those rental years, even if they technically owned the property the entire time.
Reduced Exclusion for Partial Qualification
If the ownership or use test is not fully met, a taxpayer may still qualify for a partial exclusion if the primary reason for the sale is: (1) a change in place of employment, (2) health reasons, or (3) unforeseen circumstances as defined under Treas. Reg. 1.121-3. The partial exclusion is not a discretionary reduction - it follows a specific formula.
The partial exclusion equals the full exclusion amount multiplied by a fraction: the numerator is the shorter of (a) the aggregate periods of ownership and use as a principal residence during the five-year lookback, or (b) the period between the prior exclusion use and the current sale date - expressed in days or months. The denominator is 730 days (or 24 months).
Example: A single taxpayer is required to relocate for a new job after living in the home for 12 months. She has met 12 of the required 24 months of use. Her partial exclusion is: (12/24) x $250,000 = $125,000. If her gain is $110,000, the entire gain is excluded. If her gain is $180,000, she excludes $125,000 and the remaining $55,000 is taxable (plus any depreciation recapture).
The fraction is calculated separately for the ownership test and the use test, and the smaller of the two fractions applies. In most cases both tests move together, but they can diverge - for example, when a taxpayer inherits a home they have been living in (ownership period shorter than use period).
The qualifying reason requirement applies to the primary reason for the sale. Treasury Regulation 1.121-3 provides safe harbors: for employment, the new workplace must be at least 50 miles farther from the home than the prior workplace. For health, the sale must be primarily to obtain, provide, or facilitate diagnosis, cure, mitigation, or treatment of disease, illness, or injury for the taxpayer or a family member. Unforeseen circumstances are addressed separately below.
What counts as "unforeseen circumstances" for the partial exclusion?
Treasury Regulation 1.121-3(e) defines safe harbors for unforeseen circumstances, including: involuntary conversion of the property, natural or man-made disasters, death, divorce or legal separation, multiple births from the same pregnancy, change in employment or self-employment status resulting in inability to pay housing costs, and certain other events designated by the IRS. The regulation also allows a facts-and-circumstances determination outside the safe harbors if the event was not reasonably anticipated before purchasing and occupying the home.
Importantly, a decline in the value of the home alone, or a general change in financial circumstances, does not qualify as an unforeseen circumstance. The event must be specific, documentable, and outside the taxpayer's reasonable anticipation at the time of purchase.
History: How We Got Here
Before the Taxpayer Relief Act of 1997, home sale gain deferral was governed by the rollover rule of old Section 1034, which required reinvestment in a new home of equal or greater value to defer gain. Taxpayers over 55 had a one-time $125,000 exclusion under former Section 121. Both provisions were repealed when the current Section 121 took effect for sales after May 6, 1997.
Key legislative changes since 1997:
- 2008 - Housing Assistance Tax Act: Added the nonqualified use rule (Section 121(b)(5)) and tightened the exclusion for properties that were not used as a principal residence for the full ownership period.
- 2008 - Emergency Economic Stabilization Act: Clarified rules for surviving spouses - a surviving spouse may use the $500,000 exclusion if the sale occurs within two years of the decedent spouse's death and the other requirements are met.
- Uniformed Services exceptions: Active duty military, Foreign Service, and intelligence community personnel may suspend the five-year lookback period for up to ten years of qualified official extended duty, effectively extending the window to qualify.
Common Myths
Myth: You can use the exclusion once every two years on any property
The two-year rule is a limitation, not an entitlement. The exclusion requires the property to have been a principal residence for two of the prior five years. Owning multiple homes and rotating which one you sell does not manufacture eligibility - the IRS looks at actual facts and circumstances to determine which property was the principal residence.
Myth: The exclusion covers everything, including depreciation
It does not. Depreciation recapture under Section 1250 is carved out explicitly. A taxpayer who deducted $40,000 in home office depreciation over ten years will owe tax on that $40,000 regardless of the Section 121 exclusion.
Myth: Renting the home before selling has no tax consequence if you move back in for two years
Partially false. Moving back in and meeting the use test restores eligibility for the exclusion going forward, but the nonqualified use rule (post-2008) still allocates a portion of total gain to the rental period. That allocated portion is taxable. The exclusion applies only to gain allocated to qualified use periods.
Myth: A married couple always gets $500,000
Only if both spouses independently meet the use test and neither used the exclusion within the prior two years. If one spouse fails the use test - for example, they moved in after the two-year window was already established - the couple is limited to $250,000, not $500,000.
Myth: The exclusion applies to vacation homes if you live there long enough
A vacation home can become a principal residence, but the nonqualified use rule will still apply to the years it was used as a vacation property (post-2008). The gain allocated to those years is not excludable.
Relevant Court Cases
Guinan v. United States (2003)
The taxpayer argued that a home used as a principal residence for two years qualified even though it had been rented for several years prior. The court confirmed that the two-of-five-year test was met, but this case predates the 2008 nonqualified use rules - under current law, the rental period would reduce the available exclusion.
Bogue v. Commissioner (T.C. Memo 2011-164)
The Tax Court examined whether a taxpayer's claimed principal residence was genuine given the taxpayer maintained another home. The court applied a facts-and-circumstances analysis looking at where the taxpayer spent the majority of time, where they were registered to vote, and where they received mail. Taxpayers cannot simply designate a property as a principal residence - the facts have to support it.
Langwell v. Commissioner (T.C. Memo 2009-97)
The Tax Court disallowed the exclusion where the taxpayer failed to establish actual use as a principal residence for the required period. The case reinforced that ownership alone is insufficient - the use test is independently required.
Chief Counsel Advice and IRS Guidance on Partial Exclusions
The IRS has issued guidance (including Rev. Proc. 2005-14) addressing the interaction between Section 121 and Section 1031 like-kind exchanges. A taxpayer who converts a rental property to a principal residence cannot combine a Section 1031 exchange with a Section 121 exclusion on the same sale unless specific conditions are met, and any Section 1031 deferred gain is not eligible for the Section 121 exclusion.
Planning Considerations
The Section 121 exclusion is one of the more valuable provisions in the Code for individual taxpayers, but it requires advance planning to use correctly. Key points worth tracking:
- Document the dates the property was used as a principal residence - the IRS can and does challenge use test claims.
- Track all depreciation claimed on any portion of the home (home office, rental use) so recapture can be calculated accurately at sale.
- If a property has been rented and then converted to a principal residence, calculate the nonqualified use fraction before assuming the full exclusion applies.
- For properties held in trust, the ownership test may still be met under certain grantor trust rules, but the structure matters - confirm before the sale, not after.
- Surviving spouses should be aware of the two-year window to use the $500,000 exclusion; after that window closes, only $250,000 is available.
- When a qualifying reason for early sale exists, calculate the partial exclusion before assuming the gain is fully taxable - the formula often shelters more than taxpayers expect.
How is the nonqualified use fraction actually calculated?
The nonqualified use fraction is: aggregate periods of nonqualified use after December 31, 2008 / total period of ownership. This fraction is applied to the total gain (before any exclusion) to determine the amount that cannot be excluded. The excludable gain is then the lesser of: (a) the remaining gain after subtracting the nonqualified use portion, or (b) the applicable exclusion cap ($250,000 or $500,000).
Example: A taxpayer owns a home for 10 years. For the first 4 years (all after 2008), it was a rental. For the last 6 years, it was a principal residence. Total gain at sale: $400,000. Nonqualified use fraction: 4/10 = 40%. Gain allocated to nonqualified use: $160,000 (taxable). Remaining gain: $240,000 - excludable under Section 121 (under the $250,000 cap). Net taxable gain: $160,000, plus any depreciation recapture.