Skip to content

Tax

Home Sale Capital Gains Exclusion: How the $250k/$500k Rule Works

If you sell your main home at a profit, U.S. federal tax law lets you exclude up to $250,000 of the gain from income, or up to $500,000 if you are married and file jointly. For most homeowners that means no federal tax on the sale at all. The exclusion has conditions, though, and the details decide whether you qualify in full, in part or not at all.

This guide follows IRS Tax Topic 701 and Publication 523, the IRS’s main guidance on selling your home. To estimate your own figures, use the home sale capital gains calculator.

Step one: work out the gain

The exclusion applies to your gain, not the sale price. Gain is roughly:

Gain = amount realized − adjusted basis

  • Amount realized is the sale price minus selling expenses such as agent commissions, certain legal fees and title costs paid by you.
  • Adjusted basis generally starts with what you paid, including certain purchase closing costs, plus the cost of improvements that add value or extend the home’s life (a new roof, an addition, a kitchen remodel). Repairs and routine maintenance do not count. Basis is reduced by items such as depreciation you claimed and certain casualty loss deductions.

Example: you bought for $320,000, spent $60,000 on improvements, and sell for $750,000 with $40,000 of selling costs. Amount realized is $710,000. Adjusted basis is $380,000. Gain is $330,000.

Keep receipts for improvements. They are the easiest way to reduce a taxable gain, and many owners undercount them.

Step two: the ownership and use tests

To claim the full exclusion, you generally must meet both tests during the five years ending on the date of sale:

  • Ownership test: you owned the home for at least two years.
  • Use test: you lived in it as your main home for at least two years.

The two years do not have to be continuous, and they do not have to be the same two years. You could rent the home out for a period and still qualify, as long as you have 24 months of ownership and 24 months of residence inside the five-year window.

There is also a look-back test: you generally cannot have excluded gain on another home sale within the two years before this one.

The $500,000 rule for married couples

Married couples filing jointly can exclude up to $500,000 if:

  • either spouse meets the ownership test,
  • both spouses meet the use test, and
  • neither spouse excluded gain from another home sale in the prior two years.

If only one spouse meets the use test, the joint return can still claim that spouse’s $250,000. Special rules help surviving spouses who sell within two years after a spouse’s death, and divorced spouses where one lives in a home owned by the other under a divorce instrument.

In the example above, a married couple who both lived in the home for two of the last five years would owe no federal tax on the $330,000 gain. A single seller would exclude $250,000 and report $80,000 as a long-term capital gain.

Partial exclusions

If you fail the two-year tests, you may still get a reduced exclusion when the main reason for selling was:

  • a change in place of employment,
  • health, or
  • unforeseeable events, such as a death, divorce, job loss or natural disaster.

The reduced amount is generally based on the share of the two-year period you did meet. Live in the home for 12 months before a qualifying job move, and you may exclude about half of the full limit, up to $125,000 for a single filer. Publication 523 has the worksheet and the detailed safe harbors.

When the exclusion does not apply

  • 1031 exchange property. If you acquired the home through a like-kind exchange, you cannot use the exclusion if you sell within five years of acquiring it.
  • Depreciation. If you used part of the home for business or as a rental and claimed depreciation after May 6, 1997, the gain equal to that depreciation is not excluded and is taxed separately.
  • Nonqualified use. Periods after 2008 when the home was not your main residence, for example a rental period before you moved in, can reduce the excludable gain. Time after you move out but before you sell, within the five-year window, generally does not count against you.
  • Expatriates subject to the expatriation tax cannot use the exclusion.

If you are trading investment property rather than a main home, the 1031 exchange calculator covers that different set of rules.

Military, Foreign Service and intelligence personnel

Members of the uniformed services, the Foreign Service, the intelligence community and certain Peace Corps workers on qualified official extended duty can choose to suspend the five-year period for up to 10 years. That lets them meet the use test even after years stationed away from home.

Do you need to report the sale?

If all of your gain is excluded and you did not receive Form 1099-S, you generally do not need to report the sale. If you receive Form 1099-S, you must report the sale on your return even if the whole gain is excluded. Any taxable gain is reported on Schedule D and Form 8949.

A loss on the sale of your personal home is not deductible.

What about state tax?

Many states follow the federal exclusion, but not all do in the same way. Check your state’s rules, especially if you moved between states while owning the home.

Key points

  • The exclusion applies to gain: sale price minus selling costs, minus your adjusted basis.
  • Own and live in the home for two of the five years before sale to qualify for $250,000, or $500,000 for qualifying joint filers.
  • Partial exclusions exist for job moves, health and unforeseeable events.
  • Depreciation and some rental periods reduce what you can exclude.
  • A Form 1099-S means you report the sale.

This is general information, not tax advice. For complicated cases, such as mixed rental use or a home received in an exchange, work through Publication 523 or speak with a tax professional.

Sources

FAQ

What does “Home Sale Capital Gains Exclusion: How the $250k/$500k Rule Works” explain?

If you sell your main home at a profit, U.S. federal tax law lets you exclude up to $250,000 of the gain from income, or up to $500,000 if you are married and file jointly. For most homeowners that means no federal tax…

How should I use this guide with a calculator?

Read the definitions and assumptions first, then open the linked calculator with the same inputs. Treat results as estimates, not professional advice.

Is this financial or medical advice?

No. Calcenzo content is educational. Confirm important decisions with a qualified professional and official sources for your situation.

Open the Capital Gains on Home Sale Calculator

Related guides