Home › Selling a home

Selling a home

Capital gains when you sell your home: the $250,000 and $500,000 exclusion

By the ClosingCostGuide team · Figures checked against the sources below in November 2026

If you sell your main home for more than you paid, part or all of the gain may be tax-free. The IRS sets two tests and two limits.

The exclusion limits

According to the IRS, you may exclude up to $250,000 of gain from your income, or up to $500,000 if you file a joint return with your spouse.

The tests you must meet

The two tests can be met in different 2-year periods, but both must be met within the 5 years ending on the sale date.

A simple example

Illustration, not advice: suppose a single owner who passes both tests sells for $520,000 a home bought for $300,000, with no improvements and ignoring selling costs. The gain is $220,000, which is below the $250,000 limit.

Real calculations adjust the starting cost for improvements and the sale price for selling costs, so keep your records. Use the seller net proceeds calculator to see cash received and talk with a tax professional about tax.

This is a summary

Other conditions and exceptions exist. The IRS page below is the place to start, and a tax professional can apply it to your situation.

How the gain is figured, in plain terms

Gain is roughly what you receive for the home, after selling costs, minus what you paid plus the cost of major improvements. That is why keeping records of improvements and closing costs matters: they can reduce the gain on paper.

StepIllustration with made-up numbers
Sale price$520,000
Selling costs-$30,000
Amount realized$490,000
Purchase price plus improvements-$330,000
Gain$160,000

For a single owner who passes both tests, that gain is under the $250,000 exclusion. How the numbers apply to you is a question for a tax professional.

Records to keep

Frequently asked questions

What if I lived there for less than two years?

The IRS has special rules and exceptions. The page linked below is the place to start, and a tax professional can apply it to your case.

Does the exclusion apply to an investment property?

The exclusion described by the IRS is for the sale of your main home.

Do I report the sale?

Ask your tax professional. Reporting requirements depend on the facts of the sale.