The big picture. The everyday decisions.An independent perspective on money
Money, Markets & Modern Wealth
Property

How the US Home Sale Tax Exclusion Works: Who Qualifies

Many US homeowners can sell their main home and keep up to $250,000 of profit tax-free, or $500,000 for joint filers. Here is how the IRS tests work and where people trip up.

Modern white house with glass garage doors and plants

Under United States federal tax law, many homeowners can sell their main home and exclude a large part of the profit from income tax. This article explains how that exclusion works, which tests decide eligibility, and how the gain is calculated. It describes US federal rules as set out by the Internal Revenue Service (IRS); state taxes and the rules of other countries differ.

What does the exclusion actually allow?

According to the IRS, a taxpayer can exclude up to $250,000 of capital gain from the sale of a main home, or up to $500,000 if filing a joint return with a spouse. The exclusion is found in Section 121 of the Internal Revenue Code, and the IRS explains it in Topic 701 and Publication 523.

Two points are easy to miss. First, the exclusion applies to gain, meaning profit, not to the sale price. Second, it is a cap on the amount of gain that is not taxed, not a guarantee that no tax is owed. A larger gain can leave a taxable remainder.

The tests: ownership, use and the two-year look-back

The IRS sets three main conditions.

  • Ownership test: the home must have been owned for at least 24 months during the 5 years ending on the sale date.
  • Use test: the home must have been used as a main home for at least 24 months (730 days) within the same 5-year window. The months do not have to be consecutive.
  • Look-back test: the exclusion generally cannot be claimed if it was used for another home sold during the 2 years before this sale.

The ownership and use periods can fall in different stretches of the five years. A person who lived in a home for two years, rented it out for two years and then sold it in year four or five can still meet both tests, subject to the depreciation and nonqualified-use rules discussed below.

Does a married couple need to satisfy every test twice?

Not entirely, but the details matter. According to Publication 523, for the full $500,000 on a joint return, each spouse must individually meet the use test. For ownership, it is enough that one spouse meets it. A couple where only one spouse satisfies the use test is generally limited to the $250,000 figure, although special rules for divorce, separation and surviving spouses can change the result.

For a surviving spouse, the IRS describes a rule under which the $500,000 limit may be kept if the sale occurs within two years of the spouse’s death and other conditions are met. Anyone in these situations should read the publication or consult a qualified tax professional, because the conditions are specific.

How is the taxable gain calculated?

The IRS defines gain as the amount realized minus adjusted basis.

  • Amount realized is the sale price minus selling expenses, according to the Publication 523 worksheets.
  • Adjusted basis generally starts with the purchase price plus qualifying closing costs, then adds capital improvements and subtracts items such as depreciation claimed for business or rental use, casualty loss deductions and insurance reimbursements.

The distinction between improvements and repairs matters. The IRS describes improvements as work that adds to the home’s value, prolongs its useful life or adapts it to new uses. Ordinary repairs generally cannot be added to basis, though repair-type work done as part of an extensive remodeling or restoration project can count. Records of improvements, kept for years, are what make a higher basis defensible. For related background on how acquisition costs build up, see the hidden costs of buying property.

Worked example with round numbers

The following is illustrative arithmetic, not a real case.

Item Amount
Purchase price (including qualifying closing costs) $300,000
Capital improvements $40,000
Adjusted basis $340,000
Sale price $700,000
Selling expenses $42,000
Amount realized $658,000
Gain ($658,000 − $340,000) $318,000

A single filer who meets the tests could exclude $250,000, leaving $68,000 ($318,000 − $250,000) potentially taxable as capital gain. A married couple filing jointly, both meeting the use test, could exclude up to $500,000, which exceeds the gain, so no federal tax on the gain would arise in this example. The tax rate on any taxable remainder depends on income and how long the home was held, and is not covered here.

What if the sale happens before two years are up?

The IRS allows a reduced exclusion when the tests are not fully met but the main reason for the sale was a change in work location, a health issue or an unforeseeable event. Under the Publication 523 worksheet, the qualifying time is divided by 24 months (or 730 days) and the result is multiplied by $250,000 (or by $500,000 for joint filers who qualify).

The publication does not give a worked example, so here is an illustration of the formula only: 12 months of qualifying time divided by 24 equals 0.5, and 0.5 multiplied by $250,000 gives $125,000. The same arithmetic with 18 months gives 0.75 × $250,000 = $187,500. Whether a particular reason counts is a question for the IRS rules themselves and not something a general article can settle.

Why can renting out the home shrink the benefit?

Using a home partly or wholly for business or rental brings in two limits that surprise owners.

  1. Depreciation recapture. According to Publication 523, depreciation claimed after May 6, 1997 must be recaptured as ordinary income and cannot be excluded.
  2. Nonqualified use. Use after 2008 that is not as a main home can limit the exclusion for that period.

Separate business or rental portions of a property generally are not excludable either, and the gain is allocated between residential and nonresidential use. Someone who rented a home for several years before selling it should review these rules carefully before assuming the full cap applies. Inherited property follows different basis rules, covered in how inherited and gifted assets are treated for cost basis.

Do you have to report a sale if the gain is fully excluded?

Sometimes yes. The IRS says a sale must be reported if the seller received Form 1099-S, even when the entire gain is excludable, and also if any gain is taxable. Reporting is done on Form 8949 and Schedule D; business portions go on Form 4797. Where the exclusion covers everything and no Form 1099-S arrives, reporting is generally not required, but the seller should confirm that against the current instructions.

The IRS also notes that a loss on the sale of a main home is not deductible. The seller does not owe tax on the money received, but there is no tax benefit from the loss either.

Other situations the rules address

The IRS lists several further conditions that can alter the outcome:

  • The exclusion does not apply to a home acquired through a like-kind (Section 1031) exchange within the past 5 years, or to people subject to expatriate tax.
  • Members of the Uniformed Services, the Foreign Service and the intelligence community on qualified extended duty can elect to suspend the 5-year test period for up to 10 years.
  • If the price is paid in later years, the installment method generally applies unless the seller elects out, and the exclusion still applies.
  • Vacant land sold with the home can fall under the exclusion in some circumstances.

How the exclusion fits into wider housing decisions

The exclusion shapes how long US owners tend to think about holding a home before selling, and it changes the comparison between owning and renting, because part of a long-held home’s appreciation can be realized without federal tax. That does not make a purchase a good financial decision by itself; costs, rates and local prices matter at least as much. For the broader comparison, see a better framing for renting versus buying, and for how repayments build ownership over time, see how mortgage amortization builds equity.

Conclusion: eligibility and records decide the outcome

For US federal purposes, the home sale exclusion rests on three things: how long the home was owned and lived in, whether the exclusion was used recently, and how accurately the gain is calculated from an adjusted basis. Rental use, depreciation and incomplete records are the usual reasons the benefit turns out smaller than expected. Anyone near the thresholds, or with rental history, should check the IRS publication or speak to a qualified tax adviser before setting a sale date.

This article offers general information, not personalised financial or tax advice; rules, thresholds and rates change.

Sources: Internal Revenue Service