The key word is "now." There is a legal way to sell an investment property and put off the tax: a Section 1031 exchange. It postpones the tax. It does not erase it. This page explains what that means, the role depreciation plays, and when paying the tax today may be the smarter move.
Deferral Versus Paying
When you sell a rental in a regular sale, you report the gain and pay tax on it for that year.
In a 1031 exchange, you sell investment real estate and buy other investment real estate of like kind, and gain is not recognized at that time if you meet the rules. The gain carries forward into the new property. If you later sell the replacement property in a taxable sale, the deferred gain is recognized then.
What deferral does for you
- More of your money stays invested and working.
- You choose when the tax event happens, within your plans.
- You can change property type, location, or size along the way.
What deferral does not do
- It does not reduce the gain. It moves it forward.
- It does not apply to cash you pull out. Cash or other non-like-kind property you receive is generally taxable, often called "boot".
- It does not apply to your home. A personal residence does not qualify for a 1031 exchange.
Depreciation Recapture, in Plain English
Every year you own a rental, depreciation lowers your taxable rental income. Residential rental buildings are generally depreciated over 27.5 years.
The catch shows up when you sell. Your basis (roughly, what you paid plus improvements) goes down by the depreciation you deducted, or could have deducted, even if you never claimed it. A lower basis means a bigger gain.
At the federal level, the part of your gain tied to that depreciation on real property, called "unrecaptured section 1250 gain," is taxed at a maximum rate of 25%. That is often higher than the long-term capital gains rate on the rest of the gain.
A 1031 exchange defers this piece too, as part of the overall deferred gain. If you sell outright, it is part of your bill.
When Paying the Tax Can Be the Better Call
Deferral is a tool. Sometimes it is the wrong one. Paying the tax now may make more sense when:
- You want out of real estate. An exchange keeps you in property. If you are done, a sale gives you a clean exit.
- You need the cash. Taking cash out of an exchange creates taxable boot anyway.
- Your gain is modest. The cost and stress of an exchange may outweigh the tax saved.
- You cannot find good replacement property. Buying a weak property just to beat a deadline can cost more than the tax.
- The timeline is unrealistic. You get 45 days to identify and 180 days (or your return due date, if earlier) to close. If the market cannot support that, a planned sale may be safer.
- Your CPA sees a reason. Losses, income timing, or estate planning can change the math.
Section 121: The Home Sale Exclusion
You may have heard you can sell a home and keep up to $250,000 of gain tax-free, or $500,000 for a married couple filing jointly. That is Section 121.
Who it applies to
Section 121 covers your principal residence. Generally you must have owned and lived in the home as your main home for at least 2 years out of the 5 years before the sale. A property that has only ever been a rental does not qualify.
Converted properties, at a general level
Some owners lived in a home, then rented it out, or the reverse. The rules for these cases are narrow:
- Depreciation is not excluded. Gain tied to depreciation taken after May 6, 1997 is still taxable, even if the rest qualifies.
- Rental time can reduce the exclusion. Periods after 2008 when the property was not your main home can cut back how much gain you exclude.
- One helpful exception. Time after you move out, within the 5-year window, is generally not counted against you.
- Exchange property has a waiting period. If you got the property through a 1031 exchange, you cannot use Section 121 on it if you sell within 5 years of acquiring it.
These rules interact in ways that need a CPA's pencil. Do not assume a former home qualifies.
Putting It Together
- Investment property you want to stay invested in: a 1031 exchange may defer the tax.
- Investment property you want out of: a sale, and plan for the tax.
- Your home: Section 121 may apply.
- A home that became a rental, or the reverse: get advice before you list.
Common questions
Can I legally avoid capital gains tax when I sell a rental?
You can defer it with a Section 1031 exchange if you buy like-kind investment real estate and follow the rules. The gain is postponed and can be taxed later when you sell the replacement property in a taxable sale.
What is depreciation recapture on a rental?
Depreciation lowers your basis, which raises your gain when you sell, even for depreciation you could have taken but did not. Federally, the depreciation-related part of the gain on real property is taxed at a maximum 25% rate.
Does a 1031 exchange also defer depreciation recapture?
Yes. When an exchange fully qualifies, gain is not recognized at the time of the exchange, and that includes the depreciation-related portion. It carries into the new property.
Can I use the $250,000 or $500,000 home exclusion on a rental?
Not on property that has only been a rental. Section 121 applies to a principal residence you owned and lived in for at least 2 of the 5 years before the sale.
When should I just pay the tax?
When you want out of real estate, need the cash, have a small gain, cannot find solid replacement property, or your CPA sees a planning reason. Deferral is optional.
Sources
- 26 U.S. Code § 1031, Exchange of real property held for productive use or investment.
- IRS Topic No. 409, Capital gains and losses.
- IRS Topic No. 701, Sale of your home.
- 26 U.S. Code § 121, Exclusion of gain from sale of principal residence.
- IRS Publication 544, Sales and Other Dispositions of Assets (Like-Kind Exchanges).
- IRS Publication 527, Residential Rental Property.
- California Franchise Tax Board, 2025 Form FTB 3840 Instructions, California Like-Kind Exchanges.
Last reviewed October 2026.