Skip to content
TheMoney Pocket

Free · 1-page PDF-ready sheet

Every 2026 tax number on one page

Brackets, standard deduction, capital-gains thresholds, credits, and the new OBBBA deductions — one printable page instead of 40 IRS PDFs.

  • All 7 brackets for single, joint, and head of household
  • Tips, overtime, senior, and car-loan deduction caps
  • 0% / 15% / 20% capital-gains breakpoints
  • Credits, estate and gift limits, AMT exemption

It unlocks right here on the page — we don’t send emails. The Money Pocket (IZ Labs Kft.) stores your address and never sells it. Privacy policy.

Real Estate Investing

Capital Gains Tax on Real Estate: Home vs Rental

Understand how capital gains tax applies when selling a primary home versus a rental property, including the Section 121 exclusion and 1031 exchange.

Written & fact-checked byThe Money Pocket team
Updated Published 7 min read
Skip to the numberReal Estate Capital Gains Tax Calculator
On this page
  1. Home vs. rental at a glance
  2. Step one for both: figure the gain
  3. Selling your main home
  4. Selling a rental property
  5. Properties that were both a home and a rental
  6. Deferring the tax instead of paying it
  7. Reporting the sale
  8. Planning checklist before you sell

Selling your main home is often tax-free: you can exclude up to $250,000 of gain, or $500,000 on a joint return, if you owned and lived in it for two of the last five years. Selling a rental gets no exclusion; the whole gain is taxable, the part caused by depreciation is taxed at up to 25%, and high earners add a 3.8% surtax. Properties that were both — a former home you rented out, or a rental you moved into — get a blend of both sets of rules.

Model your sale with the real estate capital gains tax calculator while you read.

Home vs. rental at a glance

RuleMain homeRental property
Gain exclusionUp to $250,000 / $500,000None
Depreciation in basisOnly if part was used for business or rentalAlways — allowed or allowable
Rate on depreciation-related gain25% max if any was taken25% max (unrecaptured §1250 gain)
Rate on remaining long-term gain0% / 15% / 20%0% / 15% / 20%
3.8% NIITOnly on the taxable portionYes, above the MAGI threshold
Loss on saleNot deductibleGenerally deductible (§1231)
Tax deferral by reinvestingNo1031 exchange
Main reporting formForm 8949 / Schedule DForm 4797

Sources: Publication 523 for homes, Publication 544 for business and rental property, Topic 409 for rates, and Topic 559 for NIIT.

Step one for both: figure the gain

Gain = amount realized − adjusted basis.

  • Amount realized = sale price − selling expenses (commissions, title, transfer taxes, legal fees).
  • Adjusted basis = purchase price + certain settlement costs + capital improvements − depreciation and casualty losses claimed.

