When you sell your main home, federal law lets a single filer keep up to $250,000 of profit tax-free and a married couple filing jointly up to $500,000. That break is the principal residence exclusion under 26 U.S.C. § 121, and you can use it more than once in a lifetime, though not more than once every two years, and only if you meet the ownership and residency tests each time.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
The Two-of-Five-Years Tests
Qualifying for the full exclusion turns on two tests, both measured against the five-year window ending on the sale date. You must have owned the home for at least two years total during that window, and you must have lived in it as your primary residence for at least two years total during that same window.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The two spans don’t have to overlap and don’t have to be consecutive. If you rented the place out for a stretch, then moved back in, you can still qualify so long as your months of actual residence add up to 24 within the lookback.
Married couples filing jointly get the $500,000 cap only if both spouses meet the two-year use test individually; the ownership test only needs to be satisfied by one of them.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Couples who don’t both meet those conditions aren’t shut out entirely. Each spouse’s exclusion is computed separately and the two amounts are added, which usually preserves a meaningful benefit.
Which Home Counts as Your Main Home
If you own more than one property, only one is your principal residence at a time. Time spent at each place is the biggest factor, but Treasury regulations also weigh supporting evidence:2eCFR. 26 CFR 1.121-1 – Exclusion of Gain From Sale or Exchange of a Principal Residence
- The address on your tax returns, driver’s license, and voter registration
- Where you work and where you bank
- Where your family members live
- Which religious organizations or recreational clubs you belong to near the property
No single item decides it. The IRS looks at the whole picture, and a vacation home you visit for a few summer weeks won’t qualify even if you route your mail there.3Internal Revenue Service. Publication 523, Selling Your Home
How the Cap Applies to Your Gain
The $250,000 and $500,000 figures cap the gain, not the sale price. Your gain is what you sold the home for, minus selling costs, minus your adjusted basis. Basis starts with what you paid and rises with qualifying capital improvements such as a new roof, a finished basement, or an added bathroom. Routine maintenance doesn’t add to basis.
If the whole gain fits under the cap, none of it is taxed. Anything above the cap is taxed at long-term capital gains rates, which for 2026 run at 0%, 15%, or 20% depending on your total taxable income.4Internal Revenue Service. Topic No. 409, Capital Gains and Losses Gain above the exclusion can also draw the 3.8% net investment income tax if your modified adjusted gross income clears $200,000 single or $250,000 joint. The excluded portion is specifically exempt from that surtax.5Internal Revenue Service. Topic No. 559, Net Investment Income Tax
One thing that surprises sellers: if you lose money on the sale of a personal residence, that loss is not deductible.6Internal Revenue Service. Capital Gains, Losses, and Sale of Home
The Two-Year Cooldown
You can’t stack the exclusion on back-to-back sales. If you already claimed it on a home sale within the two years before your current sale, you can’t claim it again this time.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence For anyone sitting on a large gain who has used the break recently, it can be worth waiting until the two-year window has passed to close.
Partial Exclusion for an Early Sale
Selling before you hit the two-year marks doesn’t automatically kill the exclusion. A reduced exclusion is available if you sold because of a change in employment, a health condition, or certain unforeseen circumstances such as divorce or a natural disaster.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The same partial exclusion is available if you used the full exclusion on a prior sale inside the two-year window and are now selling again for one of those qualifying reasons.
The math: take the number of months you owned and lived in the home (whichever is smaller), divide by 24, and multiply by the full cap. A single filer who lived in the home for 15 months before a qualifying job move gets 15 ÷ 24 × $250,000, or $156,250. Without a qualifying reason, an early sale gets no exclusion at all.
Situations That Change the Result
Surviving Spouses
A surviving spouse who hasn’t remarried can still claim the full $500,000 cap rather than the $250,000 single-filer amount, so long as the home is sold within two years of the other spouse’s death and both spouses met the ownership and use tests before the death.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The two-year clock runs from the date of death, not the date you list the home.
Depreciation Recapture
If you claimed depreciation on the home after May 6, 1997, whether because you rented it out or used part of it as a home office, the gain tied to that depreciation cannot be excluded. It’s taxed separately, and the cap doesn’t shelter it, no matter how far under $250,000 or $500,000 your total gain sits.3Internal Revenue Service. Publication 523, Selling Your Home If you were entitled to depreciation deductions but never actually took them, the IRS still requires you to reduce basis as though you had.
Periods of Nonqualified Use
Time you owned the home but didn’t use it as your primary residence can carve out part of your gain from the exclusion. The excluded fraction depends on the ratio of nonqualified time to total ownership time.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Time after the last date you used the home as your primary residence doesn’t count against you. Temporary absences of up to two years for a job change, health issue, or unforeseen circumstance don’t count either. Military members on qualified extended duty get up to ten years.
When You Have to Report the Sale
Plenty of home sellers don’t have to report the sale at all. If your gain is fully covered by the exclusion, you didn’t receive a Form 1099-S from the closing agent, and you don’t want to voluntarily report the gain, you can skip Form 8949 and Schedule D.3Internal Revenue Service. Publication 523, Selling Your Home
Reporting is required if any of these apply:7Internal Revenue Service. Topic No. 701, Sale of Your Home
- You received a Form 1099-S from the closing agent. In that case you must report the sale even if the entire gain is excludable.
- Your gain exceeds the exclusion. Any taxable portion has to be reported and will be taxed at capital gains rates.
- You want to report voluntarily, usually because you expect to sell a more valuable home within the next two years and want to save the exclusion for the bigger sale.
When reporting is required, the sale goes on Form 8949 and flows to Schedule D of Form 1040.8Internal Revenue Service. About Form 8949, Sales and Other Dispositions of Capital Assets You’ll list the purchase date, sale date, proceeds, and adjusted basis, and use an adjustment to claim the exclusion. If your gain is fully excluded and you’re only filing because a 1099-S was issued, the adjustment zeros out the gain and no tax is owed on the sale.3Internal Revenue Service. Publication 523, Selling Your Home Hold on to your closing statements from both the purchase and the sale, along with receipts for any capital improvements. Reconstructing renovation costs from memory years later, if a question ever comes up, is a losing exercise.