Skip to main content
ExplainerTax StrategyPolicy Explainer· 4 min read· in Guides

Section 121 Exclusion: How the 2-in-5-Year Rule Shields $500,000 of Home Equity from Capital Gains Taxes

Homeowners can exclude up to $500,000 in profit from capital gains taxes when selling a primary residence, provided they meet specific ownership and use tests. Navigating the 24-month requirement and its exceptions determines whether a seller keeps their equity or owes the IRS.

By Kavya Nair

Tax Professionals 40%Real Estate Investors 30%Financial Advisors 30%
Tax Professionals
Focus on strict compliance, exact day counts, and ensuring safe harbor documentation is bulletproof.
Real Estate Investors
Focus on leveraging the rule alongside 1031 exchanges and managing the complexities of depreciation recapture.
Financial Advisors
Focus on the wealth preservation aspect and integrating the home sale into broader retirement and equity planning.

Perspectives this story doesn't cover

  • First-Time Homebuyers
  • State Tax Authorities

At a closing table in a title office, a seller signing the final HUD-1 settlement statement for a property that has doubled in value faces a stark divergence in their financial future. If they have lived in that house for 730 days out of the preceding five years, the Internal Revenue Service ignores up to $500,000 of their profit. If they fall short by a single week, that same profit becomes taxable capital gain, instantly carving away tens of thousands of dollars from their proceeds.[1]

The mechanism governing this transaction is Section 121 of the Internal Revenue Code. It replaces an older, more restrictive rule that required homeowners to roll their profits into a new, more expensive property to defer taxes. Under the current framework, the tax liability is simply erased: up to $250,000 for single filers, and up to $500,000 for married couples filing jointly.[1][2]

Securing that exclusion requires passing two distinct hurdles: the ownership test and the use test. The ownership test mandates that the taxpayer must have owned the property for at least two years out of the five years immediately preceding the date of sale.[3]

Simultaneously, the taxpayer must use the home as their primary residence for at least two years within that exact same five-year window. The 24 months of use do not have to be continuous, allowing homeowners to move out, rent the property, and return without necessarily resetting their eligibility.[6]

The 24 months of required use do not have to be continuous within the five-year window.

"The two years don't have to be a single block of time," notes David Rae, writing for Forbes in 2024. "You just need to have lived in the home for a total of 24 months out of the 60 months prior to the sale."[4]

Tracking those 24 months requires precision, particularly for those who travel frequently or maintain multiple residences. Short temporary absences, such as a three-week summer vacation, count as periods of use. However, a one-year sabbatical where the home is rented out to tenants pauses the use clock entirely.[2]

The five-year lookback period is calculated exactly from the date of the sale. If a home closes on September 11, 2026, the eligibility window extends back precisely to September 11, 2021. Any days of ownership or use prior to that date are irrelevant to the current transaction.[5]

The five-year lookback period is calculated exactly from the date of the sale.

A critical caveat exists for married couples seeking the full $500,000 exclusion. While only one spouse needs to meet the ownership test, both spouses must meet the use test.[1]

Married couples filing jointly can exclude twice as much profit, provided both spouses meet the use test.

If one spouse falls short of the 24-month use requirement—perhaps because they recently moved into the home after a marriage—the couple cannot claim the $500,000 maximum. Instead, they are restricted to the $250,000 exclusion of the qualifying spouse, exposing the remaining profit to taxation.[3]

Life events frequently force sales before the 24-month mark is reached. Recognizing this, the IRS provides partial exclusions through specific safe harbors: a change in employment, health issues, or unforeseeable events.[1]

To qualify for the employment exception, the new job location must be at least 50 miles farther from the old home than the previous workplace was. If the seller previously commuted 10 miles, the new job must be at least 60 miles away from the old home.[2]

If a seller qualifies for a partial exclusion after living in the home for exactly 12 months, they receive exactly 50% of the maximum exclusion—$125,000 for a single filer or $250,000 for a married couple.[5]

