Read summarized version with:
ChatGPT
Gemini
Claude
Grok
Add as preferred on Google
If you sell a rental property for more than it cost you, the profit is taxed. The tax rules don't just use the price you paid. They use your adjusted basis, which is what the IRS counts as your cost in the property. In short, it's what you paid, plus eligible closing costs and major improvements, minus the depreciation you deducted while renting it out. Your profit is the sale price, after selling costs, minus that number.
That profit can be taxed in up to three ways:
Long-term capital gains tax, which has lower rates for property you held more than a year.
Depreciation recapture, a tax on the depreciation deductions you took while renting, generally taxed at up to 25%.
Net investment income tax, an extra 3.8% tax on investment income for higher earners.
Your state may tax the profit too.
This guide shows how to calculate your profit, with a worked example using 2026 rates. It then covers the main ways to defer (delay) or reduce the tax. They include a 1031 exchange, moving into the property and offsetting the gain with investment losses. They also include holding for more than a year, counting all your eligible improvements and spreading the sale over several years.
This article is general information, not tax advice. The rules depend on your situation, so talk to a licensed CPA before you sell.
Key takeaways
- Short-term vs long-term: If you owned the property one year or less, the profit is taxed like regular income. If you owned it longer, it's generally taxed at 0%, 15% or 20%.
- Depreciation recapture: While you rent a property, you deduct depreciation each year. When you sell, the IRS taxes the part of your profit that came from those deductions, generally at up to 25%. This applies even if you never claimed the depreciation.
- 1031 exchange: A common way to delay the tax by buying another investment property with the sale money. You have 45 days to identify a replacement and 180 days to close, or until your tax return due date (including extensions) if that is earlier.
- Moving in: If you make the property your main home, you may be able to exclude up to $250,000 of profit ($500,000 married filing jointly). Depreciation isn't excludable, and time spent renting it out can reduce the exclusion.
- Basis: Major improvements, with receipts, raise your basis and shrink your profit. Keep the records.
How capital gains tax works on a rental property
A capital gain is the profit when you sell something you own, such as a rental property, for more than your adjusted basis. How it's taxed depends on how long you owned it.
- Short-term capital gains: You owned the property for one year or less. The profit is taxed at your ordinary income rate, which is the regular rate that applies to your salary or rental income. It runs from 10% to 37%.
- Long-term capital gains: You owned the property for more than one year. The profit is generally taxed at 0%, 15% or 20%, depending on your taxable income (your income after deductions).
If you buy properties mainly to resell them, the IRS can treat the profit as ordinary business income instead. Holding longer than a year doesn't change that.
2026 long-term capital gains tax rates (sales in tax year 2026)
The rate you pay depends on your filing status and your taxable income.
| Filing status | 0% rate | 15% rate | 20% rate |
|---|---|---|---|
| Single | Up to $49,450 | $49,451 to $545,500 | Over $545,500 |
| Married filing jointly | Up to $98,900 | $98,901 to $613,700 | Over $613,700 |
| Married filing separately | Up to $49,450 | $49,451 to $306,850 | Over $306,850 |
| Head of household | Up to $66,200 | $66,201 to $579,600 | Over $579,600 |
Your profit from the sale counts as income on top of your other income. A large profit can push you into a higher bracket than your usual income suggests.
Source: IRS Rev. Proc. 2025-32, thresholds for taxable years beginning in 2026.
Other taxes and rules can apply:
- Depreciation recapture: Depreciation is a yearly deduction that spreads the cost of the building over 27.5 years. When you sell, the part of your profit that came from those deductions is taxed at your ordinary rate, capped at 25% for the building itself. See the section below.
- Net investment income tax (NIIT): An extra 3.8% tax on investment income for higher earners. It applies to the smaller of two amounts. One is your net investment income (investment income minus related expenses). The other is the amount your modified adjusted gross income is above a threshold. Modified adjusted gross income is roughly the total income on your tax return. The thresholds are $200,000 (single or head of household), $250,000 (married filing jointly) and $125,000 (married filing separately). They aren't adjusted for inflation. See IRS Topic 559.
- Section 1231: Rental property used in a business falls under a tax rule called Section 1231. A net gain usually gets the lower long-term rates. But if you had net losses under this rule in the previous five years, part of the gain can be taxed at ordinary rates instead. Ask your tax preparer if this applies to you. See IRS Publication 544.
- State tax: Many states tax capital gains. Check your state's rules.
Rental property vs primary residence
If you sell the home you live in, you can exclude up to $250,000 of profit from tax ($500,000 if you're married filing jointly). To qualify, you must have owned the home and lived in it as your main home for at least 2 of the last 5 years. See IRS Topic 701.
A rental doesn't qualify for that exclusion unless it also meets those rules. Otherwise your profit is taxed at the rates above, though some long-term gain can fall in the 0% bracket.
How to calculate capital gains on a rental property
Three steps:
- Amount realized. This is what you actually receive from the sale: the sale price minus selling costs such as agent commissions, legal fees and transfer costs.
- Adjusted basis. This is your cost in the property for tax purposes: the purchase price, plus eligible purchase closing costs, plus capital improvements, minus depreciation. Capital improvements are major upgrades that add value or extend the property's life, like a new roof or an addition. Repairs, like fixing a leak, aren't added to basis. Eligible closing costs include items such as title, legal, recording and transfer fees, but not loan-related charges (see IRS Publication 551). Depreciation lowers your basis whether or not you claimed it. See cost basis in real estate and capital improvements vs repairs.
- Gain. Your profit is the amount realized minus your adjusted basis.
Worked example
You buy a rental for $340,000. The land is worth $65,000 and the building $275,000. The IRS lets you depreciate a residential rental building over 27.5 years, but not the land. You make no major improvements. After 10 years you sell for $500,000 and pay $30,000 in selling costs.
| Step | Calculation | Result |
|---|---|---|
| Annual depreciation | $275,000 / 27.5 years | $10,000 |
| Total depreciation | $10,000 × 10 years | $100,000 |
| Adjusted basis | $340,000 - $100,000 | $240,000 |
| Amount realized | $500,000 - $30,000 | $470,000 |
| Total gain | $470,000 - $240,000 | $230,000 |
| Depreciation recapture portion | Equal to depreciation taken | $100,000 |
| Remaining long-term gain | $230,000 - $100,000 | $130,000 |
The example simplifies depreciation by ignoring partial-year depreciation in the first and last years.
Estimated federal tax, before NIIT and state tax:
- Recapture portion ($100,000): taxed at your ordinary rate, up to 25%. At the cap, that is $25,000.
- Remaining gain ($130,000): at 15%, that is $19,500. At 20%, it is $26,000.
- Total: up to about $44,500 if the remaining gain falls in the 15% bracket, or about $51,000 at 20%.
These totals assume the whole $130,000 falls in the stated bracket, with no other gains or losses and no Section 1231 look-back adjustment. Your actual bill depends on your income, filing status and state.
Depreciation recapture
While you rent out a property, you can deduct depreciation each year. It lowers your tax bill now, and it also lowers your adjusted basis. The IRS lets you depreciate a residential rental building over 27.5 years. Land isn't depreciable.
When you sell, the IRS taxes the part of your profit that came from those deductions. This is called depreciation recapture. For a building held more than one year, that part is taxed at your ordinary rate, capped at 25%. The IRS calls it unrecaptured Section 1250 gain, a name you may see on tax forms. The IRS applies it even if you didn't claim depreciation, so claim it. See IRS Topic 409.
Two limits to know. Appliances and other separately depreciated items can be taxed as ordinary income with no 25% cap. And the depreciation-related portion can't be more than your total profit. For a longer explanation, see depreciation and depreciation recapture.
How to avoid or reduce capital gains tax on a rental property
Most of these strategies delay or reduce the tax. Few eliminate it. Check each one with a tax professional before you act.
1. Defer the tax with a 1031 exchange
A 1031 exchange lets you sell an investment property and buy another with the proceeds, so you don't pay the tax now. It's also called a like-kind exchange, after Section 1031 of the tax code. The tax isn't erased. It carries over to the new property and comes due when you eventually sell without another exchange. It takes advance planning and strict execution. See the IRS like-kind exchange fact sheet.
To qualify:
- Both properties must be held for business or investment use. Property held primarily for personal use doesn't qualify. Some vacation rentals can qualify if they meet the IRS investment-use requirements (see Rev. Proc. 2008-16).
- They must be "like-kind." For real estate, that means investment real estate exchanged for other investment real estate.
- You can't take control of the sale money. A qualified intermediary, a third-party company, holds it until you buy the replacement property.
- You must reinvest all the net proceeds, or you owe tax on any cash you keep.
Deadlines are strict:
- You have 45 days from the sale to identify replacement properties.
- You must close within 180 days, or by your tax return due date including extensions, whichever is earlier.
Watch the debt. If the new property carries less debt than the one you sold, you can owe tax on the difference unless you add cash. You can repeat 1031 exchanges, but the tax comes due when you finally sell without one.
2. Convert the rental to your primary residence
If you move into the property and make it your main home, you may exclude part of the profit under the home sale rules. The limit is $250,000 ($500,000 married filing jointly). Conditions to know:
- You must own it and live in it as your main home for at least 2 of the 5 years before the sale.
- You generally can't have used the exclusion on another home sale in the previous two years.
- For the $500,000 joint exclusion, both spouses generally must have lived in the home as their main home for 2 of the last 5 years. Only one needs to meet the ownership requirement.
- Depreciation you took after May 6, 1997 isn't excludable. It's still taxed at up to 25%.
- Time the property wasn't your main home before you moved in, such as years as a rental, can reduce the amount you can exclude. The IRS calls this nonqualified use, and it counts from 1 January 2009, with exceptions.
- If you acquired the property in a 1031 exchange, you must hold it for at least 5 years before the exclusion applies.
- You can only have one main home at a time.
.jpg)
3. Offset gains with capital losses (tax-loss harvesting)
A capital loss is what you have when you sell an investment, such as stocks, for less than you paid. Capital losses offset capital gains. If you sell other investments at a loss in the same year, that loss reduces your taxable capital gain. This includes the depreciation-related portion taxed at up to 25%. Ordinary-income recapture on items like appliances isn't a capital gain, so losses don't offset it. If your losses are more than your gains, you can use up to $3,000 of the extra against other income each year ($1,500 if married filing separately). The rest carries forward to future years. See IRS Topic 409.
A loss on selling the rental property itself is treated under a different rule, Section 1231, so ask your tax preparer how it applies.
4. Hold the property for more than one year
Short-term gains are taxed at ordinary rates up to 37%. Long-term gains top out at 20%. If you are close to the one-year mark, waiting can lower the rate.
5. Include eligible improvements in your basis
Documented capital improvements, such as additions or major upgrades, raise your basis and reduce your profit. Repairs don't.
Example, before depreciation: you buy for $250,000 and sell for $350,000, a $100,000 profit. With $40,000 of documented improvements, your basis is $290,000 and the profit falls to $60,000.
Do the work because the property needs it, and keep every receipt. A dollar of basis saves you at most your tax rate on that dollar, so spending on improvements only to cut the tax rarely pays.
6. Spread the gain with an installment sale
An installment sale is a sale where you're paid over time, such as when you finance the buyer. If you receive at least one payment after the year of the sale, you may be able to report eligible profit under the installment method on Form 6252. That can spread the tax across the years you receive payments, instead of taxing it all in the year you sell. It defers tax. It doesn't eliminate it.
Limits to know:
- Depreciation recapture taxed as ordinary income is generally taxed in the year of the sale, even if no payment arrives that year.
- You take on the buyer's credit risk, and interest you receive is taxable income.
- Dealer sales, where you regularly sell property to customers, don't qualify.
See IRS Publication 537.
Buying through a retirement account (future purchases)
A self-directed IRA or 401(k) is a retirement account that lets you choose investments such as real estate. It can buy investment property, which can defer tax on later gains inside the account. The account owns the property, not you. This does not shelter the sale of a rental you already own personally, because an IRA generally can't buy property from you. That's a prohibited transaction. The rules are complex and mistakes can trigger taxes and penalties, so get advice before you start. See the IRS page on prohibited transactions.
Reporting the sale
You report the sale on your tax return. Forms commonly involved:
- Form 4797: for sales of business property, which usually includes rental real estate.
- Form 8949 and Schedule D: for capital gains and losses.
- Form 8824: for a like-kind exchange, filed for the year of the exchange. It covers a description of both properties, the dates each was identified and transferred, whether the parties are related, and the values and gains involved. See IRS Form 8824.
- Form 6252: for an installment sale.
- Form 8960: for the net investment income tax, if it applies.
Your tax preparer will confirm which apply.
Keep records before you sell
Good records support your basis, your depreciation and any loss you claim. Keep purchase documents, improvement receipts and depreciation schedules for every property you own, not only the one you are selling.
In Landlord Studio you can:
- Track property value: the property valuation feature compares your purchase price with the current value. The net worth report shows the result per property. Treat it as a quick view, not your tax calculation, because your adjusted basis also reflects improvements and depreciation.
- Archive the property after you sell: open the property, select Edit Property, set Archive Property to Yes and save. On mobile, switch the Archive toggle on. You keep the full history and no rent shows as due. See the archive guide.
- Keep income, expenses and receipts in one place: see rental accounting.
FAQs
How do I pay zero capital gains tax on a rental property?
You can pay 0% federal tax if your total taxable income, including the profit from the sale, falls within the 0% bracket. For 2026 that is up to $49,450 single or $98,900 married filing jointly. You can also exclude profit under the home sale rules, but not the depreciation portion. A large rental profit usually pushes you above the 0% bracket.
How is capital gains calculated on a rental property?
Subtract your adjusted basis from the amount you realized on the sale. The amount realized is the sale price minus selling costs. Your adjusted basis is the purchase price plus eligible closing costs and capital improvements, minus depreciation. See the worked example above.
How do I offset capital gains on the sale of a property?
Capital losses from other investments offset the part of your profit treated as capital gain. If your losses are more than your gains, you can use up to $3,000 of the extra against other income each year ($1,500 if married filing separately). The rest carries forward. A higher basis from documented improvements also reduces your profit.
What happens to depreciation when I sell a rental property?
It's recaptured, meaning the IRS taxes the part of your profit that came from your depreciation deductions. For the building, that part is taxed at your ordinary rate, up to 25%. This applies even if you never claimed the depreciation. Depreciation on appliances and other separate items can be taxed as ordinary income without the cap.
Do you pay capital gains tax on inherited property?
Inherited property generally gets a new starting cost: its fair market value on the date the owner died, or on an alternate valuation date. That means profit that built up before then generally isn't taxed when you sell. Your taxable gain depends on the sale price and any later basis adjustments, including depreciation you take while you rent it out. Rental depreciation can create taxable gain even when the price hasn't risen. See IRS Publication 551.
Is there a one-time capital gains exemption on a home sale?
The home sale exclusion ($250,000 single, $500,000 married filing jointly) isn't once in a lifetime. You generally can't use it if you used it for another sale in the previous two years, and it applies only to your main home. There is no age-based exemption.


.jpg)