Capital Gains Tax on Selling a House in 2026: What Is Excluded and What Is Taxed
The exclusion and the two-of-five-years test
Section 121 lets you exclude up to $250,000 of gain from the sale of your main home, or $500,000 if you are married and file jointly. To qualify you must have owned the home and used it as your principal residence for at least 2 of the 5 years before the sale.
The two years do not have to be consecutive, and ownership and use can be met in different periods within the 5-year window.
| Rule | What it says |
|---|---|
| Amount (IRC 121(b)) | $250,000 per taxpayer; $500,000 joint if either spouse meets the ownership test and both meet the use test |
| Frequency | You cannot have used the exclusion on another sale in the 2 years before this sale |
| Surviving spouse (IRC 121(b)(4)) | Keeps the $500,000 if the sale is within 2 years of the spouse's death and the tests were met at death |
| Partial exclusion (IRC 121(c)) | A prorated amount if you sell early because of a job change, health or unforeseen circumstances |
| Reporting | Report on Form 8949 and Schedule D if you get Form 1099-S or if part of the gain is taxable |
The exclusion is automatic if you meet the tests; you do not elect it. For gain beyond the exclusion on a high-value home, see home sale gain over the exclusion.
How to calculate the gain on your house
Gain is the amount realized minus adjusted basis. The amount realized is the sale price minus selling costs such as agent commissions, title fees and transfer taxes.
Adjusted basis is what you paid, plus closing costs on the purchase, plus capital improvements (a new roof, an addition, a remodeled kitchen), minus any depreciation you claimed, for example for a home office or a rented room. Repairs and maintenance, such as repainting, do not add to basis. The approach is explained in adjusted basis.
Example: you bought for $400,000 with $8,000 of closing costs, added $60,000 of improvements, and sell for $1,300,000 paying $78,000 in costs. Adjusted basis is $468,000. Amount realized is $1,222,000. The gain is $754,000. A joint filer excludes $500,000 and has $254,000 to report.
What tax applies to the gain above the exclusion
Gain above the exclusion is a long-term capital gain if you owned the home more than one year.
It is stacked on top of your other income and taxed at 0%, 15% or 20% in 2026, using the Revenue Procedure 2025-32 thresholds: 0% up to $98,900 of taxable income joint ($49,450 single), 15% up to $613,700 joint ($545,500 single), and 20% above.
The 3.8% net investment income tax applies to the taxable gain if your modified AGI is over $250,000 joint or $200,000 single (IRC 1411); the excluded gain is not subject to it.
In the first example the couple sells at an $850,000 gain, excludes $500,000, and reports $350,000. With $120,000 of other income, the federal tax is $59,195 in Texas.
A single California seller with $180,000 of other income and a $600,000 gain reports $350,000 after the $250,000 exclusion and pays $99,622 combined federal and state ($52,500 federal, $12,540 NIIT and $34,582 California). A single Florida seller with a $450,000 gain and $100,000 of other income pays $33,800 on the $200,000 above the exclusion.
Depreciation and other gain the exclusion does not cover
Depreciation claimed on a home office, a rented room or an accessory unit after May 6, 1997 is not excluded (IRC 121(d)(6)). That gain is taxed as unrecaptured section 1250 gain at up to 25% in 2026.
A couple that depreciated $200,000 on a rented part of their home and sells at a $700,000 gain still excludes the remainder up to $500,000, but the $200,000 is taxable: $46,888 of federal tax in Texas.
Gain allocated to periods of nonqualified use, such as years the home was a rental before you moved in, is also taxable (IRC 121(b)(5)). See depreciation recapture.
When the exclusion does not apply
You do not get the exclusion for a second home, an investment property or a vacation house that was never your main home; those sales follow second home or rental property rules.
You also lose it if you used it on another home sold within 2 years, or if you acquired the house in a like-kind exchange within the previous 5 years (IRC 121(d)(10)).
A rental that you later convert to a main home and live in for 2 of 5 years can qualify, subject to the depreciation and nonqualified-use limits above. If you inherited the house, the heir gets a stepped-up basis, which usually removes most of the gain (see inherited property).
Ways to reduce tax on a house sale above the exclusion
Documenting every capital improvement raises basis dollar for dollar. Selling costs reduce the amount realized. Timing the sale in a year with lower other income may move part of the taxable gain into the 15% bracket instead of 20% (2026 thresholds).
If you are close to the two-year mark, waiting can turn a taxable sale into a fully excluded one.
For a sale where the taxable portion is large, an installment sale to a buyer who pays over several years spreads the gain across tax years, and a section 121 and 1031 combination can apply when the property was part residence, part rental.
What to know
The exclusion is a federal rule; states set their own, and most conform to it, but check your state's treatment of nonresident sellers and withholding. A seller financing the sale gives up the right to the full price at closing and takes credit risk on the buyer.
Results here use 2026 federal tables (Rev. Proc. 2025-32) and modeled state rules, and assume the incomes in each example. This is general information, not tax advice.
How much tax does this sale cause? A worked example
Married couple, both lived in the home 10 years, $120,000 of other income. $850,000 gain less the $500,000 exclusion leaves $350,000 taxable. Single owner, $180,000 of other income.
$600,000 gain less the $250,000 exclusion leaves $350,000 taxable. California taxes the gain at ordinary state rates and does not have its own exclusion different from the federal one. Single owner, $100,000 of other income, no state income tax.
$450,000 gain less $250,000 exclusion leaves $200,000 taxable. Couple with $120,000 of other income, $700,000 gain, $200,000 of which is depreciation taken on a rented portion. The exclusion cannot shelter that depreciation, so $200,000 is unrecaptured 1250 gain.
| Engine run | Joint filers, $850,000 gain, Texas | Single seller, $600,000 gain, California | Single seller, $450,000 gain, Florida | Joint filers who ran a rental in part of the home, Texas |
|---|---|---|---|---|
| Filing status | Married, joint | Single | Single | Married, joint |
| State | Texas | California | Florida | Texas |
| Other income (wages, pension, interest) | $120,000 | $180,000 | $100,000 | $120,000 |
| Long-term capital gain | $350,000 | $350,000 | $200,000 | $0 |
| Unrecaptured Section 1250 gain (25% max) | $0 | $0 | $0 | $200,000 |
| Federal income tax on the sale | $50,835 | $52,500 | $30,000 | $44,228 |
| Net investment income tax (3.8%) | $8,360 | $12,540 | $3,800 | $2,660 |
| State income tax on the sale | $0 | $34,582 | $0 | $0 |
| Total tax caused by the sale | $59,195 | $99,622 | $33,800 | $46,888 |
| Effective rate on the gain | 16.9% | 28.5% | 16.9% | 23.4% |
| Gain kept after these taxes | $290,805 | $250,378 | $166,200 | $153,112 |
Computed November 6, 2026 by the Big Sale Tax engine (engine.js yearTax): federal brackets, 0/15/20% thresholds and AMT from Rev. Proc. 2025-32 (OBBBA-adjusted) and the One Big Beautiful Bill Act (P.L. 119-21); NIIT under IRC 1411 (thresholds not indexed); state tax from the engine's state table. "Tax caused by the sale" = tax with the sale minus tax without it. Excludes selling costs, local taxes and estimated-tax timing. Education only.
How much tax would you owe? Run your own numbers
2026 law from the engine: federal 0/15/20% brackets (Rev. Proc. 2025-32), 25% cap on unrecaptured 1250 gain, ordinary rates on 1245 recapture, 3.8% NIIT over $200,000 single / $250,000 joint (IRC 1411), AMT, and your state's rules (California on the FTB 2026 schedules).
What was sold and years held only matter in a few states: Washington exempts real estate, Ohio and New Mexico treat a business sale differently, Arizona subtracts 25% for assets bought after 2011 and Oklahoma deducts gain on Oklahoma property held 5 years or more.
Tax shown is the tax caused by the sale. Excludes local taxes other than Maryland's county tax (3.2% used). Tick the active-owner box if you materially participate in the business. Education only.
Long-Term vs Short-Term Capital Gains (2026)
The one-year holding rule, the 2026 0/15/20% thresholds for every filing status, NIIT, recapture, the state layer and a worked $200,000 example: 11 months vs 13 months, and what spreading the gain can save.
Frequently asked questions
How much can you make selling a house without paying capital gains?
What is the capital gains tax rate on a house sale in 2026?
Do I have to report the sale of my home if the gain is excluded?
Can I use the exclusion more than once?
What if I lived in the house less than two years?
Is depreciation on a home office taxed when I sell?
What happens if my spouse dies before I sell?
Sources
- IRC 121: exclusion of gain from sale of principal residence (Cornell LII)
- IRS Publication 523: Selling Your Home
- IRS Topic 701: Sale of your home
- Rev. Proc. 2025-32, 2026 inflation adjustments (IRS)
- IRC 1411: net investment income tax (Cornell LII)
Figures as of October 7, 2026; each rate and limit above names its source and year. Education only, not legal or tax advice.
Keep reading
Capital gains tax calculator
The order of operations behind any capital gains calculator, with four worked sales: a rental, a business, a home over the exclusion and a common input mistake.
ReadHome sale over the exclusion
For long-time owners whose gain beats $250,000 or $500,000: what is excluded, what is taxed, and the rules that move the line.
ReadAdjusted basis
How to build adjusted basis from your records, what goes in and what never does, inherited versus gifted basis, partnership and S corporation basis, and what a
ReadSecond home
A vacation home gets no Section 121 exclusion, but rental history, a 1031 safe harbor or moving in can change the bill.
ReadInherited property
Heirs start from the value on the date of death, so a quick sale often produces little gain. The exceptions are where the tax hides.
ReadRental property
How a rental sale is really taxed: the 25% depreciation layer, the losses the sale finally frees, the 3.8% tax, and why moving in first rarely helps.
ReadKnow your number before you sign.
Start with a free scope call: a short call to see whether the Big Sale Tax Analysis is worth it for your sale. No obligation.
Prefer email? Request the analysis by email.
You talk to Hans Goldstein. Enrolled Agent, admitted to practice before the IRS.