Prices in many residential real estate markets have surged over the last few years. As a result, you may be sitting on a significant unrealized gain, especially if you’ve owned your principal residence for a while. That’s good news if you’re ready to sell, but will you owe taxes on your gain?

Thankfully, the federal income tax gain exclusion break for principal residence sales is available. The exclusion can shelter up to $250,000 of home-sale gain ($500,000 for married couples who file jointly).  

Here’s how the home-sale gain exclusion break works and how to take advantage of it if you sell an appreciated principal residence. 

Ownership and Use Tests

To take full advantage of the home-sale gain exclusion, you must pass the following:

1. Ownership test. You must have owned the home for at least two years out of the five-year period ending on the sale date.

2. Use test. You must have used the home as your principal residence for at least two years out of the five-year period ending on the sale date. 

Important: These tests are completely independent. In other words, periods of ownership and use don’t need to overlap. For purposes of the tests, two years means periods aggregating to 24 months (730 days).  

Special Considerations If You’re Married

If you’re married and file jointly, you qualify for the bigger $500,000 joint-filer exclusion if:

  • Either you or your spouse pass the ownership test for the property, and
  • Both you and your spouse pass the use test.

If you’re married and you and your spouse file separately, you can potentially qualify for two separate $250,000 exclusions. For example, suppose you and your spouse have jointly owned a highly appreciated home for years and have used it as your principal residence for years. You decide to file separate federal income tax returns, which precludes eligibility for the larger $500,000 joint-filer gain exclusion. However, you and your spouse each qualify for separate $250,000 exclusions because you both pass the ownership and use tests. So, if you sell your home for a significant gain, you can take advantage of a $250,000 gain exclusion on your separate return, and your spouse can do the same.   

Special Rule for Unmarried Surviving Spouses 

If you’re a surviving spouse, you’re not allowed to file a joint return for years after the year in which your spouse died — unless you remarry. So, you can’t take advantage of the larger $500,000 joint-filer exclusion. Thankfully, there’s an exception to this unfavorable general rule. 

Under the exception, an unmarried surviving spouse can claim the larger $500,000 exclusion for a principal residence sale that occurs within two years after the spouse’s death, assuming all the other requirements for the $500,000 exclusion were met immediately before the spouse died. 

Important: The two-year eligibility period for the larger exclusion begins on the date of the spouse’s death. Therefore, a sale that occurs in the second calendar year following the year of death but more than 24 months after the deceased spouse’s date of death won’t qualify for the larger $500,000 exclusion. 

Beware of the Anti-Recycling Rule

The home-sale gain exclusion privilege is generally available only when you haven’t excluded an earlier gain within the two-year period ending on the date of the later sale. In other words, you generally can’t recycle the gain exclusion privilege until two years have passed since you last used it.

You can only claim the larger $500,000 joint-filer exclusion if neither you nor your spouse took advantage of it for an earlier sale within the two-year period. If one spouse claimed the exclusion within the two-year window, but the other spouse didn’t, the exclusion is limited to $250,000.

Electing Out of the Gain Exclusion Privilege

As a home seller, you always have the option of electing out of the gain exclusion deal and reporting your home sale profit as a taxable gain. You can elect out by reporting an otherwise excludable gain on Schedule D of your federal income tax return. An obvious circumstance where this option may be beneficial is when you have two principal residence sales within a two-year period, with the later sale producing a larger gain.

For example, Jack files jointly with his wife Jill. They jointly owned a home in Texas and another in Florida. They used the Texas property as their principal residence in 2020 and 2021. They used the Florida home as their principal residence in 2022 and 2023. In early 2024, they sold the Texas property for a $300,000 gain. Later in 2024, they sold the Florida home for an $800,000 gain.

Jack and Jill meet the ownership and use tests for both properties. However, because the Florida home was sold less than two years after the sale of the Texas property, they can’t claim the gain exclusion break for both sales because that would violate the anti-recycling rule. In this situation, it makes sense to elect out of the gain exclusion privilege for the Texas sale. Then Jack and Jill can exclude $500,000 of gain from the more-profitable sale of the Florida home.

Prorated (Reduced) Gain Exclusion

If you fail to pass the ownership and use tests or run afoul of the anti-recycling rule, there’s still hope that you might qualify for a gain exclusion. IRS regulations allow you to claim a prorated (reduced) gain exclusion in designated circumstances.  

The prorated gain exclusion equals the full $250,000 or $500,000 figure (whichever would otherwise apply) multiplied by a fraction. The numerator is the shorter of either:

  • The aggregate period you owned and used the property as your principal residence during the five-year period ending on the sale date, or
  • The period between the last sale for which you claimed an exclusion and the sale date for the home currently being sold.

The denominator of the fraction is two years (or the equivalent in months or days). 

When you qualify for the prorated exclusion, it might be enough to shelter the entire gain from making a premature sale. However, the prorated exclusion benefit is available only when your premature sale is primarily due to:

  • A change of place of employment,
  • Health reasons, or
  • Specified unforeseen circumstances listed by the IRS.

Contact your tax advisor if you think you might qualify for a prorated gain exclusion and want to understand exactly how it might work for your situation.

Taxes on Home Sale Gains in Excess of Excluded Amount

Gains that exceed the applicable exclusion will generally be taxed at favorable long-term capital gain (LTCG) rates if you’ve owned the property for more than one year. The current maximum federal rate for LTCGs is 20%. Here are the 2024 federal rate brackets for net LTCGs, based on taxable income, including any LTCGs:

LTCG tax rate

Single

Married filing jointly

Head of household

0%

$0–$47,025

$0–$94,050

$0–$63,000

15%

$47,026–$518,900

$94,051–$583,750

$63,001–$551,350

20%

$518,901 and up

$583,751 and up

$551,351 and up

To add insult to injury, some home sellers also may be exposed to the 3.8% net investment income tax (NIIT). The NIIT hits the lesser of:

  • Your net investment income, including capital gains and dividends, or
  • The amount by which your modified adjusted gross income exceeds the applicable threshold.

The thresholds are as follows:

  • $200,000 for single taxpayers or heads of households,
  • $250,000 for married couples who file jointly, and
  • $125,000 for married couples who file separately.

As a result, the maximum effective federal income tax rate on a long-term gain from a home sale could be as high as 23.8% (20% plus 3.8%).

If part of your gain is taxable due to business or rental use of the home, you must also file IRS Form 4797, “Sales of Business Property.” That form will show how much of your gain may be subject to the special 25% federal income tax rate on gain attributable to depreciation deductions. 

For More Information

Taking advantage of the home-sale gain exclusion can save significant tax dollars when you file your federal income tax return. Contact your tax professional if you have questions or want more information about the tax impact of selling your principal residence.