How to Avoid Capital Gains Tax on Rental Property
Avoiding usually means deferring or reducing the tax
You cannot make the capital gains tax on a rental property disappear, but the law gives you several ways to defer or reduce it. You can keep the property, offset the gain with losses, spread it out with an installment sale, move in and use the home sale exclusion within its limits, exchange into other investment real estate under Section 1031, or hold until death, when heirs generally receive a stepped-up basis.
The pre-sale options checklist: 14 items. The first is free on this page.
Updated November 17, 2026 by Private Exchange Group. 2 minute read. Not tax or legal advice.
The short version
- When people search for ways to avoid this tax, the lawful answers either defer the gain or reduce it, and none erases it for the seller.
- Capital losses and suspended passive losses can offset a gain, and an installment sale spreads most of it over the years you are paid.
- Moving into a former rental rarely shelters the whole gain, because rental years after 2008 and depreciation since May 6, 1997 stay taxable.
- A 1031 exchange defers the gain for owners who are buying other investment real estate, and it must be arranged before the sale closes.
What avoid really means when you sell a rental
Owners type this question when a rental has stopped being worth the work and the sale price looks good until the tax is counted. A gain on rental property is taxable in the year you sell. IRS Topic 409 lists 3 rates for most long-term gains, 0%, 15% or 20%, with taxable income deciding which applies, and a maximum of 25% for gain from depreciation on real property.
So every lawful method does 1 of 2 things. It moves the tax to a later year, which is deferral, or it makes the taxable amount smaller, which is reduction. Anything pitched to you as a way to make the tax vanish deserves a second opinion from your own CPA.
The real options side by side
Each option below is in the tax code today, and each has a price. Some keep you a landlord, some tie up your money, and some depend on facts you cannot change now. Paying the tax is also a choice.
Swipe the table sideways to see every column
General federal rules from the sources listed below. State tax is separate, and your own advisor decides what applies to you.
Before closing or not at all
Three ways a sale stops being an exchange
Touch money. Pay tax.
If the proceeds are paid to you or to someone acting for you, the sale is taxable. The intermediary has to be in place before the closing.
Day 45 passes
You have 45 calendar days from the closing to name, in writing, the property you may buy. Weekends and holidays count.
You come out with cash
Cash you keep, or a loan you pay off and do not replace, is taxed up to the amount of your gain.
General rules, not tax or legal advice.
Why moving into the rental helps less than owners hope
The home sale exclusion is the option owners ask about most. Under Section 121 a seller can leave out of income as much as $250,000 of gain, doubled to $500,000 on a joint return, if the property was owned and used as a main home for 2 years or more out of the 5 that end on the sale date. A former rental can pass that test.
The exclusion then meets 3 limits. The years the property spent as a rental after 2008, before you moved in, are periods of nonqualified use, and the share of gain assigned to them stays taxable. So does an amount of gain equal to the depreciation for periods after May 6, 1997. And a property you received in a 1031 exchange is barred from the exclusion on any sale within 5 years of the day you acquired it. Primary residence and 1031 covers how the 2 rules meet.
The exchange most rental owners are never told about
Many owners want out of this property, not out of real estate: the tenants, the repairs, the distance, or a return that no longer matches what the building is worth. For that owner the code has a direct answer. Section 1031 allows an owner to trade investment or business real estate for other real estate that will be held for the same purposes, and no gain is recognized when the trade happens.
Like-kind is broad. A rental house can become an apartment building, a warehouse, land or a leased store anywhere in the United States. Your basis carries into the new property and the gain waits there, deferred, not forgiven, until a later taxable sale. The capital gains estimator shows roughly what a straight sale would cost.
An exchange is the wrong tool if you want the cash, are finished with real estate, or have only a small gain. It also has a clock. A qualified intermediary has to be under agreement before the sale closes, since a sale that has already paid you is past the point where an exchange can be added. The checklist at the end of this page lists what to settle first. To talk through whether it fits, request a consultation.
Questions people ask
Do I pay capital gains on a rental if I reinvest the money in another property?
Yes, unless the sale was structured under Section 1031 before closing. Reinvesting on your own after you receive the proceeds does not defer anything. In what people call a like kind swap, the money goes to an exchange account set up through a qualified intermediary and then straight into the replacement purchase within the deadlines.
How long do I have to live in a rental to avoid capital gains tax?
You need 2 years of ownership and use as your main home within the 5-year period that ends when you sell, and even then the exclusion may cover only part of the gain. Gain assigned to rental periods after 2008 and gain equal to depreciation since May 6, 1997 stay taxable. Have your CPA estimate that portion first.
Is there an age when you stop paying capital gains on rental property?
No. Federal law has no age at which gain on a rental becomes exempt, and the home sale exclusion has no age test. What can change with age is income: lower taxable income in retirement can mean a lower capital gains rate. Property still owned at death generally reaches heirs with its basis reset to the value on that date.
Can I use losses from stocks to offset the gain on my rental?
Generally yes. Capital losses from other investments offset capital gains, including the long-term gain on a rental held more than 1 year. If losses exceed gains, IRS Topic 409 limits the deduction against other income to $3,000 a year, or $1,500 if married filing separately, and the rest carries forward.


Know where you stand before you close
Tell us when the sale closes and what you own. You will hear where you stand and what has to happen first.
- Whether the property qualifies
- Your 2 deadlines on a calendar
- What your closing agent needs
Asking commits you to nothing. It keeps the option open.
Keep reading
Sources
- IRS: Topic no. 409, Capital gains and losses
- 26 U.S.C. 121, Exclusion of gain from sale of principal residence
- 26 U.S.C. 1014, Basis of property acquired from a decedent
- IRS: Topic no. 705, Installment sales
- IRS: Publication 925, Passive Activity and At-Risk Rules
- 26 U.S.C. 1031, Exchange of real property held for productive use or investment
