What is the home sale exclusion?
It's a rule that lets you leave part or all of the profit from selling your main home out of your income. If you qualify, the first slice of gain, up to a dollar cap, is simply not taxed. Plenty of home sellers never owe a cent on the sale, and many never have to report it.
Sources
Authority, strongest first
- Code I.R.C. § 121
- Publication IRS Publication 523 (2025), Selling Your Home
Section 121(a) provides that gross income does not include gain from the sale or exchange of property owned and used as the taxpayer's principal residence for periods aggregating the required time in the five years before the sale. The exclusion is automatic if you qualify; 121(f) lets you elect out.
How much gain can I exclude?
Up to $250,000 if you're single (or married filing separately), and up to $500,000 if you're married and file a joint return and meet the extra tests for couples. Those amounts are written into the law and don't rise with inflation.
Sources
Is the cap measured against the sale price or the gain?
The gain, not the price. Gain is what you got from the sale (after selling costs) minus your basis, which is roughly what you paid plus what you put into the house. A home can sell for far more than the cap and still be fully excluded if the gain is small.
Sources
What are the ownership and use tests?
During the 5 years before the sale, you must have owned the home for at least 2 years, and lived in it as your main home for at least 2 years. You also can't have used the exclusion on a different home sale in the last 2 years.
Sources
Do the years have to be in a row?
No. You need 2 years in total (that's 24 full months or 730 days), and they can be scattered anywhere inside the 5 years before the sale. The owning and the living there don't even have to happen in the same 2 years.
Sources
Authority, strongest first
- Regulation Treas. Reg. § 1.121-1
- Publication IRS Publication 523 (2025), Selling Your Home
Reg. 1.121-1(c)(1) and (c)(4) Examples 3 and 5. Example 3 shows a renter who bought his townhouse and then moved out: use from before the purchase counted because both tests were met somewhere in the five-year window.
Do I have to do anything to get the exclusion?
If you qualify and the whole gain fits under the cap, you generally don't report the sale at all, unless you received a Form 1099-S. You can also choose not to use the exclusion for a particular sale, which sometimes makes sense.
Sources
Can I deduct a loss if I sell my home for less than I paid?
No. A loss on your own home is a personal loss, and the IRS doesn't let you deduct it. You also don't owe tax on the money you received. If you get a Form 1099-S you may still need to report the sale, even though there's no gain.
Sources
What counts as a home for this rule?
A house, condo, co-op apartment, mobile home or houseboat can each qualify, as long as it's where you actually live. It has to be your main home, not a vacation place or a rental you never lived in.
Sources
Authority, strongest first
- Regulation Treas. Reg. § 1.121-1
- Publication IRS Publication 523 (2025), Selling Your Home
Reg. 1.121-1(b)(1) lists a houseboat, a house trailer, and the house or apartment a tenant-stockholder is entitled to occupy in a cooperative housing corporation. Personal property that is not a fixture under local law is not a residence.
Did anything change for 2026?
Section 121 itself didn't change: same tests, same
$250,000 and
$500,000 caps, and the caps still don't rise with inflation. What changed around it: the two big home energy credits ended for improvements made in 2026 and later; the exclusion for forgiven home-mortgage debt ended for most debt forgiven in 2026; Form 1099-S gets new digital asset boxes for 2026 and some boxes were renumbered; and if you itemize, the cap on deducting state and local taxes is
$40,400 for 2026.
Sources
Authority, strongest first
- Code I.R.C. § 121
- Code I.R.C. § 108(a)(1)(E)
- Session law Pub. L. 119-21 § 70505
- Session law Pub. L. 119-21 § 70506
- Session law Pub. L. 119-21 § 70120
- Form instructions Instructions for Form 1099-S (Rev. 12-2026)
We read the Code text through P.L. 119-121 (October 9, 2026): the last amendment to
section 121 is Pub. L. 115-97 (2017), and P.L. 119-21 amended none of
sections 121,
1001,
1012,
1014,
1016,
1250,
1411,
6045,
1041,
143,
453 or
1038. P.L. 119-21 did terminate
sections 25C and
25D (sections 70505-70506), make the
section 217 suspension permanent (70113) and set the new
section 164(b)(7) SALT cap (70120).
Section 108(a)(1)(E) was not extended.
Which date counts: the contract, the closing or the day I moved out?
The closing date. If there's no Form 1099-S showing it, the date of sale is the earlier of the day title passes and the day the benefits and burdens of ownership shift to the buyer. The 5-year look-back counts back from that date, so a slipped closing can change your answer in either direction. Count your days to the closing, not the contract.
Sources