Unforeseeable events include divorce, multiple births from a single pregnancy, or natural disasters that destroy the property. The burden of proof rests on the taxpayer to document that the event directly necessitated the sale and occurred during their period of ownership and use.[6]

Sellers who fall short of 24 months may still qualify for a prorated exclusion under specific IRS safe harbors.

The exclusion can be used repeatedly throughout a taxpayer's lifetime, but not concurrently. A taxpayer can claim the Section 121 exclusion only once every two years, preventing serial flippers from shielding all their real estate income.[3]

For those converting rental properties to primary residences, the math becomes significantly more complex. Any depreciation claimed during the rental period cannot be excluded and is subject to a 25% depreciation recapture tax upon sale.[4]

Furthermore, periods of "non-qualified use"—time the property was rented out before it became a primary residence—reduce the eligible exclusion amount proportionally based on the total time owned.[6]

The final calculation requires verifying the exact closing date on the settlement statement against the original purchase date and any periods of absence. Until those 730 days are documented and the safe harbors verified, the accumulated equity remains exposed to standard long-term capital gains rates of 15% or 20%.[1][7]

Key points

  1. Homeowners can exclude up to $250,000 (single) or $500,000 (married) in capital gains on a primary residence.
  2. Sellers must have owned and lived in the home for at least 24 months out of the five years prior to the sale.
  3. The 24 months of required use do not need to be continuous.
  4. Married couples must both meet the use test to claim the full $500,000 exclusion.
  5. Partial exclusions are available for sales forced by job changes, health issues, or unforeseeable events.
  6. Converting a rental property to a primary residence triggers complex depreciation recapture rules.

Key terms

Capital Gains Tax
A federal tax levied on the profit realized from the sale of a non-inventory asset, such as real estate or stocks.
Section 121 Exclusion
The specific IRS tax code provision that allows homeowners to exclude up to $500,000 of profit from the sale of a primary residence.
Depreciation Recapture
The procedure for collecting income tax on a gain realized from the sale of property that was previously depreciated for tax purposes, typically taxed at 25%.
Safe Harbor
A legal provision that reduces or eliminates liability as long as certain specific conditions, such as a job relocation or health crisis, are met.

Frequently asked

Do the two years of use have to be continuous?

No. You only need to accumulate a total of 24 months (or 730 days) of use as a primary residence within the 60 months prior to the sale.

What if only one spouse lived in the house for two years?

If only one spouse meets the use test, the couple is limited to a maximum exclusion of $250,000 rather than the full $500,000.

Can I use this exclusion more than once?

Yes. The Section 121 exclusion can be claimed multiple times throughout your life, but you can only use it once every two years.

Does a temporary vacation pause my use requirement?

No. Short temporary absences, such as a summer vacation, still count as periods of use even if the property is rented out during that brief time.

Sources

Source coverage

7 outlets

3 viewpoints surfaced

Tax Professionals 40%Real Estate Investors 30%Financial Advisors 30%
  1. [1]Internal Revenue ServiceTax Professionals

    Topic no. 701, Sale of your home

    Read on Internal Revenue Service
  2. [2]TurboTax - IntuitTax Professionals

    Tax Aspects of Home Ownership: Selling a Home

    Read on TurboTax - Intuit
  3. [3]FidelityTax Professionals

    Understanding capital gains taxes on your home

    Read on Fidelity
  4. [4]ForbesFinancial Advisors

    What You Need To Know About Taxes When Selling A Home

    Read on Forbes
  5. [5]Brighton JonesFinancial Advisors

    Real Estate Tax Breaks: The 2-Out-of-5 Rule

    Read on Brighton Jones
  6. [6]Realized 1031Real Estate Investors

    What Is the 2-Out-of-5-Year Rule?

    Read on Realized 1031
  7. [7]Factlen Editorial TeamFinancial Advisors

    Synthesis by Factlen editorial team

    Read on Factlen Editorial Team

Comments

Stay informed

Every angle. Every day.

Get Guides stories with full source coverage and perspective breakdowns delivered to your inbox.