Publication 523 lists the settlement costs that add to basis (legal and recording fees, surveys, transfer taxes, owner's title insurance) and those that do not (loan fees, points, mortgage insurance). Repairs never add to basis; improvements that add value or extend life do. Keep receipts for every improvement for as long as you own the property plus the period you could be audited after selling it.

Selling your main home

Who qualifies for the full exclusion

Publication 523's eligibility test has four parts:

  1. You owned the home at least 24 months in the 5 years before the sale.
  2. You lived in it as your main home at least 24 months (730 days) in that window. The months need not be continuous, and short absences such as vacations count as use.
  3. You did not exclude gain on another home in the 2 years before this sale.
  4. You did not acquire the home through a like-kind exchange in the past 5 years.

On a joint return, only one spouse needs to meet the ownership test, but both must meet the use test for the $500,000 limit. A surviving spouse can keep the $500,000 limit for a sale within 2 years of the spouse's death if they have not remarried.

Partial exclusion when you sell early

If the main reason for selling early is a job (a new workplace at least 50 miles farther from the home than the old one), health, or an unforeseeable event such as divorce, death, or job loss, you can claim a prorated exclusion.

Example: A single filer lives in a home 14 months, then takes a job 300 miles away and sells. Partial exclusion = $250,000 × 14 ÷ 24 = $145,833. If the gain is $90,000, it is fully excluded.

What happens to gain above the exclusion

A married couple who bought for $400,000, spent $60,000 on improvements, and sell for $1,050,000 with $60,000 of costs have a $530,000 gain. After the $500,000 exclusion, $30,000 is taxable as long-term gain. With $150,000 of other taxable income, it is taxed at 15%: $4,500. Excluded gain is also excluded from net investment income, per Topic 559.

Selling a rental property

Depreciation recapture: the cost of the tax shelter

Each year you own a rental, depreciation reduces your basis — whether or not you claimed it. Publication 544 says to use the greater of depreciation allowed or allowable, so skipping the deduction does not avoid the tax on it later.

The gain that results from that depreciation is unrecaptured section 1250 gain. Topic 409 sets a 25% maximum rate on it. In practice it stacks on top of your ordinary income and is taxed at your ordinary rates up to that 25% cap. The rest of the gain is taxed at the regular 0%, 15%, or 20% long-term rates.

Worked example: a rental held five years

A single filer sells a rental with:

  • Amount realized $485,000; original basis $326,000; depreciation taken $45,000
  • Adjusted basis $281,000; total gain $204,000 ($45,000 unrecaptured §1250 + $159,000 other long-term gain)
  • Other taxable income $80,000 (wages of $96,100 minus the $16,100 standard deduction)
LayerTaxable income rangeRateTax
§1250 gain, $25,700$80,000 – $105,70022%$5,654
§1250 gain, $19,300$105,700 – $125,00024%$4,632
Long-term gain, $159,000$125,000 – $284,00015%$23,850
NIIT on lesser of $204,000 or MAGI over $200,000 ($100,100)—3.8%$3,804
Total$37,940

The 2026 brackets used here (22% up to $105,700 and the 15% capital gains band from $49,451 to $545,500 for single filers) come from Rev. Proc. 2025-32. The tool page walks through the same sale input by input.

Suspended losses and sale-year losses

If passive loss limits kept you from deducting rental losses in earlier years, those suspended losses are generally released in full when you sell the property in a fully taxable sale to an unrelated buyer, offsetting the gain. If the property sells for less than its adjusted basis, the loss is a section 1231 loss, which Publication 544 treats as ordinary when your section 1231 transactions net to a loss — a better result than a capital loss limited to $3,000 a year.

Properties that were both a home and a rental

Home first, then rented out

You lived in the home for three years, moved out, and rented it for two years before selling. You still owned and used it as your main home for 24 of the last 60 months, so the exclusion is available. Rental use after you moved out is not "nonqualified use." But the depreciation you took (or could have taken) during the rental years cannot be excluded; Publication 523 says depreciation after May 6, 1997 is taxed as unrecaptured §1250 gain. Sell within three years of moving out, or you lose the 24-of-60 window.

Rental first, then your home

Gain allocated to periods after 2008 when the property was not your main home — before you moved in — is nonqualified use and generally cannot be excluded.

Example. A married couple bought a house for $300,000 ($240,000 building) in January 2017 and rented it for five years, taking $43,636 of depreciation. They moved in January 2022, lived there four years, and sold in January 2026 for an amount realized of $530,000.

StepAmount
Adjusted basis: $300,000 − $43,636$256,364
Total gain: $530,000 − $256,364$273,636
Depreciation portion (never excludable)$43,636
Remaining gain$230,000
Nonqualified share: 5 of 9 years owned$127,778 taxable
Qualified share: 4 of 9 years$102,222 excluded

With $140,000 of other taxable income, the $43,636 of §1250 gain falls in the 22% bracket ($9,600), the $127,778 of long-term gain is taxed at 15% ($19,167), and NIIT on the lesser of $171,414 or $93,614 adds about $3,557. Total: about $32,324, versus roughly zero if they had lived there the whole time.

Free · 1-page PDF-ready sheet

Every 2026 tax number on one page

Brackets, standard deduction, capital-gains thresholds, credits, and the new OBBBA deductions — one printable page instead of 40 IRS PDFs.

  • All 7 brackets for single, joint, and head of household
  • Tips, overtime, senior, and car-loan deduction caps
  • 0% / 15% / 20% capital-gains breakpoints
  • Credits, estate and gift limits, AMT exemption

It unlocks right here on the page — we don’t send emails. The Money Pocket (IZ Labs Kft.) stores your address and never sells it. Privacy policy.

Deferring the tax instead of paying it

1031 exchange

Rental and investment real estate can be exchanged for other like-kind real property without recognizing gain. Under Publication 544, you must identify replacement property within 45 days of transferring the old one and receive it within 180 days, and a qualified intermediary — not you — must hold the proceeds. The deferred gain, including the depreciation, carries into the new property's basis. If you later move into property acquired in an exchange, the home sale exclusion is unavailable until 5 years after the exchange. Estimate the deferral with the 1031 exchange tax calculator.

Opportunity zones

Investing a capital gain in a qualified opportunity fund can defer it. Deferred gains from investments made before 2027 must be recognized no later than December 31, 2026, and the 2025 tax law made the program permanent with new rules for investments after that date. The structure is complex; treat it as a separate investment decision, not just a tax move.

Reporting the sale

  • Home: report on Form 8949 and Schedule D if any gain is taxable or you received Form 1099-S.
  • Rental: report on Form 4797. Net section 1231 gain flows to Schedule D, and the unrecaptured §1250 gain is computed on the worksheet in the Schedule D instructions.
  • NIIT: Form 8960.

Planning checklist before you sell

  1. Pull every closing statement and improvement receipt to document basis.
  2. For rentals, total the depreciation on every Form 4562 and Schedule E you filed.
  3. Count your months of ownership and use in the last five years before you list a former home.
  4. Check whether you are near a bracket or the NIIT threshold; spreading income or timing the closing into a lower-income year can save thousands.
  5. Decide on a 1031 exchange before closing; the intermediary has to be in place first.

For how long-term and short-term rates compare across all asset types, see short-term vs. long-term capital gains tax rates. If you are still holding the rental, the after-tax rental cash flow guide shows how the depreciation you take today becomes the recapture you pay later.

Frequently asked questions

How much gain can I exclude when I sell my home?
Up to $250,000, or $500,000 if married filing jointly, if you owned and used the home as your main home for at least 24 months of the 5 years before the sale and did not exclude gain on another home in the prior 2 years.
What is depreciation recapture on a rental property?
When you sell, the part of your gain created by depreciation (unrecaptured section 1250 gain) is taxed at your ordinary rates up to a 25% maximum, instead of the 0%, 15%, or 20% long-term rates.
If I move into my rental, can I exclude all the gain later?
Not all of it. Depreciation you took is always taxable, and gain allocated to rental periods after 2008 that came before you moved in is generally not excludable.
Can I deduct a loss on the sale of my home?
No. Publication 523 says a loss on the sale of your main home is not deductible. A loss on a rental is generally a section 1231 loss, which can be ordinary.
  • capital-gains-tax
  • real-estate
  • primary-residence
  • rental-property
  • 1031-exchange
  • section-121

Informational only

This guide explains general rules as published by the IRS and other official sources. It is not tax, legal, or investment advice, and it can’t account for your full situation. How we research and update guides.

Run your own numbers