Back to all articles
Real Estate Tax Services

Aug 24, 2025

Primary Residence Exclusion: Enjoy up to $500,000 in tax-free gains when you sell your home

📚 Selling your primary residence? By understanding and potentially utilizing the primary residence exclusion, you can significantly reduce your tax burden when selling your home and unlock up to $500,000 in tax-free gains.

Overview

  • Exclusion Amount: Homeowners can exclude up to $500,000 (married) or $250,000 (single) of profit from selling a primary residence.
  • Eligibility Rules: Must meet ownership and use tests for two of the past five years, and the exclusion can be used once every two years.
  • Taxable Portion: Depreciation recapture is always taxable, even if the rest of the gain is excluded.
  • Special Situations: Military, divorce, rental conversions, hardship sales, and state laws may affect the exclusion.

Why This Matters

For many Americans, a home is the single biggest investment they will ever make. After years of mortgage payments, renovations, and market appreciation, selling can result in a significant profit. That profit, known as a capital gain, would normally be subject to capital gains tax.

However, Congress created the primary residence exclusion (also called the Section 121 exclusion) to protect homeowners from paying taxes on most of the profit from the sale of their main home. This allows people to downsize, move for work, or upgrade their living situation without losing a substantial portion of their wealth to taxes.

Understanding how this exclusion works, and whether you qualify, can mean the difference between owing tens of thousands in taxes and owing nothing at all.

The Basics of the Primary Residence Exclusion

The primary residence exclusion allows you to exclude up to:

  • $500,000 of profit if you are married and file a joint tax return

  • $250,000 if you are single

  • $250,000 each if married filing separately and both spouses qualify individually

This exclusion only applies to your primary residence, the home where you live most of the time. Second homes, vacation homes, or purely rental properties are not eligible.

The exclusion is available once every two years, meaning you cannot use it repeatedly on multiple home sales in quick succession.

Who Qualifies for the Exclusion?

To benefit from the exclusion, you must meet specific tests:

1. The Ownership Test

You must have owned the home for at least two years during the five years leading up to the sale.

2. The Use Test

You must have used the home as your primary residence for at least two years during that same five-year window.

The ownership and use periods do not need to overlap. For example, you could rent the home for the first three years of ownership, then live in it for two years before selling and still qualify.

3. The Lookback Rule

You cannot have claimed the exclusion for the sale of another home within the two years before selling your current residence.

4. Military, Foreign Service, and Certain Government Employees

Active-duty military members, members of the foreign service, and certain federal intelligence employees can suspend the five-year test for up to 10 years if they are stationed more than 50 miles from their home. This effectively gives them a two-out-of-ten-year rule, greatly expanding flexibility.

5. Exceptions for Health, Work, and Unforeseen Circumstances

If you don’t meet the two-year rule, you may still qualify for a partial exclusion if the sale was due to a job relocation, health issue, or unforeseen circumstance (such as divorce, natural disaster, or multiple births from a single pregnancy). In those cases, the exclusion is prorated based on how long you lived in the home.

How to Calculate Your Capital Gain

Your gain is not just the sale price of your home, it’s the sale price minus your investment in the property.

Step 1: Start with the sale proceeds
the total amount you sold, or expect to sell, your primary residence for. This includes closing costs and selling expenses

Step 2: Subtract your adjusted basis
Your adjusted basis is essentially how much you have invested in the property for tax purposes:

  • Closing costs: Certain costs like recording fees and title insurance may be added.
  • Original purchase price: the total amount your purchased your primary residence for This includes closing costs and selling expenses
  • Improvements: the total amount you spent on improvements and renovations during the time you owned your home
  • Depreciation: if your home was treated as a rental property or home office, the total amount that was deducted as depreciation during the time you owned it.

Formula:
Capital Gain = (Sale Price – Selling Expenses) – Adjusted Basis

