How to Avoid Capital Gains Tax on a Rental Property
Most of what is sold as avoiding the tax on a rental is really deferring it, and the difference matters for how you plan. Here is every route that holds up, what each one costs you, and the ones that do not work.
Only two rules make a rental's gain go away for good: the step-up in basis when you die still owning it, and the home-sale exclusion in section 121, which reaches a rental only if you lived in it for two of the last five years and never shelters depreciation. Every other route defers or spreads the tax. A 1031 exchange postpones all of it if you reinvest in real property, an installment sale spreads it over the years you are paid, an opportunity zone fund defers the capital gain you reinvest, a charitable remainder trust spreads it while giving the remainder away, and losses can offset part of it. Choose by whether you need the cash, how long you will hold, and who inherits.
Price the tax first, because every option is measured against the check you would write
A rental's gain is taxed in layers. The depreciation you claimed comes back first as unrecaptured section 1250 gain, taxed at your ordinary rate but at no more than 25% (IRS Topic 409). The appreciation is taxed at 0%, 15% or 20%; for 2026 the 15% band runs to $613,700 of taxable income on a joint return and $545,500 for a single filer under Rev. Proc. 2025-32. The 3.8% tax in section 1411 applies to the lesser of your net investment income and the amount by which modified adjusted gross income passes $250,000 joint or $200,000 single. Your state comes on top.
A hypothetical, in round numbers. A married couple with $120,000 of other taxable income sells a rental house for $590,000, pays $40,000 of selling costs, and has a $250,000 adjusted basis after claiming $100,000 of depreciation. The $300,000 gain splits into a $100,000 depreciation layer and $200,000 of appreciation. The depreciation layer lands in the 22% and 24% brackets, about $22,172. The appreciation sits inside the 15% band, $30,000. With modified adjusted gross income near $420,000, the surtax reaches only the $170,000 above the threshold, $6,460. Federal total: about $58,632, or 19.5% of the gain, before state tax. Our rental sale tax calculator by state runs your own figures, and depreciation recapture on a rental property sale explains the first layer in full.
A 1031 exchange defers every layer, as long as you keep reinvesting in real property
Section 1031(a)(1) recognizes no gain when real property held for business or investment is exchanged for like-kind real property, which a rental is. Done fully, it postpones the capital gain, the depreciation layer and the surtax together.
The real cost. You must replace the full value, equity and debt, or pay tax on the shortfall. A qualified intermediary has to hold the proceeds from the closing, and section 1031(a)(3) gives you 45 days to identify replacement property and 180 days to close on it. Your low basis carries into the replacement, so you depreciate less afterward, and the gain is postponed, not forgiven. The catch for a landlord who is tired of tenants is that the replacement has to be real property. A traditional DST is one answer: an interest in a trust that already holds stabilized property, open to accredited investors, illiquid, with distributions that can be reduced or stopped and principal that can be lost. A cash out DST covers a large loan figure, and a direct title security gives you one property and the choice of when to sell. Our 1031 exchange services page sets out who does what in an exchange.
The step-up at death is the one route that erases the gain and the depreciation together
Under section 1014, property your heirs receive at your death takes a basis equal to its fair market value on that date. The appreciation, the depreciation you claimed and any gain you deferred through earlier exchanges are never taxed. Paired with lifetime exchanges, this is the swap till you drop plan.
The cost is that you have to keep owning real property, or the replacement it became, until you die. The catch is gifting: property given during life keeps your basis under section 1015, so a gift to your children hands them the gain rather than removing it. Step-up in basis on real estate covers how ownership form and trusts change the result.
Section 121 excludes gain only on a rental that was your home for two of the last five years
Section 121 excludes up to $250,000 of gain, or $500,000 on a joint return, when you owned and used the property as your principal residence for periods adding up to two years within the five years before the sale. For a former home that you rented out after moving, the rental years after you last lived there, inside that five-year window, do not count against you, so a sale within about three years of moving out can still qualify.
The catches run the other way. Section 121(b)(5) allocates gain to periods of nonqualified use after 2008, so moving into a long-held rental excludes only a fraction of the gain; our answer on how nonqualified use reduces the exclusion shows the arithmetic. Section 121(d)(6) never excludes the depreciation you claimed after May 6, 1997. And section 121(d)(10) denies the exclusion for five years from the date you acquired the house if you got it in a 1031 exchange.
An installment sale spreads the gain over the years you are paid, with you acting as the lender
Under section 453 you report gain as principal payments arrive, which can keep each year's gain in a lower band and spread the surtax. The catches. Section 453(i) taxes any ordinary recapture income in the year of sale, whatever you collect, and Reg. section 1.453-12 places the unrecaptured section 1250 gain in the earliest payments, ahead of the rest. You carry the buyer's credit risk. Where the sale price is over $150,000 and the notes from the year's sales still outstanding at year end exceed $5,000,000 in total, section 453A charges interest on the deferred tax. A sale to a relative who resells within two years can accelerate your gain under section 453(e).
An opportunity zone fund defers the capital gain you reinvest, and timing in 2026 matters
Section 1400Z-2 lets you elect to defer gain you invest in a qualified opportunity fund within 180 days of the sale. You invest only the gain, not the whole price. For amounts invested after December 31, 2026, the deferred gain comes back at the earlier of a sale of the investment or five years, the basis rises by 10% of the deferred gain after five years (30% for a qualified rural fund), and after ten years you can elect a basis equal to fair market value, which removes tax on the fund's own growth. Under the older rule still governing investments made before 2027, the deferred gain is included on December 31, 2026, so a 2026 sale invested in 2026 gets almost no deferral. A sale after early July 2026 has a 180-day window that reaches into January 2027.
The catches. Only gain treated as capital gain qualifies under Reg. section 1.1400Z2(a)-1, and section 1231 gain qualifies only above any amount recaptured as ordinary income. The tax on the deferred gain falls due in year five whether or not the fund has paid you anything, and the fund is an illiquid investment that can lose value. Our opportunity zone page explains the funds we work with, and 1031 vs opportunity zone vs paying the tax runs the three side by side.
A charitable remainder trust spreads the tax and gives the remainder to charity
You give the rental to the trust, the trust sells it, and because the trust is exempt from income tax under section 664(c)(1) the full proceeds are reinvested. The trust then pays you a fixed amount or a fixed percentage, between 5% and 50% a year, for life or for up to 20 years, and the remainder, which must be worth at least 10% of the initial value, goes to charity. You get a partial charitable deduction for the present value of that remainder (IRS, charitable remainder trusts).
The catches. The gift is irrevocable. Section 664(b) taxes each payment you receive in tiers, ordinary income first and then capital gain, so the sale's gain reaches you over the years rather than disappearing. Your heirs receive neither the property nor the remainder. Drafting and administration cost money, and a mortgage on the property or a sale contract already signed are both points to settle with counsel before the deed is signed over.
Losses offset part of the gain, and a taxable sale frees the rental's own suspended losses
Capital losses from other investments offset capital gains in the same year, and unused losses carry forward; only $3,000 of any excess can be set against ordinary income each year (IRS Topic 409). Rental losses the passive activity rules held back are released in full when you dispose of your entire interest in a fully taxable sale to an unrelated buyer under section 469(g)(1). An exchange keeps them suspended, so a large suspended balance is a real argument for selling; our answer on suspended passive losses in a 1031 exchange explains the trade.
A passive loss can also come from a new investment. Our accelerated depreciation funds use cost segregation to produce first-year deductions that can be applied against qualifying income, including passive income. That deduction is a timing benefit that the fund's own later sale reverses, not a removal of tax.
What does not work, however often it is suggested
Rolling the proceeds into your home. A residence is not held for investment, so it is not replacement property, and no rule defers a rental's gain into it.
Skipping depreciation to avoid recapture. Your basis drops by the depreciation allowable even if you never claimed it, under section 1016(a)(2), so you lose the deductions and still owe the tax.
Moving in for a few months before selling. Two years of use are required, nonqualified use is prorated, and depreciation is taxed regardless.
Selling or exchanging with a relative who then resells. Section 1031(f) undoes an exchange between related persons if either sells within two years, and section 453(e) does the same for a related-party installment sale.
Full reinvestment, 45/180-day deadlines, carryover basis
You will keep owning real property, directly or through a DST
Hold until death
Removes gain and depreciation
No sale in your lifetime
Heirs will inherit and you do not need the cash
Section 121
Excludes up to $250,000 or $500,000
Two years of living there; depreciation still taxed
It was your home recently
Installment sale
Spreads gain over the payments
Buyer credit risk; depreciation layer comes first
A buyer wants seller financing and you want income
Opportunity zone fund
Defers the capital gain reinvested
Tax due by year five; illiquid fund
You want most of the cash and can lock up the gain
Charitable remainder trust
Spreads tax through the payments
Irrevocable; remainder leaves the family
You want lifetime income and a charitable gift
Losses and offsets
Reduce taxable gain
Only as large as the losses you have
You hold losses or suspended rental losses
Pay the tax
Settles it
The check, this year
Low bracket, small gain, or you need the money soon
Many sellers combine two of these. If units in a REIT rather than another property are on your list, 721 exchange (UPREIT) explains what that step defers and what it closes off.
Your next step: send us five numbers before the listing goes live
The decision has to be made before the sale closes, because an intermediary cannot be added afterwards. Send us your expected closing date, the sale price, your adjusted basis or depreciation schedule, the loan payoff, the state the rental is in and the state you live in, and the income you want from what comes next. Tell us too if you ever lived in the property and who you expect to inherit. Step 1 of our process is a conversation about your goals and tax exposure, and what a free proposal contains shows what comes back. A free consultation is the other way in, if a conversation suits you better.
Questions rental owners ask before they sell
Can I avoid capital gains tax by buying my own home with the rental proceeds?
No. A home you live in is not held for investment, so it cannot be replacement property in a 1031 exchange, and no other rule lets a rental's gain roll into a residence. The sale is taxed in the year it closes.
If I move into my rental for two years, is the whole gain excluded?
Usually not. Section 121 excludes only the share of gain that is not allocated to rental years after 2008, the depreciation you claimed is taxed regardless, and if you got the house in a 1031 exchange you must own it for five years before the exclusion applies at all.
Is it better to give the rental to my children now?
For income tax, usually worse. A gift passes your low basis to them under section 1015, so they owe the same gain when they sell, while property they inherit gets a basis equal to its value at your death under section 1014. Gifting can still make sense for other reasons; price both with your CPA.
Does a 1031 exchange avoid the 3.8% net investment income tax too?
It defers it. A fully deferred exchange recognizes no gain, so there is nothing for the surtax to reach that year. Any cash or debt relief you do not replace is recognized and can be subject to it.
How long do I have to decide between exchanging and paying the tax?
Until the sale closes. A qualified intermediary has to be in place before the closing, because once you have received the proceeds the exchange is no longer possible. After closing you have 45 days to identify replacement property and 180 days to acquire it.
Can I use more than one of these strategies on the same sale?
Yes, and many sellers do. You can exchange most of the proceeds and take some cash as taxable boot, or exchange the property and put an unrelated capital gain into an opportunity zone fund. Each route keeps its own rules, so map them with your CPA before the contract is signed.
Find out what your rental sale would really cost
Send the sale price, basis and loan payoff and an advisor will show the tax in each layer and what an exchange, a DST or a partial sale does to it.
Tell us about the rental and the sale you have in mind, and an advisor will contact you to set up a first call. Based in Irvine, California. Licensed in all 50 states; we work with sellers everywhere by phone and video.
Three of twelve sample structures: asset class, leverage, minimum and hold. The sponsor, the distributions paid and the offering size are what marketplace access adds, after a short suitability call. Request access and the current list follows.
Sample offering: a hypothetical illustration of this structure type, not an actual or current offering.
Sample offerings: hypothetical illustrations of structure types, not actual or current offerings. Photos are representative of each asset class. Current offerings are private placements for accredited investors, described by private placement memorandum.