Capital gains tax on a home sale: the short answer
Most homeowners owe no capital gains tax on a home sale, because Section 121 lets you exclude up to $250,000 of gain, or $500,000 on a joint return, from the sale of your main home. You owe capital gains tax on a home sale only when your gain is larger than the exclusion or you fail the ownership and use tests.
Your gain is the sale price, minus selling costs such as commissions and transfer tax, minus your basis. Basis is what you paid plus closing costs on the purchase plus improvements like an addition, a new kitchen or a replaced roof. Keep the receipts; IRS Publication 523 lets improvements raise basis, and they are often the easiest way to shrink a taxable gain.
Capital gains tax on real estate that is not your home works differently. A rental, a vacation home or a commercial building gets no exclusion, and the depreciation you deducted comes back as taxable gain. The sections below cover each kind of property in turn.
Did the 2025 tax law change the home sale exclusion?
No. The 2025 tax law, P.L. 119-21 (the One Big Beautiful Bill Act), did not amend Section 121, so the exclusion for 2026 sales is still $250,000 for single filers and $500,000 for married couples filing jointly. The amounts are written into the statute and are not adjusted for inflation.
Bills to raise or remove the cap have been introduced in Congress, including the No Tax on Home Sales Act (H.R. 4327). As of October 2026 none has become law. If one passes, the effective date will matter, so check before you time a sale around it.
The 2025 law did change other real estate rules that matter to sellers of investment property. It made 100% bonus depreciation permanent for property acquired after January 19, 2025 (IRS Notice 2026-11) and rewrote the opportunity zone rules for gains invested from 2027. It left the 0%, 15% and 20% capital gains rates in place.
Who qualifies for the home sale exclusion
You qualify if you owned the home and lived in it as your main home for at least 24 months of the 5 years before the sale, and you have not excluded gain on another home in the 2 years before. The 24 months do not have to be continuous, and the ownership and use periods do not have to overlap.
For the full $500,000 on a joint return, either spouse can meet the ownership test, but both must meet the use test and neither can have used the exclusion in the prior 2 years. If only one spouse qualifies, each spouse’s own limit applies.
| Rule | What it says | Source |
|---|---|---|
| Maximum exclusion | $250,000; $500,000 on a joint return | Sec. 121(b)(1), (b)(2) |
| Ownership test | Owned at least 2 of the 5 years before sale | Sec. 121(a) |
| Use test | Lived in it as main home at least 2 of the 5 years | Sec. 121(a) |
| Frequency | Once in any 2-year period | Sec. 121(b)(3) |
| Surviving spouse | $500,000 if sold within 2 years of the spouse’s death and not remarried | Pub. 523 |
| Military and foreign service | 5-year window can be suspended up to 10 years during qualified extended duty | Pub. 523 |
| Home acquired in a 1031 exchange | No exclusion if sold within 5 years of acquisition | Sec. 121(d)(10) |
Partial exclusion if you sell early
If you sell before meeting the 2-year tests because of a job move, a health reason or an unforeseeable event, you can still take part of the exclusion. The partial amount is the full limit times the share of the 2 years you met the tests.
A single owner who lived in a home for 12 months and then moved for a new job at least 50 miles farther from the home than the old job could exclude up to 12/24 of $250,000, or $125,000. Publication 523 lists the qualifying events, which include divorce, a death in the household, multiple births from one pregnancy and job loss that qualifies for unemployment compensation.
When part of a home sale gain is still taxed
Even when you meet the tests, three kinds of gain fall outside the exclusion. These come up most for owners who rented the home, used part of it for business or got it through a 1031 exchange.
- Depreciation: gain equal to depreciation allowed or allowable after May 6, 1997 is never excluded. It is taxed at up to 25%, the same as on any rental. A basement unit or home office you depreciated counts.
- Nonqualified use: gain is prorated for periods after 2008 when the home was not your main residence, such as years as a rental before you moved in. Time after you move out, within the 5-year window, does not count against you.
- Homes from a 1031 exchange: a rental you received in an exchange and later moved into must be held 5 years before any exclusion applies.
- Gain over the cap: anything above $250,000 or $500,000 is taxed at long-term rates, and may also owe the 3.8% net investment income tax.
Worked example: capital gains tax on a home sale
A married couple bought their home in 2010 for $350,000 and spent $90,000 on an addition and a kitchen. They sell in 2026 for $1,150,000 and pay $69,000 in commission and closing costs. Their basis is $440,000, so the gain is $1,150,000 − $69,000 − $440,000 = $641,000.
They exclude $500,000, leaving $141,000 of long-term gain. Before the sale their MAGI is $210,000 and their taxable income, after the $32,200 standard deduction for 2026, is $177,800. Adding the gain brings taxable income to $318,800, under the $613,700 line where 20% begins, so the gain is taxed at 15%: $21,150. Their MAGI rises to $351,000, $101,000 over the $250,000 NIIT threshold, so the NIIT is 3.8% × $101,000 = $3,838. Federal tax: $24,988, before any state tax.
The same sale by a single owner with the same $210,000 of MAGI shows how much the joint exclusion is worth. After the $16,100 single standard deduction, taxable income before the sale is $193,900. Only $250,000 is excluded, $391,000 is taxable, the top $39,400 of it crosses into the 20% bracket, and the NIIT applies to the full $391,000. Federal tax is about $75,478. With no exclusion at all, as on a rental, the couple would owe about $129,243 on the same $641,000 before counting any depreciation.
| Same $641,000 gain | Excluded | Taxable gain | Capital gains tax | NIIT | Federal total |
|---|---|---|---|---|---|
| Married filing jointly | $500,000 | $141,000 | $21,150 | $3,838 | $24,988 |
| Single owner | $250,000 | $391,000 | $60,620 | $14,858 | $75,478 |
| No exclusion (couple, investment property) | $0 | $641,000 | $106,405 | $22,838 | $129,243 |
Capital gains tax rates on real estate in 2026
Long-term capital gains on real estate held more than a year are taxed at 0%, 15% or 20% in 2026, depending on taxable income, and the gain is stacked on top of your other income to find the rate. The thresholds come from Revenue Procedure 2025-32. The 2025 law made the ordinary brackets permanent but kept these three rates.
| 2026 filing status | 0% on taxable income up to | 15% up to | 20% above |
|---|---|---|---|
| Married filing jointly | $98,900 | $613,700 | $613,700 |
| Head of household | $66,200 | $579,600 | $579,600 |
| Single | $49,450 | $545,500 | $545,500 |
| Married filing separately | $49,450 | $306,850 | $306,850 |
Which rate applies to which part of the gain
A real estate gain can carry up to four federal rates at once, and the type of property decides which ones show up. A home sale under the cap usually has none. A rental or commercial building almost always has three.
| Part of the gain | 2026 federal rate | Home | Rental or commercial |
|---|---|---|---|
| Gain on property held 1 year or less | 10% to 37% (ordinary) | Yes, if not excluded | Yes |
| Long-term gain | 0%, 15% or 20% | Only above the exclusion | Yes |
| Unrecaptured Section 1250 gain (building depreciation) | Up to 25% | Only if depreciated | Yes |
| Section 1245 recapture (cost segregation items) | 10% to 37% (ordinary) | Rare | If a study was done |
| Net investment income tax | 3.8% above $200,000 / $250,000 MAGI | On gain above the exclusion | Yes, unless a real estate professional business |
Short-term vs long-term capital gains on real estate
Real estate you hold for one year or less produces a short-term gain, taxed at ordinary rates up to 37%; hold it one day longer than a year and the gain is long-term. IRS Publication 544 counts from the day after you acquire the property through the day you sell.
Short-term gains mostly affect flippers and owners who sell soon after buying. A flipper who buys and sells as a business may be a dealer, and dealer gains are ordinary income no matter how long the property is held. Dealer property also cannot be used in a 1031 exchange, because property held primarily for sale does not qualify.
Capital gains tax on investment property
Capital gains tax on investment property is figured on the full gain with no exclusion, and the depreciation you took is taxed first at up to 25%. Investment property means a rental house, an apartment building, land held for appreciation or a vacation home you rent out.
Two things make the bill larger than on a home. Depreciation lowers your basis every year, so the gain grows even if the price does not. And the 3.8% NIIT usually applies, since gain on investment property is investment income and a sale pushes most sellers over the threshold.
Investment property also has a deferral tool homes do not: a 1031 exchange into other investment real estate. If you sell a rental, our guide to taxes when you sell a rental property walks through recapture, released passive losses and a full $3 million building example.
Capital gains tax on commercial property
Capital gains tax on commercial real estate uses the same federal rates as residential rentals: 0%, 15% or 20% on long-term gain, up to 25% on building depreciation and the 3.8% NIIT. The difference is the depreciation schedule, which runs 39 years for office, retail and industrial buildings against 27.5 years for residential rentals under Section 168.
A slower schedule means a smaller 25% layer for each year owned. On $2,000,000 of building basis held 8 years, a 39-year schedule produces about $410,256 of depreciation and a 27.5-year schedule about $581,818. Commercial owners who did a cost segregation study will also have Section 1245 recapture taxed at ordinary rates on the reclassified items.
An apartment building of five or more units is commercial real estate to a lender, but for tax purposes it is residential rental property as long as at least 80% of gross rent comes from dwelling units. Mixed-use buildings with large retail rents can fall on the 39-year side of that line.
State capital gains tax on real estate
Most states tax real estate gains as ordinary income at their regular rates, so your state bill depends on your bracket in that state. The state where the property sits usually taxes the gain even if you live elsewhere, and your home state may give a credit for it.
A few states have no income tax on a real estate gain, including Texas, Florida, Nevada, South Dakota and Wyoming. New Hampshire repealed its interest and dividends tax for periods beginning after December 31, 2024. Washington has a capital gains tax but exempts real estate. Many states follow the federal home sale exclusion, but check your state’s rules, and expect withholding at closing in some states when the seller lives out of state.
How to defer capital gains tax on real estate
Deferring capital gains tax on real estate means postponing it to a later year, and for investment property the main tool is a 1031 exchange. For a home, the exclusion is the main tool, and there is no rollover into a new home under current law.
| Method | Works for | What it does | Key limit |
|---|---|---|---|
| 1031 exchange | Investment and business real estate | Defers all gain and recapture | 45 days to identify, 180 days to close; reinvest all proceeds |
| Delaware statutory trust via 1031 | Investment real estate | Passive replacement property for an exchange | Same 1031 rules; most DSTs sell to accredited investors |
| Installment sale | Any real estate | Spreads gain over the years you collect | Section 1245 recapture taxed in the year of sale |
| Opportunity zone fund | Any capital gain | Defers up to 5 years for gain invested from 2027, 10% basis increase at 5 years | Invest within 180 days; gain deferred under the old rules is due at the end of 2026 |
| Hold until death | Any real estate | Heirs take a basis equal to market value | You keep the property |
| Section 121 plus 1031 | A home that became a rental | Exclude part, defer the rest | Rev. Proc. 2005-14; plan with a CPA |
Inherited and gifted real estate
Inherited real estate takes a basis equal to its market value on the date of death under Section 1014, and any gain when the heir sells is long-term no matter how soon the sale happens. That step-up also erases the prior owner’s depreciation, so an heir who sells quickly often owes little or nothing.
A gift works the other way. The person receiving it generally takes the giver’s basis, along with the giver’s depreciation history, so giving away an appreciated rental moves the tax to the recipient rather than removing it.
Reporting the sale and using the calculator
Report a taxable home sale on Form 8949 and Schedule D. If the whole gain is excluded and you did not receive Form 1099-S, you generally don’t need to report it. Rentals and commercial property go on Form 4797. A loss on your own home is not deductible, but a loss on investment property usually is.
For a sale of a rental or apartment building, our capital gains tax calculator estimates the recapture, capital gains, NIIT and state tax from your price, basis and depreciation. Use the depreciation recapture calculator first if you need to estimate depreciation taken.
If you own an apartment building of five or more units, we buy directly, close on your timeline, and can work inside 1031 deadlines.
Selling? Spread the tax with seller-carry terms
If a large tax bill is what is keeping you from selling, an installment sale may help. When you carry part of the price as a note, the gain is generally reported as you receive payments instead of all in the year of sale. Some parts of the gain, such as certain depreciation recapture, can still be due up front, so run the numbers with your CPA first.
Skyline Capital Investments buys apartment buildings with five or more units and can offer seller-carry terms, or a delayed closing that fits your 1031 timeline. Send the address and unit count and we typically respond within 48 hours. How seller financing works · How an installment sale is taxed · Seller financing calculator.
Get A Seller-Carry Offer