Personal Residence Tax Exemption: Limits, Tests, and Recapture

When you sell your main home, the primary residence capital gains tax exclusion lets you keep up to $250,000 of the profit free of federal tax, or up to $500,000 if you’re married and file jointly. The benefit comes from Section 121 of the Internal Revenue Code, and most homeowners qualify automatically after two years of ownership and use.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain from Sale of Principal Residence The details around partial exclusions, depreciation, and reporting are where real money is won or lost.

How Much You Can Exclude

A single filer or someone married filing separately can shield up to $250,000 of gain. A married couple filing jointly can shield up to $500,000, as long as both spouses used the home as their main residence for the required period. Only one spouse needs to meet the ownership test for the couple to claim the full $500,000.2Internal Revenue Service. Publication 523 – Selling Your Home

These caps are statutory. They haven’t changed since 1997 and don’t adjust for inflation.

The Two-Year Ownership and Use Tests

To qualify for the full exclusion, you need to pass two separate tests during the five-year period ending on the sale date. You must have owned the home for at least two of those five years, and you must have used it as your primary residence for at least two of those five years.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain from Sale of Principal Residence The two periods don’t have to overlap or run continuously. You could live in the house for a year, rent it out for two, move back for a year, and still meet both tests.

There’s also a frequency limit. You can only claim the exclusion once every two years. If you excluded gain on a different home sale within the prior two years, you can’t take the full exclusion on this one.2Internal Revenue Service. Publication 523 – Selling Your Home

What Counts as a Principal Residence

A principal residence doesn’t have to be a conventional single-family house. Federal regulations extend the definition to houseboats, mobile homes, and co-op apartments held through a tenant-stockholder interest.3eCFR. 26 CFR 1.121-1 – Exclusion of Gain from Sale or Exchange of a Principal Residence If you split time between two properties, the IRS looks at where you actually spent the most time, along with your mailing address, voter registration, and where your family lives.

Homes Acquired Through a 1031 Exchange

If you got the home through a like-kind exchange, the standard two-year ownership rule doesn’t apply. You have to own it for at least five years from the acquisition date before Section 121 is available.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain from Sale of Principal Residence This trips up investors who convert a rental into a personal home and try to sell too soon.

Partial Exclusion When Life Forces a Sale

Selling before you’ve hit the two-year mark doesn’t automatically kill the exclusion. If a qualifying event forces the move, you can claim a reduced amount. The IRS recognizes three categories:

  • A job change that shifts your workplace at least 50 miles farther from the home than your prior workplace.
  • A health condition that requires you to move to obtain, provide, or facilitate care.
  • Other unforeseen circumstances beyond your control, such as natural disasters or involuntary conversion.

The reduced exclusion is prorated. Divide the time you actually met the shortest applicable requirement (ownership, use, or time since your last exclusion) by two years, then multiply by $250,000.2Internal Revenue Service. Publication 523 – Selling Your Home A single filer who lived in the home for one year before a qualifying job transfer could exclude up to $125,000.

Military, Foreign Service, and Intelligence Personnel

If you’re serving on qualified official extended duty in the uniformed services, the Foreign Service, the intelligence community, or the Peace Corps, you can suspend the five-year look-back window for up to 10 years. Effectively, the test period stretches to as much as 15 years, so you could be stationed elsewhere for a decade and still satisfy the use test based on the years you lived in the home before deployment.2Internal Revenue Service. Publication 523 – Selling Your Home

Surviving Spouses and Divorced Homeowners

A widow or widower who hasn’t remarried can still claim the full $500,000 exclusion if the sale closes within two years of the spouse’s death and both spouses met the ownership and use tests just before the death.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain from Sale of Principal Residence If you haven’t individually met the ownership or use requirement, you can count your late spouse’s ownership and use as your own.2Internal Revenue Service. Publication 523 – Selling Your Home

In a divorce, the receiving spouse inherits the transferring spouse’s period of ownership, so the clock doesn’t restart. And if your ex-spouse keeps living in the home under a divorce or separation agreement, that time counts as your use of the property even after you’ve moved out.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain from Sale of Principal Residence

Non-Qualified Use Reduces the Exclusion

Time you owned the home but didn’t use it as a primary residence can shrink the excludable portion of your gain. The IRS calls these stretches “periods of non-qualified use,” and only periods after 2008 count. The formula: divide the total days of non-qualified use by the total days you owned the home, then multiply by your gain. That share can’t be excluded.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain from Sale of Principal Residence

One exception matters a lot: time after your last use as a primary residence doesn’t count as non-qualified use. So if you lived in the home for three years, moved out, rented it for two years, and then sold, that final rental stretch isn’t non-qualified. The rule targets people who rented first and moved in later, not the reverse. Temporary absences for work or health (up to two aggregate years) and military service (up to 10 years) are also excluded from the calculation.2Internal Revenue Service. Publication 523 – Selling Your Home