Example 1 (Married Couple):

  • Sale Price: $600,000
  • Selling Expenses: $30,000
  • Adjusted Basis: $250,000
  • Capital Gain = ($600,000 – $30,000) – $250,000 = $320,000
  • Exclusion: Entire $320,000 is excluded under the $500,000 rule.

Example 2 (Single Seller with Home Office):

  • Sale Price: $400,000
  • Selling Expenses: $20,000
  • Adjusted Basis: $200,000
  • Capital Gain = ($400,000 – $20,000) – $200,000 = $180,000
  • If $15,000 of depreciation was claimed for a home office, that portion is taxable. $165,000 is excludable.

Remember, the exclusion applies to the gain, not the sale price.

Benefits

The primary residence exclusion can result in significant tax savings, depending on your tax bracket.

  • Tax-free gains: Reduce your taxable income by excluding a significant portion of your profit from the sale. Depending on your filing status and tax bracket, you could save over $100,000 in taxes.
  • Boost your bottom line: Using the primary residence exclusion to reduce or eliminate tax will leave more money in your pocket from the sale. This translates to greater financial flexibility to fund retirement, go on a dream vacation, or achieve other goals.
  • Fairness for homeowners: Rewards those who have lived in and maintained their homes long-term.

Flexibility: Even if you don’t meet the two-year rule, partial exclusions exist for hardship situations.

If you have any questions about the primary residence exclusion, reach out to us

Contact us

Limitations

  • You can only use this exclusion once every two years
  • Your exclusion cannot exceed your total profit, or gain, from the sale.
  • If your filing status is married filing separately in the year of the sale, each spouse must qualify independently and claim half the exclusion amount.
  • If any depreciation was taken on your primary residence in previous years, that amount cannot be excluded from income
  • If you receive Form 1099-S (reporting the sale), you must still report the transaction, even if fully excluded.

Special Considerations

Divorce

If one spouse receives the home in a divorce settlement, that spouse may count the other’s ownership period toward the ownership test. However, only the resident spouse can meet the use test.

Inherited Property

Inherited homes generally receive a stepped-up basis equal to fair market value at the date of death, meaning most heirs do not face capital gains taxes if they sell soon afterward.

Rental to Residence Conversion

If you convert a rental into your primary residence, you may qualify for the exclusion, but depreciation claimed during the rental years must be recaptured and taxed.

Partial Exclusions

If you sell your home before two years due to job relocation, health, or unforeseen circumstances, you may exclude a portion of the gain proportional to your time in the home.

State Tax Implications

Most states follow federal law, but not all. Some states tax gains that are excluded federally. Others set their own thresholds or exclusions. For example, a state may not allow the full $500,000 exclusion. Always review state rules before assuming your entire gain is tax-free.

Reporting Your Home Sale

Not every home sale needs to be reported, but many do.

  • If you do not receive a Form 1099-S and your gain is fully excluded, you typically do not need to report the sale.
  • If you receive a Form 1099-S, you must report the sale on your return, even if the exclusion eliminates your taxable gain.
  • Sales are generally reported on Form 8949 and Schedule D.
  • IRS Publication 523 provides step-by-step guidance.

Capital Gains on Primary Residence: A Unique Tax Break

When it comes to tax planning, few opportunities are as powerful as the primary residence exclusion. By qualifying under the rules, calculating your gain correctly, and applying the exclusion, you may be able to eliminate a large portion, or even all, of your taxable profit.

This rule makes homeownership not just a way to build equity, but also a tool for preserving wealth when it’s time to sell.

ℹ️ If you have any questions about the primary residence exclusion, reach out to your tax team at tax@joingelt.com and Talk to a CPA!

This information is for educational purposes only and does not constitute financial advice. Consult a qualified professional before making any investment decisions.

📖 References

§ 121 - Exclusion of gain from sale of principal residence

💫 Related Content

[Definition] Primary Residence

© 2025 Better Technologies, Inc. dba Gelt