Key Points

  1. US homeowners who have owned and lived in a property as their principal residence for two of the last five years can exclude up to $250,000 of gain from capital gains tax, or $500,000 for married couples filing jointly.
  2. The exclusion applies only once every two years, does not cover investment or rental properties, and gains tied to periods of nonqualified use or depreciation are generally ineligible.
  3. Sellers of investment property can defer tax through a 1031 exchange or spread gain via an installment sale, while accurate cost-basis records determine how much tax is actually owed.

The IRS Home Sale Exclusion: Who Qualifies and How Much You Save

Selling a home at a profit does not automatically trigger a capital gains tax bill in the United States. Under IRS rules, a seller who has owned and used the property as their principal residence for at least two of the five years before the sale can exclude up to $250,000 of gain from taxation, or up to $500,000 for a married couple filing jointly. The two years of ownership and use do not have to be consecutive, but the exclusion can generally be claimed only once every two years.

The exclusion is generous but narrow. It does not apply to investment or rental properties, to homes acquired through a 1031 exchange within the previous five years, or to sellers subject to expatriate taxes. Gains linked to periods when the home was not used as a principal residence — known as nonqualified use — and gains from depreciation deductions claimed after May 6, 1997, are also generally ineligible. For a couple who bought a home for $500,000 and sold it for $1.2 million, the $700,000 gain would leave $200,000 potentially taxable after the $500,000 exclusion.

For owners of investment property, the tax code offers different tools. A 1031 exchange allows capital gains to be deferred when proceeds are reinvested in like-kind business or investment real estate, provided replacement properties are identified in writing within 45 days and the exchange closes within 180 days. An installment sale spreads gain across multiple payments, keeping each year's taxable portion lower. Accurate cost-basis records — purchase price, qualifying improvements and certain legal fees — determine the final taxable amount, and inherited homes generally receive a basis equal to fair market value at the date of the original owner's death.

Reporting obligations matter even when no tax is owed. Sellers who receive Form 1099-S, or who have a non-excludable gain, must report the sale to the IRS. Sellers who qualify for the full exclusion should tell their real estate professional promptly so the transaction is not reported unnecessarily. Special rules also exist for divorced homeowners and military personnel on extended duty, who may be able to suspend the five-year test for up to 10 years.

At a Glance

RegulatorInternal Revenue Service (IRS)
Administers the capital gains exclusion and reporting rules for US home sales.
Key RegulationTaxpayer Relief Act of 1997
Removed the old requirement to roll sale proceeds into another home to avoid tax.
Key Financial Figure$250,000 / $500,000 exclusion
Maximum gain excluded for single filers and married couples filing jointly.
Key Term1031 exchange
Defers capital gains tax when investment property is swapped for like-kind property.
Key TermCost basis
The purchase price plus qualifying costs and improvements; used to calculate taxable gain.
Key Date45 days / 180 days
Deadlines to identify and complete a 1031 exchange replacement property.
Key FormForm 1099-S
Reports real estate sale proceeds to the IRS; triggers reporting obligations.
Key Rate0% / 15% / 20%
Long-term capital gains rates for 2027, depending on taxable income and filing status.

What the Rules Really Reward — and Where Sellers Get Caught

Why the Two-of-Five Rule Is the Real Battleground

The exclusion's value depends almost entirely on how the IRS defines ownership and use. The two years need not be consecutive, which gives homeowners flexibility, but the once-every-two-years limit means a seller with two qualifying homes cannot liquidate both tax-free in quick succession. For most households, the practical planning question is not whether the exclusion exists but whether their timeline and occupancy records can survive IRS scrutiny.

Investment Property Owners Face a Different Playbook

Rental and investment properties are shut out of the principal-residence exclusion, but the code offers two offsets: the 1031 exchange and the installment sale. The 1031 route defers rather than eliminates tax, and its deadlines are unforgiving — 45 days to identify replacement property, 180 days to close. The American Jobs Creation Act of 2004 adds a five-year holding requirement for exchanged property to later qualify for the capital gains exclusion. Installment sales, by contrast, spread the gain over time so each payment is taxed at a lower marginal rate, though interest is taxed as ordinary income.

Where Sellers Most Often Lose Money

Cost basis is the quiet driver of the final tax bill. Improvements that add value increase basis and reduce taxable gain; repairs that merely maintain the home do not. Insurance payouts after a loss reduce basis, as the article's fire example shows. Inherited homes receive a stepped-up basis at fair market value on the date of death, which can dramatically shrink the taxable gain for heirs who sell soon after. Sellers who fail to document improvements or who misclassify a vacation home as a principal residence can find the exclusion unavailable when they need it.

Second Homes and the 14-Day Threshold

The line between a vacation home and an investment property is drawn by use. For the IRS to treat a second home as a personal residence in a tax year, the owner must use it for more than 14 days or 10% of the days it is rented, whichever is greater. A home rented for 40 weeks (280 days) would require more than 28 days of personal use. Converting a second home into a principal residence can unlock a partial exclusion, but gains attributable to nonqualified use after 2008 generally remain taxable under the Housing and Economic Recovery Act of 2008.

What This Means for Households and Advisors

For most owner-occupiers, the exclusion is automatic if the paperwork is in order. For investors and owners of multiple properties, the decision is more strategic: hold long enough to qualify, document basis carefully, and choose between deferral (1031), spreading (installment sale), or simply paying tax at long-term rates. The 2027 long-term capital gains brackets — 0%, 15% and 20% depending on income — mean the same gain can be taxed very differently depending on a seller's overall taxable income in the year of sale.

What Homeowners Should Do Before and After the Sale

The single most important move is to confirm your ownership-and-use timeline before you list — because the exclusion is worth up to $250,000 ($500,000 for couples) and is lost entirely if you sold another home within the last two years.

For homeowners planning a sale:

  • Document two of the last five years of ownership and occupancy — utility bills, tax records, driver's license — before closing, since the IRS can require proof.
  • Track every capital improvement (a $15,000 bathroom addition raises your basis and cuts taxable gain); routine maintenance and repairs do not.
  • If you receive Form 1099-S but qualify for the full exclusion, tell your real estate professional immediately so the sale is not reported as taxable.
  • If you are divorced or on military extended duty, check the special rules: a divorced spouse can count the former spouse's ownership years, and military personnel can suspend the five-year test for up to 10 years.

For investment and second-home owners:

  • If you plan a 1031 exchange, line up replacement properties before closing — you have 45 days to identify and 180 days to complete, and personal residences do not qualify.
  • If you want to convert a rental into your principal residence, note that gains tied to nonqualified use after 2008 generally remain taxable, so the partial exclusion may be smaller than expected.
  • Consider an installment sale if spreading gain over several years keeps you in a lower capital gains bracket.

Metrics worth watching: your taxable income against the 2027 long-term capital gains thresholds ($51,050 single / $102,100 married for the 0% rate), the size of your gain relative to the $250,000/$500,000 exclusion, and the 45-day and 180-day 1031 deadlines if you are deferring.