You cannot avoid capital gains tax on rental property entirely, but you can reduce it, defer it, or eliminate it in specific situations
When you sell rental property for more than you paid for it, the profit is a capital gain and is taxable. The tax rate depends on how long you owned it and your income level — long-term gains (held over one year) are taxed at 0%, 15%, or 20% depending on your tax bracket, while short-term gains are taxed as ordinary income, which can be much higher.
You cannot skip this tax entirely, but you can shrink the gain itself by deducting depreciation recapture, selling at a loss to offset other gains, timing the sale to land in a lower tax bracket, or using a 1031 exchange to roll the proceeds into another investment property and defer tax indefinitely. Some situations — including death and certain primary residence sales — do allow you to avoid the tax altogether, though rental property does not may have access to for those breaks.
The strategy that works depends on your timeline, your other income, and whether you want to keep investing in real estate.
Key Takeaways
- A 1031 exchange lets you reinvest the sale proceeds into another rental property and defer all capital gains tax, but you must identify a replacement property within 45 days and close within 180 days.
- Depreciation recapture tax (25% federal) applies to the depreciation deductions you claimed while you owned the property, separate from the capital gains tax on appreciation.
- Selling in a year when your other income is lower can move your gain into a lower tax bracket, saving 5% to 10% in federal tax depending on your situation.
- Harvesting losses from other investments or real estate sales can offset the gain dollar-for-dollar, though losses from rental property cannot be used against other income unless you meet strict passive activity rules.
- If you hold the property until death, your heirs receive a "stepped-up basis" and owe no capital gains tax on the appreciation that occurred during your lifetime.
How a 1031 exchange defers tax indefinitely
A 1031 exchange (named after Section 1031 of the Internal Revenue Code) lets you sell one investment property and buy another without paying capital gains tax on the sale. The tax is deferred, not erased — you will owe it when you eventually sell the replacement property for cash — but you can repeat the exchange indefinitely and never pay tax as long as you keep reinvesting.
The rules are strict. You must use a may have access to intermediary (a third party who holds the sale proceeds and cannot be your accountant, attorney, or real estate agent) to handle the transaction. You have 45 calendar days from the sale closing to identify a replacement property in writing, and 180 calendar days from the sale closing to close on it. If you miss either important date, the entire gain becomes taxable when ready.
The replacement property must be of equal or greater value and must be held for investment or business use — you cannot exchange a rental house for a primary residence or a vacation home. You can exchange into a different type of property (apartment building for commercial office space, for example) as long as both are investment-grade.
One common mistake: using the sale proceeds yourself before the 180-day window closes. The intermediary must hold the money the entire time. If you need cash for closing costs on the replacement property, the intermediary can pay those directly to the seller or title company, but you cannot touch the funds.
Depreciation recapture: the tax you cannot avoid
Even if you use a 1031 exchange and defer capital gains tax, you will still owe depreciation recapture tax when you sell. This is a separate tax on the depreciation deductions you claimed while you owned the property.
Here is how it works: suppose you bought a rental house for $300,000 and claimed $50,000 in depreciation deductions over ten years. Your adjusted basis is now $250,000. When you sell for $400,000, your total gain is $150,000 ($400,000 sale price minus $250,000 adjusted basis). Of that $150,000, the $50,000 in depreciation is taxed at 25% (federal) as recapture, and the remaining $100,000 of appreciation is taxed as a capital gain at your long-term rate (0%, 15%, or 20%).
A 1031 exchange defers the capital gains portion but not the recapture. You will owe the 25% recapture tax when you sell, even if you reinvest when ready. Some states add their own recapture tax on top of the federal 25%, ranging from 1% to 13% depending on where the property is located.
This is why it matters whether you claimed depreciation in the first place. If you did not claim depreciation deductions while you owned the property, you have no recapture tax to pay — but the IRS can still require you to pay it retroactively if you did not claim it and then claim it later, so do not skip depreciation deductions hoping to avoid recapture.
Timing the sale to land in a lower tax bracket
Long-term capital gains are taxed at 0%, 15%, or 20% depending on your taxable income for the year, not your total income. If you can keep your taxable income below the threshold for the next bracket, you can save 5% or 10% in federal tax on the gain.
For 2024, the 15% rate applies to single filers with taxable income between roughly $47,000 and $518,000, and the 0% rate applies to those below $47,000. If you are near the edge, selling in a year when you have lower income (a year you took unpaid leave, retired, or had business losses) can keep you in the 0% or 15% bracket instead of pushing you into 20%.
This works best if you can control the timing of the sale. If you are selling in January or February, you know roughly what your income will be for the full year. If you are selling in November, you can estimate your income and decide whether to close before year-end or wait until January.
State income tax also matters. Some states tax capital gains at ordinary income rates (up to 13% in California, for example), while others do not tax capital gains at all. If you live in a high-tax state and are moving to a low-tax or no-tax state, timing the sale to close after you move can save you state tax — though you must actually move and establish residency before the sale closes.
Using losses to offset the gain
If you have losses from selling other investments or other rental properties, you can use those losses to offset the gain dollar-for-dollar. If you sold stocks at a $30,000 loss and rental property at a $50,000 gain, you owe tax only on the $20,000 net gain.
Tax-loss harvesting — selling losing investments specifically to create a loss you can use against gains — is a common strategy in the year you plan to sell rental property. You can sell mutual funds, individual stocks, or even other real estate at a loss, and use that loss to reduce your taxable gain.
One restriction: if you sell an investment at a loss and then buy the same or substantially identical investment back within 30 days before or after the sale, the wash-sale rule disallows the loss. This applies to stocks and mutual funds but not to real estate, so you can sell a rental property at a loss and buy another one when ready without triggering the wash-sale rule.
Losses from rental property cannot offset ordinary income (like wages or business income) unless you meet the passive activity loss rules — generally, you must be a real estate professional or have modified adjusted gross income below $150,000 to deduct more than $25,000 in rental losses per year. But losses can always offset gains from other rental properties or investments, with no income limit.
Holding the property until death
If you hold rental property until you die, your heirs inherit it with a stepped-up basis. This means the property's basis is reset to its fair market value on the date of your death, and your heirs owe no capital gains tax on the appreciation that happened during your lifetime.
If you bought a rental house for $200,000 and it is worth $500,000 when you die, your heirs inherit it at a $500,000 basis. If they sell it when ready for $500,000, they owe zero capital gains tax. They would only owe tax on appreciation that happens after your death.
This is a powerful tax break, but it only works if you do not need the cash during your lifetime. It also depends on your estate being large enough to trigger estate tax (the federal exemption is $13.61 million for 2024, so most estates do not owe it), and some states have their own estate taxes at much lower thresholds. Consult a tax professional or estate attorney before relying on this strategy if your estate is large or if you live in a state with an estate tax.
Primary residence exclusion does not explore to rental property
If you sell a primary residence you lived in for at least two of the last five years, you can exclude up to $250,000 of gain from tax (or $500,000 if you are married filing jointly). This is one of the largest tax breaks available, but it does not explore to rental property.
If you convert a rental property to your primary residence, you cannot use the exclusion on the appreciation that happened while it was a rental. You can only exclude gain that accrued after you moved in and claimed it as your primary residence. The depreciation you claimed while it was a rental is still subject to recapture tax.
Some people try to game this by renting out a property, then moving in and claiming it as a primary residence before selling. The IRS watches for this pattern, and the exclusion is limited to the portion of the gain that accrued after you moved in. It is not a useful strategy for avoiding tax on rental property gains.
When to use each strategy
| Strategy | Best For | Main Trade-off |
|---|---|---|
| 1031 exchange | Investors who want to keep buying rental property and defer tax indefinitely | Must reinvest within strict timelines; still owe depreciation recapture tax |
| Timing the sale to a lower-income year | Sellers with control over when to close and lower income in a specific year | Requires planning; only saves 5–10% federal tax in most cases |
| Tax-loss harvesting | Investors with other investments or properties that have losses | Losses must exist; wash-sale rule applies to stocks and funds |
| Holding until death | Owners who do not need the cash and have heirs | Requires waiting; only works if you do not sell during your lifetime |
Frequently Asked Questions
Can I do a 1031 exchange if I already have a buyer lined up?
Yes. You can close the sale to your buyer, then use a may have access to intermediary to hold the proceeds while you find a replacement property within 45 days. The intermediary handles the mechanics; your buyer does not need to know about the exchange.
What happens if I miss the 45-day identification important date?
The entire gain becomes taxable in that year. You cannot extend the important date. If you are close to the important date and have not identified a property, close the sale and pay the tax rather than rush into a bad investment.
Does depreciation recapture explore if I use a 1031 exchange?
Yes. The 1031 exchange defers capital gains tax but not the 25% federal depreciation recapture tax. You owe recapture when you sell, even if you reinvest the proceeds when ready.
Can I use a loss from one rental property to offset a gain from another?
Yes, with no income limit. Losses from rental property can offset gains from other rental properties or investments. Losses cannot offset ordinary income unless you meet passive activity loss rules (generally, real estate professional status or income below $150,000).
If I convert a rental to my primary residence, can I use the primary residence exclusion?
Only on the gain that accrued after you moved in and claimed it as primary residence. Appreciation while it was a rental is still taxable, and depreciation deductions are still subject to recapture tax.