
Aug 24, 2025
📚 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.
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 primary residence exclusion allows you to exclude up to:
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.
To benefit from the exclusion, you must meet specific tests:
You must have owned the home for at least two years during the five years leading up to the sale.
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.
You cannot have claimed the exclusion for the sale of another home within the two years before selling your current residence.
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.
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.
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:
Formula:
Capital Gain = (Sale Price – Selling Expenses) – Adjusted Basis
Example 1 (Married Couple):
Example 2 (Single Seller with Home Office):
Remember, the exclusion applies to the gain, not the sale price.
The primary residence exclusion can result in significant tax savings, depending on your tax bracket.
Flexibility: Even if you don’t meet the two-year rule, partial exclusions exist for hardship situations.
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 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.
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.
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.
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.
Not every home sale needs to be reported, but many do.
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