Home Office and Rental Use: Depreciation Recapture

If you ever claimed depreciation on the property, for a home office or a rental period, the exclusion doesn’t cover that piece. You can’t exclude gain equal to any depreciation taken (or that should have been taken) for periods after May 6, 1997. Even if you forgot to claim it, the IRS reduces your basis by the amount that was allowable.4Internal Revenue Service. Property (Basis, Sale of Home, Etc.) 5

How the remainder of the gain gets treated depends on where the business use sat:

  • Space inside the living area, like a spare bedroom used as an office, doesn’t force you to split the gain. The whole gain, minus the recaptured depreciation, still qualifies for the Section 121 exclusion.
  • Space separate from the living area, like a detached building or a rented-out unit of a duplex, requires you to allocate the gain between residential and non-residential portions. The non-residential piece only qualifies for exclusion if you also used that portion as your main home for two of the last five years.2Internal Revenue Service. Publication 523 – Selling Your Home

Recaptured depreciation is taxed at up to 25% as unrecaptured Section 1250 gain5Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed and can also be hit with the 3.8% net investment income tax if your income exceeds the threshold.4Internal Revenue Service. Property (Basis, Sale of Home, Etc.) 5

Figuring Your Gain

Your taxable gain is the sale price minus your adjusted basis minus your selling expenses. Getting the basis right is where most of the work sits.

Starting Basis

If you bought the home, your starting basis is generally what you paid, as shown on your closing settlement statement. If you inherited it, your basis is usually the fair market value on the date the prior owner died, not what they originally paid.6Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired from a Decedent That stepped-up basis often wipes out most or all of the taxable gain on an inherited home.

Adjustments Up

Capital improvements add to your basis and cut your eventual gain. A new roof, a remodeled kitchen, an added bathroom, a finished basement. Routine repairs like patching drywall or fixing a faucet don’t count. Keep receipts and invoices for every improvement; if you’re audited years after the sale, those are your only proof.7Internal Revenue Service. Important Tax Reminders for People Selling a Home

Selling Expenses

You subtract costs tied directly to the sale: real estate commissions, title insurance, legal fees, and transfer taxes. Your closing disclosure or Form 1099-S shows gross proceeds and does not subtract these for you.8Internal Revenue Service. Instructions for Form 1099-S

Tax on Gain Above the Exclusion

Anything above the $250,000 or $500,000 limit is taxed as long-term capital gain, assuming you owned the home for more than a year. For 2026, the federal rates are:

  • 0% on taxable income up to $49,450 (single) or $98,900 (married filing jointly).
  • 15% on taxable income from $49,451 to $545,500 (single) or $98,901 to $613,700 (married filing jointly).
  • 20% on taxable income above $545,500 (single) or $613,700 (married filing jointly).9Internal Revenue Service. Rev. Proc. 2025-32

Higher earners also owe a 3.8% net investment income tax on the lesser of their net investment income or the amount by which modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). The excluded portion of your gain isn’t counted as net investment income, so this surtax only applies to the taxable slice above the exclusion.10Internal Revenue Service. Topic No. 559 – Net Investment Income Tax

Reporting the Sale

Whether you have to report the sale depends on your gain and your paperwork. You must report if any of these are true:

  • Your gain exceeds the exclusion amount.
  • You received a Form 1099-S from the closing agent, title company, or broker, even if the whole gain is excludable.
  • You choose to treat the gain as taxable to preserve the exclusion for a future sale.2Internal Revenue Service. Publication 523 – Selling Your Home

If none of those apply, the sale doesn’t need to appear on your return at all.7Internal Revenue Service. Important Tax Reminders for People Selling a Home

Forms You’ll Use

When reporting is required, you list the sale on Form 8949 with the acquisition date, sale date, proceeds, and basis.11Internal Revenue Service. About Schedule D (Form 1040), Capital Gains and Losses Those figures roll into Schedule D of Form 1040.12Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040) If you have depreciation recapture, you also file Form 4797 for that piece.2Internal Revenue Service. Publication 523 – Selling Your Home

Penalties for Getting It Wrong

Substantially understating your tax bill triggers an accuracy-related penalty of 20% on the underpayment. A “substantial understatement” is a shortfall exceeding the greater of 10% of the tax that should have been reported or $5,000.13Office of the Law Revision Counsel. 26 USC 6662 – Imposition of Accuracy-Related Penalty on Underpayments On a home sale with six-figure gains, that threshold is easy to cross. Solid records of your basis, improvements, and closing costs are the best defense if the IRS challenges your numbers.