Selling Your Home? Here’s How Taxes on the Profit Work
What homeowners should know before selling a primary residence.
Selling a home often raises a straightforward question with a not-so-straightforward answer. How much of the profit is actually taxable? The tax code includes a provision, commonly referred to as the Section 121 home sale exclusion, that allows many homeowners to exclude a meaningful portion of their gain from federal income taxes. Understanding how it works, and when the rules flex or become more nuanced, can help you plan ahead with fewer surprises.
Disclaimer: This article focuses on federal tax rules applicable to the sale of a primary residence. Additional considerations may apply for your state, when a property has current or prior rental or investment use, including issues related to like-kind exchanges and timing rules, which are beyond the scope of this discussion. Please consult with your tax professional before implementing tax strategies.
Key Takeaways
- Section 121 may allow you to exclude up to $250,000 of gain, or $500,000 for married couples filing jointly
- You generally must own and live in the home for two of the five years before the sale
- The exclusion cannot be used if it was claimed on another home sale within the prior two years
- Exceptions, partial exclusions, and special rules can apply based on life events and prior use
What Is the Section 121 Home Sale Exclusion?
Section 121 of the Internal Revenue Code governs how gains from the sale of a primary residence are treated for federal tax purposes. If you owned and lived in your home for at least 2 out of 5-years leading up to the sale, you may be able to exclude:
Up to $250,000 of gain if you file as a single taxpayer
Up to $500,000 of gain if you are married and file jointly
The excluded amount is removed from your taxable income. In many cases, the sale does not need to be reported on your tax return unless you receive a Form 1099-S or do not meet the Section 121 requirements. Although, it is a good practice to do so.
Helpful Tips 💡:
1. You generally cannot claim this exclusion if you excluded gain from another home sale within the previous two years.
2. Losses on the sale of a primary residence are considered personal and are not deductible.
When the Standard Rules Are Relaxed
The 2 out of 5-year ownership and use test is the general rule under Section 121, but it is not absolute. The tax code allows flexibility in several common situations. Exceptions may apply in cases involving:
Divorce
Temporary absences
Surviving spouse who has not remarried can count the deceased spouse’s time living in the home.
Change in employment
Health-related circumstances or;
Unforeseen events.
Military members and certain federal employees on qualified official extended duty, the five-year testing period can be suspended for up to 10 years. This helps preserve eligibility when extended assignments require time away from the home.
When the Rules Become More Nuanced
Home Improvements and Basis Adjustment: Your taxable gain is based on your adjusted cost basis. Basis generally includes what you paid for the home, certain settlement costs, and qualifying capital improvements that add value or extend the home’s useful life. Major renovations such as:
Additions
Roof replacements
System upgrades
Can increase basis and reduce taxable gain. Routine repairs and maintenance typically do not.
Rentals: If the home was ever used for rental or business purposes, any depreciation claimed reduces the basis and must be factored into the calculation. In addition, if a property was used as a rental or second home before becoming a primary residence, nonqualified use rules may require part of the gain to fall outside the exclusion.
Certain exceptions apply, but mixed-use histories often add complexity and warrant closer review.
Why This Matters Before You Sell
The Section 121 home sale exclusion is generous, but it is not automatic.
Eligibility depends on timing, how the home was used over the years, and how well the gain is documented. In higher-appreciation situations, details such as improvement records or past rental use can determine whether a gain is fully sheltered or partially taxable.
Reviewing these factors before listing a home allows for better planning, clearer expectations, and fewer surprises when the transaction closes, especially when the sale is part of a broader financial transition.