# Home sale tax exclusion

> The home sale tax exclusion lets you keep up to $250,000 of profit from selling your main home free of federal income tax, or $500,000 if married filing jointly, if you owned and lived in it 2 of the last 5 years.

Also called: Section 121 exclusion, capital gains exclusion, primary residence exclusion, 2-out-of-5-year rule, $250,000 exclusion. Topic: Closing costs and taxes.

The exclusion, in Section 121 of the tax code, is why most people who sell their main home owe no federal [capital gains tax](https://brokerandagent.com/glossary#capital-gains-tax). It applies to your gain, not the sale price, so the first step is working out what you actually made.

## Who qualifies for the exclusion?

IRS Publication 523 sets two tests. Ownership: you owned the home for at least 24 months of the 5 years before the sale. Use: you lived in it as your main home for at least 24 months of those 5 years. The months don’t have to be in one block, and the ownership and use periods don’t have to be the same months.

You also can’t have used the exclusion on another home sale in the 2 years before this one. A married couple filing jointly can exclude up to $500,000 when one or both spouses meet the ownership test and both meet the use test and that 2-year look-back.

If you sold early because of a job move, a health reason or an unforeseeable event, like a death or divorce, you may still qualify for a partial exclusion.

## How do you figure the gain?

Start with the sale price and subtract selling expenses, like commissions and legal fees, to get the amount realized. Then subtract your [adjusted basis](https://brokerandagent.com/glossary#cost-basis): what you paid for the home, plus certain buying costs and the cost of improvements such as a new roof, an addition or a kitchen remodel. Repairs like painting don’t count.

## Do you have to report the sale?

You must report the sale if you received [Form 1099-S](https://brokerandagent.com/glossary#form-1099-s) or if you can’t exclude all of the gain; otherwise you generally don’t need to. A 1099-S means reporting even when the gain is fully excluded. Any gain above the limit is reported as a capital gain.

A loss on the sale of your main home isn’t deductible.

## What reduces or blocks the exclusion?

Time after 2008 when the home wasn’t your main home, such as years as a rental, can reduce the exclusion. Depreciation you claimed for a home office or rental after May 6, 1997 is taxable even if the rest of the gain is excluded. Investment property doesn’t qualify at all; for that, a [1031 exchange](https://brokerandagent.com/glossary/1031-exchange) may be the tool.

## Example: figuring the taxable gain

| | |
| --- | --- |
| Sale price | $650,000 |
| Selling expenses | −$40,000 |
| Amount realized | $610,000 |
| Adjusted basis (purchase price plus improvements) | −$280,000 |
| Gain | $330,000 |
| Taxable after the $250,000 exclusion (single) | $80,000 |
| Taxable after the $500,000 exclusion (married filing jointly) | $0 |

Illustrative numbers: bought for $250,000, $30,000 of improvements, owned and lived in for more than 2 years. Gain above the exclusion is taxed at long-term capital gains rates when you’ve owned the home more than a year.

## Common mistakes

- Applying the exclusion to the sale price instead of the gain.
- Forgetting to add improvements to your basis. Keep the receipts for as long as you own the home.
- Assuming a second home or rental qualifies. Only a main home does, and rental years can shrink the exclusion.
- Selling two homes within 2 years and expecting to exclude the gain on both.

## Questions

### Do I have to buy another home to use the exclusion?

No. The exclusion has no reinvestment requirement; you can sell and rent, downsize or move anywhere.

### What if I lived in the home less than 2 years?

You may qualify for a partial exclusion if you sold because of a change in work location, health or certain unforeseeable events. IRS Publication 523 has a worksheet to figure it.

### Does the exclusion apply to state income tax?

Publication 523 covers federal tax only, and state rules can differ. Check your state’s rules or ask a tax professional before you sell.

## Related terms

- [Capital gains tax](https://brokerandagent.com/glossary#capital-gains-tax): Capital gains tax is income tax on the profit from selling an asset such as a home: the amount realized after selling costs, minus your cost basis. Gain on a main home may be partly or fully excluded.
- [Cost basis](https://brokerandagent.com/glossary#cost-basis): Cost basis is what you’ve invested in a property for tax purposes: generally the purchase price plus certain buying costs and the cost of improvements. Subtracting it from what you realize on a sale gives your gain or loss.
- [Form 1099-S](https://brokerandagent.com/glossary#form-1099-s): Form 1099-S is the IRS form that reports a real estate sale and its gross proceeds. The closing agent usually files it and gives the seller a copy; some main-home sales are exempt with the seller’s written certification.
- [1031 exchange](https://brokerandagent.com/glossary/1031-exchange): A 1031 exchange lets an investor defer capital gains tax on the sale of business or investment real estate by reinvesting in like-kind property, identifying it within 45 days and closing within 180. Primary homes don’t qualify.
- [Net proceeds](https://brokerandagent.com/glossary#net-proceeds): Net proceeds are the money a seller receives from a sale after the mortgage payoff, commissions, closing costs, taxes and any credits to the buyer come out of the sale price.

## Sources

- [IRS Publication 523: Selling your home](https://www.irs.gov/publications/p523)
- [IRS Topic 701: Sale of your home](https://www.irs.gov/taxtopics/tc701)
- [IRS Topic 409: Capital gains and losses](https://www.irs.gov/taxtopics/tc409)
- [IRS: Instructions for Form 1099-S](https://www.irs.gov/instructions/i1099s)

Checked 2026-10-02 by the Broker & Agent team. General information, not legal, tax or lending advice.

Source: https://brokerandagent.com/glossary/home-sale-tax-exclusion
