Selling an investment property is the moment when years of tax-deferred growth come due — and the tax bill can be far larger than investors expect if they have not planned for it. When you sell real estate at a gain, two distinct tax computations come into play: the capital gains tax on the appreciation, and the depreciation recapture tax on the depreciation you claimed (or were entitled to claim) over the holding period. The capital gain is taxed at long-term rates (0%, 15%, or 20%) if held more than one year, plus a possible 3.8% Net Investment Income Tax for higher earners. The depreciation recapture — for residential and commercial real estate, the "unrecaptured Section 1250 gain" — is taxed at a maximum of 25%, which is higher than the 15% or 20% long-term capital gains rate that most investors assume applies to the entire gain. The result is that the effective tax rate on a real estate sale is a blend, and the depreciation recapture can account for more than half the total tax owed.
The interplay between these taxes and the strategies to manage them is the focus of this guide. We will work through the capital gains rate structure, the adjusted basis calculation that determines the gain, the Section 1250 recapture mechanics for real property, the Section 1245 recapture that applies to cost-segregated personal property, the Section 1231 treatment that can characterize net gains as capital gains while net losses are ordinary, and the two principal deferral and elimination strategies: the Section 1031 like-kind exchange and the Qualified Opportunity Zone investment. We will also address the installment sale (which spreads the gain over the receipt of payments) and the stepped-up basis at death (which eliminates both the gain and the recapture for heirs). Each topic will be illustrated with step-by-step numerical examples so you can see exactly how the taxes are calculated and how the strategies reduce them.
For the depreciation that creates the recapture, see our rental property depreciation guide and our cost segregation studies guide; for the passive loss rules that govern the release of suspended losses on sale, see our passive activity loss rules guide; and for the complete tax landscape, see our real estate tax strategies complete guide. This article is for educational purposes only and does not constitute tax, legal, or investment advice; every sale and exit strategy should be evaluated with a qualified real estate CPA well before the closing date.
Capital Gains Tax on Real Estate: The Rate Structure
When you sell an investment property for more than your adjusted basis, the profit is a capital gain. If the property was held for more than one year, the gain is a long-term capital gain taxed under IRC §1(h) at preferential rates: 0%, 15%, or 20%, depending on the taxpayer's taxable income. For 2025, the 0% rate applies to taxable income up to approximately $48,350 (single) or $96,700 (married filing jointly); the 15% rate applies up to approximately $533,400 (single) or $600,050 (married filing jointly); and the 20% rate applies above those thresholds. Most real estate investors fall in the 15% bracket, with high earners paying 20%. Short-term gains (held one year or less) are taxed at ordinary income rates, which can reach 37% — a strong reason to hold investment property for more than one year before selling.
In addition to the capital gains rate, higher-income taxpayers may owe the 3.8% Net Investment Income Tax (NIIT) under IRC §1411. The NIIT applies to net investment income (including capital gains and rental income) for taxpayers with modified adjusted gross income above $200,000 (single) or $250,000 (married filing jointly). For a high-earning investor, the top effective long-term capital gains rate is 23.8% (20% + 3.8% NIIT). State taxes may add further — some states (like California) tax capital gains at ordinary income rates with no preferential long-term rate, while others have low or no state income tax. The state treatment should be part of the sale analysis, particularly for investors in high-tax states considering a move before a sale.
A critical point: the long-term capital gains rate applies to the appreciation — the difference between the sale price and the original cost basis — but NOT to the depreciation recapture, which is taxed separately at up to 25% (Section 1250) or as ordinary income (Section 1245 for cost-segregated property). This is why a real estate sale tax cannot be calculated by simply applying the capital gains rate to the total profit; the gain must be split into its components, each taxed at its own rate. Many investors are surprised at closing to learn that their tax bill is significantly higher than they estimated using only the capital gains rate — because the recapture, which they may not have accounted for, is taxed at a higher rate. The next sections walk through the basis calculation and the recapture mechanics that drive this.
| Tax Rate | 2025 Taxable Income (Single) | 2025 Taxable Income (MFJ) | Applies To |
|---|---|---|---|
| 0% LTCG | Up to ~$48,350 | Up to ~$96,700 | Long-term gains only (not recapture) |
| 15% LTCG | ~$48,351 to ~$533,400 | ~$96,701 to ~$600,050 | Most investors; long-term gains |
| 20% LTCG | Above ~$533,400 | Above ~$600,050 | High earners; long-term gains |
| 3.8% NIIT | MAGI > $200,000 | MAGI > $250,000 | Net investment income (incl. gains) |
| 23.8% effective | High earners | High earners | 20% LTCG + 3.8% NIIT |
| 25% max (§1250) | All brackets | All brackets | Unrecaptured depreciation (§1250) |
| 28.8% effective | High earners | High earners | 25% §1250 + 3.8% NIIT |
| Ordinary (§1245) | Up to 37% | Up to 37% | Cost-segregated personal property |
Long-term capital gains on real estate (held > 1 year) are taxed at 0%, 15%, or 20% depending on taxable income, plus a possible 3.8% Net Investment Income Tax for higher earners (MAGI > $200K/$250K). The top effective long-term rate is 23.8%. However, the depreciation recapture is taxed separately — Section 1250 real property recapture at up to 25% (28.8% with NIIT), and Section 1245 cost-segregated property as ordinary income (up to 40.8% with NIIT). A real estate sale tax cannot be calculated by applying the capital gains rate to the total profit; the gain must be split into its components, each taxed at its own rate.
Adjusted Basis: The Starting Point for the Gain Calculation
The capital gain on a real estate sale is not simply the sale price minus the purchase price — it is the sale price minus the adjusted basis. The adjusted basis accounts for the depreciation that reduced the basis over the holding period and the capital improvements that increased it. The formula is: Adjusted Basis = Original Cost Basis + Capital Improvements + Certain Settlement Costs − Depreciation Allowed (or Allowable). The "depreciation allowed or allowable" language is critical: the IRS reduces your basis for the depreciation you were entitled to claim, even if you did not actually claim it. If you failed to depreciate, you still face the reduced basis and the recapture — with no offsetting benefit from the years you skipped. This is why you must always claim depreciation.
The original cost basis is the purchase price plus settlement costs that are capitalized (legal fees, title insurance, recording fees, transfer taxes) — not financing costs (points, origination fees), which are amortized separately. Capital improvements (a new roof, a kitchen renovation, an addition) are added to the basis when placed in service and depreciated over their own recovery period; they increase the adjusted basis on sale. Selling costs (commissions, closing costs, attorney fees) reduce the realized gain (they are subtracted from the sale price, not added to basis). The depreciation that reduces the basis is the total accumulated depreciation over the holding period — the annual MACRS deduction multiplied by the years held (with partial-year conventions in the first and last years).
Worked example — adjusted basis: An investor purchased a rental property for $400,000 five years ago. Settlement costs capitalized: $4,000. Original basis = $404,000. Capital improvements: a $20,000 roof replacement placed in service in year 3. The building basis (80% of $404,000 = $323,200) is depreciated over 27.5 years = $11,753 per year. The roof ($20,000) is depreciated over 27.5 years = $727 per year, beginning year 3. Over 5 years: building depreciation = $11,753 × 5 = $58,764 (approximately, adjusting for the mid-month convention in year 1). Roof depreciation = $727 × 3 = $2,181. Total accumulated depreciation = $58,764 + $2,181 = $60,945. Adjusted basis = $404,000 + $20,000 − $60,945 = $363,055. If the property sells for $600,000 with $36,000 in selling costs, the realized gain = $600,000 − $36,000 − $363,055 = $200,945. This gain is then split into the recapture and the remaining capital gain.
| Basis Component | Amount | Effect on Basis | Notes |
|---|---|---|---|
| Original purchase price | $400,000 | Starting point | Full price, not down payment |
| Capitalized settlement costs | $4,000 | Increases basis | Legal, title, recording, transfer |
| Capital improvements (roof) | $20,000 | Increases basis | Depreciated separately from year 3 |
| Accumulated depreciation (5 yrs) | −$60,945 | Decreases basis | Building + roof depreciation |
| Adjusted basis at sale | $363,055 | Used in gain calculation | Cost + improvements − depreciation |
| Sale price | $600,000 | Realized proceeds | Before selling costs |
| Selling costs | −$36,000 | Reduces realized gain | Commissions, closing, attorney |
| Realized gain | $200,945 | Taxed (split into components) | Sale − selling costs − adjusted basis |
Warning: The IRS reduces your basis for depreciation "allowed or allowable" — meaning if you were entitled to claim depreciation but did not, your basis is still reduced as if you had, and you face recapture on depreciation you never benefited from. There is no advantage to skipping depreciation, and significant downside. If you missed depreciation in prior years, a CPA can file Form 3115 (Change in Accounting Method) to make a Section 481(a) adjustment that catches up the missed deduction on the current year's return without amending prior years. Always claim the depreciation you are entitled to.
Section 1250 Depreciation Recapture for Real Property
Depreciation recapture is the mechanism by which the IRS "recaptures" the tax benefit of the depreciation deductions claimed over the holding period. For residential and commercial real estate (Section 1250 property), the recapture is "unrecaptured Section 1250 gain" — the total depreciation taken (or allowable) is taxed at a maximum rate of 25%, rather than the 15% or 20% long-term capital gains rate. This is not a penalty; it is the IRS recovering the ordinary income that the depreciation converted into capital-gain-taxed income. In effect, every dollar of depreciation reduced your ordinary income during the holding years (at your full marginal rate, say 32%), and on sale that same dollar is taxed at up to 25% (plus NIIT) — usually still a net tax benefit, but a smaller one than if the entire gain were taxed at 15%.
The recapture calculation for Section 1250 property: the unrecaptured Section 1250 gain is the lesser of (1) the total accumulated depreciation (allowed or allowable) or (2) the total realized gain. If the accumulated depreciation exceeds the gain (rare, but possible in a down market or with heavy depreciation and a small gain), the recapture is limited to the gain. The remaining gain (realized gain minus the unrecaptured Section 1250 gain) is taxed as a long-term capital gain at 15% or 20%. Continuing the example: realized gain = $200,945. Accumulated depreciation = $60,945. Unrecaptured §1250 gain = lesser of $60,945 or $200,945 = $60,945, taxed at up to 25%. Remaining capital gain = $200,945 − $60,945 = $140,000, taxed at 15% (or 20% for very high earners).
Assuming a 15% capital gains rate and 25% recapture rate, plus 3.8% NIIT on both (for a high-earner above the NIIT threshold): Tax on recapture = $60,945 × (25% + 3.8%) = $60,945 × 0.288 = $17,552. Tax on remaining gain = $140,000 × (15% + 3.8%) = $140,000 × 0.188 = $26,320. Total federal tax on sale = $17,552 + $26,320 = $43,872. The recapture ($17,552) accounts for 40% of the total tax — a substantial portion that an investor estimating only the capital gains rate would miss. This is why the recapture must be modeled before the sale, and why the deferral strategies (1031, QOZ) that defer both the gain and the recapture are so valuable. Note: the 25% recapture rate is a maximum; if your ordinary rate is below 25%, the recapture is taxed at your ordinary rate (not to exceed 25%).
| Gain Component | Amount | Tax Rate (incl. NIIT) | Federal Tax |
|---|---|---|---|
| Realized gain (total) | $200,945 | — | — |
| Unrecaptured §1250 gain (depreciation) | $60,945 | 28.8% (25% + 3.8% NIIT) | $17,552 |
| Remaining long-term capital gain | $140,000 | 18.8% (15% + 3.8% NIIT) | $26,320 |
| Total federal tax on sale | — | — | $43,872 |
| Recapture as % of total tax | — | — | 40% |
Hypothetical: The investor from our running example sells after 5 years for $600,000 (net of $36,000 selling costs), with an adjusted basis of $363,055. The total realized gain of $200,945 is split into: $60,945 of unrecaptured Section 1250 gain (the accumulated depreciation) taxed at 25% + 3.8% NIIT = $17,552, and $140,000 of remaining capital gain taxed at 15% + 3.8% NIIT = $26,320. Total federal tax = $43,872 — and the recapture accounts for 40% of it. An investor who estimated only the capital gains rate (15% of $200,945 = $30,142) would underestimate the tax by nearly $14,000. Always model the recapture separately before a sale.
Section 1245 Recapture for Cost-Segregated Property
If a cost segregation study was performed on the property, a portion of the building's cost was reclassified into 5-year, 7-year, and 15-year property — and that property is Section 1245, not Section 1250. Section 1245 recapture is more severe: the accelerated depreciation on the reclassified components is recaptured as ordinary income, with no 25% cap. This means the bonus depreciation and accelerated MACRS that produced large early deductions is "clawed back" at the investor's full marginal ordinary rate (up to 37%, plus 3.8% NIIT = 40.8%) on sale — rather than the 25% cap that protects Section 1250 real property. This is the key trade-off of cost segregation: the acceleration benefit during the hold comes with a higher recapture rate on sale.
The Section 1245 recapture calculation: the recapture is the lesser of (1) the depreciation claimed on the Section 1245 property (including bonus depreciation) or (2) the gain realized on the property. Because bonus depreciation can expense 60% or more of the reclassified property in year one, the Section 1245 recapture can be substantial — often approaching the full reclassified basis. For the property in our example, if a cost segregation study reclassified $45,000 to 5-year property and $20,000 to 15-year property ($65,000 total), and bonus depreciation (60%) plus MACRS over the 5-year hold depreciated most of it (say $55,000 of the $65,000), the Section 1245 recapture on sale would be approximately $55,000 — taxed as ordinary income (up to 37% + 3.8% NIIT).
The combined recapture for a cost-segregated property: the Section 1250 recapture (on the structural depreciation) at up to 25%, plus the Section 1245 recapture (on the reclassified property depreciation) at ordinary rates. For our example with cost segregation: Section 1250 recapture = $60,945 (structural depreciation, assuming the cost seg reduced the structural basis accordingly) at 25% + 3.8% = $17,552. Section 1245 recapture = $55,000 (cost-segregated depreciation) at 37% + 3.8% = $22,382. Remaining capital gain = $200,945 − $60,945 − $55,000 = $85,000 at 15% + 3.8% = $15,980. Total federal tax = $17,552 + $22,382 + $15,980 = $55,914 — versus $43,872 without cost segregation. The cost segregation increased the sale tax by approximately $12,042, but it also produced much larger deductions during the hold (saving $15,000+ in the first year alone). The net benefit depends on the hold period and the time value of the early deductions — which is why cost segregation pairs best with long holds or 1031 exchanges. For the full cost segregation framework, see our cost segregation studies guide.
| Recapture Type | Property | Max Rate | NIIT? | Code Section | When It Applies |
|---|---|---|---|---|---|
| Unrecaptured §1250 | Structural building (27.5/39-yr) | 25% | Yes (3.8%) | §1250, §1(h) | All real property sales |
| §1245 ordinary | Reclassified 5/7/15-yr (cost seg) | 37% (ordinary) | Yes (3.8%) | §1245 | Cost-segregated property |
| §1231 net gain | Business property (overall) | 20% (LTCG) | Yes (3.8%) | §1231 | Net §1231 gains are LTCG |
| §1231 net loss | Business property (overall) | Ordinary deduction | N/A | §1231 | Net §1231 losses are ordinary |
| Step-up at death | Inherited property | 0% — eliminated | No | §1014 | Heirs get FMV basis |
Warning: The accelerated depreciation from cost segregation is Section 1245 property, recaptured as ordinary income on sale (up to 37% + 3.8% NIIT = 40.8%) — with no 25% cap like Section 1250. For a short hold, the ordinary-income recapture can offset much of the acceleration benefit. Cost segregation is therefore most valuable for long holds (where the time value of early deductions outweighs the recapture) or 1031 exchange exits (which defer the recapture). For investors planning a near-term taxable sale of a cost-segregated property, model the Section 1245 recapture before selling — the sale tax can be significantly higher than for a non-cost-segregated property.
Section 1231 Treatment: Gains as Capital, Losses as Ordinary
Section 1231 of the Internal Revenue Code governs the tax treatment of gains and losses from the sale of property used in a trade or business (including rental real estate held as a trade or business) for more than one year. The rule creates a favorable asymmetry: net Section 1231 gains (gains exceeding losses for the year) are treated as long-term capital gains, taxed at the preferential 0/15/20% rates. Net Section 1231 losses (losses exceeding gains) are treated as ordinary losses, deductible against ordinary income without the passive activity loss limitations that apply to rental losses during the holding period. This "heads I win, tails I win" treatment — capital gain rates on net gains, ordinary loss treatment on net losses — is one of the most favorable provisions in the tax code for real estate investors.
The mechanics: at the end of each tax year, the taxpayer nets all Section 1231 gains and losses. If the net is a gain, it is long-term capital gain (taxed at 15% or 20%, plus NIIT). If the net is a loss, it is an ordinary loss (deductible against ordinary income). For a real estate investor selling a property at a gain, the Section 1231 treatment characterizes the net gain (after the recapture, which is separately taxed as Section 1250 or 1245) as a long-term capital gain — the same treatment it would receive as a capital asset, but with the added benefit that if the sale had produced a loss, it would be ordinary (not a capital loss subject to the $3,000 annual capital loss limitation). This is why rental real estate held as a trade or business is more favorable than real estate held as an investment: the loss side benefits from ordinary treatment.
A limitation: the "look-back rule" for Section 1231. If a taxpayer has net Section 1231 gains in the current year, but claimed ordinary Section 1231 losses in the prior 5 years, the current year's gains (up to the amount of the prior unrecaptured ordinary losses) are recharacterized as ordinary income — not capital gains. This prevents taxpayers from taking ordinary losses in one year and capital gains in the next. For most long-term real estate investors, the look-back rule is not a major issue because the gains on sale typically occur once (at the end of the hold), but it can apply to investors with multiple property sales across years. The Section 1231 treatment interacts with the PAL rules: a rental property that produces passive losses during the hold has those losses suspended under §469 (not deducted as ordinary), and on sale, the suspended losses are released (as discussed in our passive activity loss rules guide) while the Section 1231 gain is characterized as capital. The coordination of these provisions is complex and is a primary reason a real estate CPA is essential for any significant sale.
| §1231 Outcome | Tax Treatment | Rate | Effect |
|---|---|---|---|
| Net §1231 gain (gains > losses) | Long-term capital gain | 15% or 20% (+ NIIT) | Preferential capital gains rate |
| Net §1231 loss (losses > gains) | Ordinary loss | Deductible against ordinary income | No $3,000 capital loss limit |
| Look-back rule (5-yr) | Prior ordinary losses recapture current gain | Ordinary income (to extent of prior losses) | Prevents loss-then-gain arbitrage |
| §1250 recapture (within §1231) | Unrecaptured depreciation | 25% (+ NIIT) | Taxed separately, before §1231 netting |
| §1245 recapture (within §1231) | Ordinary income | Up to 37% (+ NIIT) | Cost-segregated property |
Section 1231 creates a favorable asymmetry for business real estate held > 1 year: net gains are taxed as long-term capital gains (15% or 20%), while net losses are deductible as ordinary losses (no $3,000 capital loss limitation). For a profitable sale, the net Section 1231 gain (after the separate Section 1250 and 1245 recapture) is a long-term capital gain. For a loss sale, the ordinary loss treatment is more favorable than capital loss treatment. The 5-year look-back rule recharacterizes current gains as ordinary to the extent of prior ordinary losses, preventing year-to-year arbitrage.
The Section 1031 Exchange: Deferring Gain and Recapture
The Section 1031 like-kind exchange is the most powerful deferral tool in real estate tax strategy, and it defers both the capital gain and the depreciation recapture. Under IRC §1031, no gain or loss is recognized on the exchange of property held for investment or productive use in a trade or business for "like-kind" property. For real estate, "like-kind" is interpreted very broadly — virtually any U.S. investment real estate qualifies as like-kind to any other (an apartment for an office, land for a retail building, a single-family rental for a multifamily building). A properly executed 1031 exchange allows the investor to sell a property, reinvest the proceeds in a replacement property, and defer all federal tax on the gain and recapture — potentially indefinitely, through a chain of exchanges until death, when the stepped-up basis eliminates the deferred tax.
The mechanics require strict adherence to two absolute deadlines, measured from the closing date of the relinquished property: (1) the Identification Period — the taxpayer must identify potential replacement properties in writing, delivered to a qualified intermediary, within 45 days; and (2) the Exchange Period — the taxpayer must close on one or more of the identified replacement properties within 180 days. Both deadlines are absolute and cannot be extended, even for weekends or holidays. The identification can name up to three properties of any value (the "Three-Property Rule"), or any number of properties as long as their total value does not exceed 200% of the relinquished property's value (the "200% Rule"), or any number of properties as long as the taxpayer acquires at least 95% of the identified value (the "95% Rule"). A qualified intermediary (QI) must hold the exchange funds — the taxpayer cannot touch the proceeds or the exchange fails.
To defer the entire gain, the replacement property must be of equal or greater value, and all equity must be reinvested (the investor cannot take cash out, or that "boot" is taxable). The debt on the replacement property must equal or exceed the debt on the relinquished property (or the investor must contribute additional cash to offset the debt reduction, or the debt reduction is taxable as boot). The basis of the replacement property is the purchase price minus the deferred gain — so the depreciation on the replacement is lower than it would be on a direct purchase, and the deferred recapture carries forward. Through repeated exchanges, the gain and recapture are deferred until death, when the heirs receive a stepped-up basis to fair market value and the entire deferred tax is permanently eliminated. For the complete 1031 framework, see our 1031 exchanges guide, and for financing the replacement property (including the debt replacement analysis), MortgageStrategist provides mortgage analysis tools.
| 1031 Requirement | Rule | Consequence if Violated |
|---|---|---|
| Like-kind property | U.S. investment/business real estate | Exchange fails; full taxation |
| Identification period | 45 days from relinquished sale | Exchange fails; full taxation |
| Exchange period | 180 days from relinquished sale | Exchange fails; full taxation |
| Qualified intermediary | QI holds funds; taxpayer cannot touch | Constructive receipt; exchange fails |
| Value (to defer fully) | Replacement ≥ relinquished value | Cash boot is taxable to the extent of difference |
| Equity (to defer fully) | All equity reinvested | Cash boot is taxable |
| Debt (to defer fully) | Replacement debt ≥ relinquished debt | Debt-reduction boot is taxable (or offset with cash) |
Warning: The 1031 exchange deadlines (45-day identification, 180-day closing) are absolute and non-extendable — not for weekends, holidays, illness, or any other reason. Missing them by one day triggers full taxation of the entire gain and recapture. The funds must be held by a qualified intermediary; if the taxpayer touches the money, the exchange is destroyed (constructive receipt). Always engage the QI before the relinquished property closes, and have replacement properties identified and contingencies planned well in advance of the 45-day deadline. The 1031 is powerful but unforgiving — a single missed deadline or procedural error can cost hundreds of thousands of dollars in tax.
Qualified Opportunity Zones: Deferring, Then Eliminating Gains
Qualified Opportunity Zones (QOZs), created by the Tax Cuts and Jobs Act under IRC §1400Z-2, offer a different and complementary path to managing capital gains on a real estate sale. Unlike a 1031 exchange, which requires the gain to come from real estate and to be reinvested in real estate, a QOZ investment can be funded with capital gains from any source — real estate, stocks, a business sale, even cryptocurrency. An investor who sells a property at a gain can reinvest the gain in a Qualified Opportunity Fund (QOF) within 180 days of the sale, deferring the original gain until the QOF investment is sold or December 31, 2026 (the deferral sunset, though legislative changes may affect this), whichever is earlier. The deferral reduces the current-year tax bill, freeing capital for reinvestment.
The longer-term benefits are even more powerful. If the QOF investment is held for at least 5 years, the investor receives a 10% basis increase in the deferred original gain (effectively excluding 10% of the original gain from tax). At 7 years, the basis increase is 15% (excluding 15% of the original gain). Most powerfully, if the QOF investment is held for at least 10 years, the investor can elect to exclude the entire gain on the QOF investment itself — the appreciation of the QOF interest is entirely tax-free. A $200,000 gain reinvested in a QOF and held 10 years defers the original $200,000 gain (until the sunset or QOF sale) and excludes all appreciation on the QOF investment. For real estate investors, a QOF that invests in real estate can combine this with depreciation on the QOF's real property (including cost segregation), creating a layered tax benefit: deferred original gain, accelerated depreciation, and excluded appreciation at 10 years.
A critical distinction from the 1031: the QOZ does NOT defer depreciation recapture the same way. The original capital gain (including the portion attributable to unrecaptured Section 1250 gain) is deferred when reinvested in a QOF, but the recapture is not separately tracked the way it is in a 1031 — the entire gain is treated as a capital gain for QOZ purposes. However, the recapture character of the original gain may carry through in certain respects, and the interaction is complex. For a real estate sale with significant recapture, a 1031 exchange (which clearly defers both the capital gain and the recapture as separate components) may be cleaner than a QOZ for the real-estate-specific deferral. The QOZ is often preferred when the investor wants to diversify out of real estate (into a QOF that may hold different assets), when the gain comes from a non-real-estate source, or when the 10-year exclusion of QOF appreciation is the primary goal. For the complete QOZ framework, see our opportunity zones guide, and consult a QOZ specialist CPA for the interaction with recapture.
| Feature | Section 1031 Exchange | Qualified Opportunity Zone (QOZ) |
|---|---|---|
| Eligible gains | Real estate gains only | Any capital gain (any asset class) |
| Reinvestment requirement | Like-kind U.S. investment real estate | Qualified Opportunity Fund (QOF) investment |
| Deferral duration | Until replacement property sold | Until QOF sold or 12/31/2026 sunset |
| Recapture treatment | Both capital gain and recapture deferred | Gain deferred; recapture interaction complex |
| Partial exclusion of original gain | No | 10% at 5 yrs, 15% at 7 yrs |
| Exclusion of QOF appreciation | N/A | 100% exclusion at 10-year hold |
| Deadlines | 45-day ID, 180-day close | 180 days to reinvest in QOF |
| Debt replacement required | Yes (to defer fully) | No |
| Stepped-up basis at death | Yes (§1014) | Yes (§1014) |
A Qualified Opportunity Zone investment defers capital gains from any source (not just real estate) reinvested in a QOF within 180 days. The original gain is deferred (until QOF sale or 2026 sunset), partially excluded at 5 and 7 years (10% and 15%), and the appreciation on the QOF investment is entirely excluded if held 10 years. Unlike a 1031, a QOZ does not require like-kind real estate and has no debt replacement requirement — making it useful for diversifying out of real estate or for gains from other assets. The interaction with depreciation recapture is more complex than a 1031; consult a QOZ specialist.
Installment Sales: Spreading the Gain Over Time
An installment sale — reporting the gain over the years in which payments are received, rather than all in the year of sale — is a strategy for investors who seller-finance the sale of their property. Under IRC §453, when a seller receives payments across more than one tax year (via a carryback note or seller financing), the gain is recognized proportionally as payments are received, spreading the tax liability over the term of the note. For a property sold for $600,000 with $200,000 down and a $400,000 note over 10 years, the gain is recognized proportionally with each payment — reducing the tax hit in the year of sale and potentially keeping the investor in a lower bracket each year. The installment method can be particularly useful for investors who want to defer gain without the strict deadlines and requirements of a 1031 exchange, or who are selling to a buyer who cannot secure conventional financing.
However, the installment sale has significant limitations that make it less favorable than a 1031 or QOZ in many cases. First, depreciation recapture is NOT eligible for the installment method — the full recapture (Section 1250 and 1245) is taxed in the year of sale, regardless of when payments are received. Only the remaining capital gain (the appreciation above the depreciated basis) can be spread. For a property with heavy depreciation, this means a large tax bill in the year of sale from the recapture, with only the appreciation portion spread. Second, the installment sale does not defer the gain indefinitely the way a 1031 does — it merely spreads it over the note term. Third, the investor assumes the credit risk of the buyer (if the buyer defaults on the note, the seller may foreclose but has already recognized some of the gain). Fourth, the interest received on the note is taxed as ordinary income.
The installment sale is best suited for specific situations: a seller who wants steady income over time (the note payments provide retirement-like cash flow), a buyer who cannot secure conventional financing (making seller financing the only way to close), or a property that does not qualify for a 1031 (e.g., a primary residence portion, or property held less than one year for the capital gain). For most investment property sales where the goal is tax deferral, the 1031 exchange is superior because it defers both the gain and the recapture, with no credit risk. The installment sale should be modeled alongside the 1031 and QOZ options before a sale, with a CPA calculating the net present value of each strategy's tax burden. For seller financing structures and the note terms that optimize the installment treatment, see our seller financing guides, and for the buyer's financing alternatives, MortgageStrategist provides mortgage analysis.
| Strategy | Defers Capital Gain? | Defers Recapture? | Indefinite Deferral? | Credit Risk? |
|---|---|---|---|---|
| 1031 exchange | Yes (until replacement sold) | Yes (carries forward) | Yes (until death, step-up) | No |
| QOZ investment | Yes (until QOF sold/2026) | Partial / complex | QOF appreciation excluded at 10 yrs | QOF investment risk |
| Installment sale | Yes (spread over note term) | No — recapture due in year of sale | No — spread only | Yes — buyer default risk |
| Taxable sale (no strategy) | No | No | No | No |
| Hold to death (step-up) | N/A (held) | N/A (held) | Gain + recapture eliminated for heirs | No |
An installment sale (IRC §453) spreads the capital gain over the years payments are received, but depreciation recapture is NOT eligible for the installment method — the full recapture is taxed in the year of sale. This makes the installment sale less favorable than a 1031 for properties with heavy depreciation. The installment sale is best for sellers who want steady income over time, buyers who cannot secure conventional financing, or properties that do not qualify for a 1031. For most investment property sales, the 1031 (which defers both gain and recapture) is superior. Model all options with a CPA before the sale.
The Stepped-Up Basis at Death: Eliminating Gain and Recapture
The stepped-up basis at death, codified in IRC §1014, is the ultimate tax-elimination strategy for real estate investors. When a property owner dies, the basis of the property in the hands of the heirs is "stepped up" to the fair market value at the date of death (or the alternate valuation date six months later, if elected). This means the heirs receive the property as if they had purchased it at fair market value — all the accumulated gain (appreciation) and all the deferred depreciation recapture from the original owner's holding period are permanently eliminated. An investor who bought a property for $400,000, depreciated it to a $290,000 adjusted basis, and dies when it is worth $700,000 leaves the heirs a property with a $700,000 basis — no $410,000 gain, no $110,000 recapture, no tax due on the lifetime appreciation and depreciation.
The stepped-up basis is what makes the "buy, hold, depreciate, exchange, repeat" strategy so powerful over a lifetime. Each 1031 exchange defers the gain and recapture; the stepped-up basis at death eliminates them. An investor who acquires properties, performs cost segregation to accelerate depreciation, holds, exchanges into larger properties via 1031 (deferring all gain and recapture), and repeats over decades accumulates a large deferred tax liability — but if the properties are held until death, the heirs receive them at fair market value basis, and the entire deferred gain and recapture (from all the exchanges and all the cost segregation) is permanently eliminated. This is why estate planning is inseparable from real estate tax strategy: the lifetime deferral strategies (1031, cost segregation) are most valuable when combined with the death-time elimination (stepped-up basis).
Important nuances: the stepped-up basis applies to property held at death, not property sold before death (a pre-death sale triggers the gain and recapture). For community property states, both spouses' halves get a stepped-up basis on the first spouse's death; for common-law states, only the deceased spouse's half is stepped up (the surviving spouse's half retains its original basis). The stepped-up basis does not eliminate suspended passive losses — those generally expire at death (they do not carry forward to the heirs), though the gain elimination usually makes this moot. The estate tax (separate from income tax) may apply to very large estates (above the federal estate tax exemption, which was approximately $13.99 million per individual in 2025, subject to legislative changes), but for most investors, the income tax elimination via stepped-up basis is the primary benefit. Estate planning with a qualified estate attorney, alongside the real estate CPA, is essential for investors with significant portfolios. For portfolio-level estate planning coordination, REIVaultPro tracks basis, deferred gains, and recapture exposure across properties.
| Event | Original Owner's Basis | Heirs' Basis (after death) | Gain/Recapture Tax |
|---|---|---|---|
| Bought for $400K, depreciated to $290K basis | $290,000 adjusted | — | — |
| Died when FMV = $700,000 | — | $700,000 (stepped up) | $0 — gain + recapture eliminated |
| Heirs sell immediately for $700,000 | — | $700,000 | $0 — no gain above stepped-up basis |
| Heirs hold and sell later for $800,000 | — | $700,000 | $100,000 gain (only post-death appreciation) |
| Property sold before death (no step-up) | $290,000 | N/A | Full gain + recapture taxed on sale |
The stepped-up basis at death (IRC §1014) eliminates both the capital gain and the depreciation recapture for heirs — they receive the property at fair market value basis, as if they had purchased it at the date-of-death value. This is the ultimate tax-elimination strategy and is what makes the lifetime "buy, hold, depreciate, exchange, repeat" strategy so powerful: the 1031 exchanges defer the gain and recapture during life, and the stepped-up basis eliminates them at death. An investor who accumulated $2 million in deferred gains and recapture across a lifetime of exchanges leaves heirs properties with zero deferred tax. Estate planning with a qualified attorney is essential for investors with significant portfolios.
Primary Residence Exclusion: The Section 121 Advantage for House Hacks
A special provision, IRC §121, allows a taxpayer to exclude up to $250,000 ($500,000 for married filing jointly) of gain on the sale of a primary residence owned and used as the principal residence for at least 2 of the 5 years preceding the sale. For real estate investors who have "house hacked" — living in a property (a duplex, a single-family home with rented rooms) and then converting it to a full rental or selling it — the Section 121 exclusion can apply to the portion of the gain attributable to the personal-residence use, potentially excluding a significant amount of gain from tax. This is one of the few provisions that can exclude (not merely defer) real estate gain during the owner's lifetime.
The interaction between Section 121 and rental use is governed by specific rules. For a property that was used as a primary residence and then rented (or rented and then used as a residence), the exclusion applies only to the gain attributable to the personal-residence period. Under the "2-of-5-year" rule, the owner must have owned and used the property as a principal residence for at least 2 of the 5 years before the sale. For a property that was a primary residence for 3 years and a rental for 2 years (within the 5-year window), the Section 121 exclusion can apply — but the depreciation taken during the rental period (after 2008) is recaptured (not excluded), under the "depreciation disallowance" rule. Specifically, the gain excluded under Section 121 cannot exceed the gain attributable to the personal-use period, and the depreciation taken during non-personal use is recaptured at the Section 1250 rate (up to 25%).
A powerful strategy for house hackers: live in a property for 2+ years, rent it for up to 3 years (staying within the 5-year window), and sell — excluding up to $250,000/$500,000 of the personal-use gain while paying recapture only on the rental-period depreciation. An investor who buys a duplex, lives in one unit for 3 years (renting the other), then rents both units for 2 years and sells can exclude a significant portion of the gain. The strategy can be repeated with a new primary residence every few years (the Section 121 exclusion can be used once every 2 years). The rules are specific and the calculations (allocating gain between personal and rental use, calculating the depreciation disallowance) require a CPA. For the house hacking framework that sets up this strategy, see our house hacking guides. The Section 121 exclusion is one of the most valuable tax benefits available to real estate investors who are willing to live in their properties.
| Scenario | §121 Exclusion | Depreciation Recapture | Remaining Taxable Gain |
|---|---|---|---|
| Primary residence entire 5 yrs (no rental) | Up to $250K/$500K | N/A (no rental depreciation) | Gain above exclusion |
| Residence 3 yrs + rental 2 yrs (within 5-yr) | Up to $250K/$500K on personal-use gain | Recapture on rental-period depreciation | Personal gain above exclusion + recapture |
| Rental 4 yrs + residence 1 yr (fails 2-of-5) | No §121 exclusion | Full recapture on all depreciation | Full gain taxable |
| Residence 2 yrs + rental 3 yrs (within 5-yr) | Up to $250K/$500K on personal-use gain | Recapture on rental-period depreciation | Personal gain above exclusion + recapture |
Section 121 allows excluding up to $250,000 ($500,000 MFJ) of gain on a primary residence owned and used as such for 2 of the 5 years before sale. For house hackers, the exclusion applies to the personal-use gain, while depreciation taken during the rental period (after 2008) is recaptured at up to 25%. A powerful strategy: live in a property 2+ years, rent it up to 3 years (within the 5-year window), and sell — excluding the personal-use gain while paying recapture only on rental depreciation. This can be repeated with a new primary residence every 2 years. See our house hacking guides for the framework.
Building a Sale Tax Strategy: A Practical Framework
A disciplined sale tax strategy applies a clear framework to every real estate disposition. Step 1 — Model the tax before listing: Calculate the adjusted basis, the realized gain, the Section 1250 recapture (and any Section 1245 recapture from cost segregation), and the total federal and state tax under a taxable sale. This is the baseline — the tax you owe if you do nothing. Step 2 — Evaluate the deferral and elimination strategies: Compare a 1031 exchange (defers gain and recapture, requires like-kind real estate and strict deadlines), a QOZ investment (defers gain, excludes QOF appreciation at 10 years, can use any asset's gain), an installment sale (spreads the capital gain but not the recapture, with buyer credit risk), and a hold-to-death strategy (eliminates gain and recapture via stepped-up basis).
Step 3 — Choose the strategy that fits the goal: If the goal is to continue building real estate wealth, the 1031 exchange is usually best (defers everything, acquires a larger property). If the goal is to diversify out of real estate or to use a non-real-estate gain, the QOZ is best. If the goal is steady income and the buyer cannot get conventional financing, the installment sale may fit. If the investor is elderly or estate-planning, holding to death (or a partial sale balanced with retained properties) leverages the stepped-up basis. Step 4 — Execute with professional support: Engage a qualified intermediary before the relinquished property closes (for a 1031), or a QOZ specialist and QOF (for a QOZ), and coordinate with a real estate CPA who models the tax and prepares the return. Step 5 — Plan the replacement or reinvestment: For a 1031, identify and close the replacement property within the deadlines; for a QOZ, select the QOF and complete the investment within 180 days.
The sale tax strategy must be planned months before the sale, not at the closing table — because the 1031 and QOZ deadlines begin the moment the relinquished property closes, and the decisions (which replacement property, which QOF, whether to seller-finance) require lead time. A real estate CPA is essential for the tax modeling, a qualified intermediary for the 1031, and a QOZ specialist for the Opportunity Zone. For portfolio-level tracking of basis, deferred gains, and recapture exposure across properties, REIVaultPro provides integrated tools, and for the financing of replacement properties (including the debt replacement analysis critical to a 1031), MortgageStrategist offers mortgage analysis and planning. The investors who minimize the tax on sale are the ones who plan the exit before the acquisition, model the tax before listing, and execute the chosen strategy with professional support.
- Step 1 — Model the tax before listing: Calculate adjusted basis, realized gain, §1250 and §1245 recapture, and total federal/state tax under a taxable sale.
- Step 2 — Evaluate strategies: Compare 1031 exchange, QOZ investment, installment sale, and hold-to-death (stepped-up basis).
- Step 3 — Choose the strategy that fits: 1031 to continue in real estate; QOZ to diversify or use non-RE gains; installment for income/financing; hold-to-death for estate planning.
- Step 4 — Execute with professionals: Qualified intermediary (1031), QOZ specialist, real estate CPA for tax modeling and return preparation.
- Step 5 — Plan the replacement/reinvestment: Identify and close replacement property within 1031 deadlines, or complete QOF investment within 180 days.
A disciplined sale tax strategy — model the tax before listing, evaluate the deferral/elimination strategies, choose the one that fits the goal, execute with professional support, and plan the replacement or reinvestment — minimizes the tax on sale and preserves capital for the next investment. The strategy must be planned months before the sale, because the 1031 and QOZ deadlines begin at closing. REIVaultPro tracks basis, deferred gains, and recapture exposure across a portfolio, while MortgageStrategist optimizes the replacement property financing (especially the 1031 debt replacement analysis).
Conclusion
Selling investment real estate triggers two distinct taxes: the capital gains tax on the appreciation (at 0%, 15%, or 20% long-term rates, plus a possible 3.8% NIIT), and the depreciation recapture on the depreciation claimed over the holding period (at up to 25% for Section 1250 real property, or as ordinary income for Section 1245 cost-segregated property). For a typical sale, the recapture can account for 40% or more of the total tax — a portion that investors who estimate only the capital gains rate consistently underestimate. The Section 1231 treatment characterizes net gains as long-term capital gains (favorable) and net losses as ordinary (also favorable), adding a layer of benefit for business real estate. The accurate calculation requires splitting the realized gain into its components — unrecaptured Section 1250 gain, Section 1245 recapture, and remaining capital gain — each taxed at its own rate.
The strategies to manage the sale tax are powerful and well-established. The Section 1031 like-kind exchange defers both the capital gain and the depreciation recapture when the proceeds are reinvested in like-kind U.S. investment real estate, with strict 45-day and 180-day deadlines — and through repeated exchanges until death, the deferral becomes permanent elimination via the stepped-up basis. The Qualified Opportunity Zone defers gains from any asset class, partially excludes the original gain at 5 and 7 years, and entirely excludes the QOF appreciation at 10 years — useful for diversifying out of real estate or for non-real-estate gains. The installment sale spreads the capital gain (but not the recapture) over the note term. The stepped-up basis at death eliminates both the gain and the recapture for heirs. The Section 121 exclusion can exclude up to $250,000/$500,000 of gain on a primary residence used 2 of 5 years — a powerful tool for house hackers. The right strategy depends on the investor's goal: continue in real estate (1031), diversify (QOZ), generate income (installment), estate-plan (hold to death), or monetize a house hack (Section 121).
For deeper coverage, see our companion guides: rental property depreciation (the depreciation that drives recapture), cost segregation studies (the Section 1245 recapture from reclassified property), passive activity loss rules (the suspended loss release on sale), and our real estate tax strategies complete guide (the full landscape). For the deferral strategies, see our 1031 exchanges guide and our opportunity zones guide. For portfolio-level tracking of basis, deferred gains, and recapture exposure across properties, REIVaultPro provides integrated tools, and for optimizing the financing of replacement properties — particularly the debt replacement analysis critical to a 1031 — MortgageStrategist offers mortgage analysis and planning. This article is for educational purposes only and does not constitute tax, legal, or investment advice; every sale and exit strategy should be evaluated with a qualified real estate CPA well before the closing date.
Frequently Asked Questions
What is depreciation recapture and how is it taxed?
Depreciation recapture is the tax the IRS imposes to recover the benefit of depreciation deductions when you sell. For Section 1250 real property (residential and commercial buildings), the total depreciation taken (or allowable) is taxed as "unrecaptured Section 1250 gain" at a maximum of 25% (plus a possible 3.8% NIIT), rather than the 15% or 20% long-term capital gains rate. For Section 1245 property (5/7/15-year property from cost segregation), the recapture is taxed as ordinary income (up to 37% + 3.8% NIIT) with no 25% cap. The recapture can account for 40% or more of the total tax on a real estate sale.
How is the gain on a rental property sale calculated?
The realized gain = Sale Price − Selling Costs − Adjusted Basis. The adjusted basis = Original Cost + Capitalized Settlement Costs + Capital Improvements − Depreciation Allowed (or Allowable). The "allowed or allowable" rule means your basis is reduced by depreciation you were entitled to claim, even if you did not. The realized gain is then split into: (1) unrecaptured Section 1250 gain (the accumulated depreciation, taxed at up to 25%), (2) any Section 1245 recapture (from cost segregation, taxed as ordinary income), and (3) the remaining capital gain (taxed at 15% or 20% long-term rates). Each component is taxed at its own rate.
Does a 1031 exchange defer depreciation recapture?
Yes. A properly executed Section 1031 exchange defers both the capital gain and the depreciation recapture (both Section 1250 and Section 1245) when the proceeds are reinvested in like-kind U.S. investment real estate. The recapture is not eliminated — it carries forward as reduced basis in the replacement property — but it is deferred until a future taxable sale. Through repeated exchanges until death, the deferred gain and recapture are permanently eliminated by the stepped-up basis the heirs receive under IRC §1014. The 1031 requires strict adherence to the 45-day identification and 180-day closing deadlines and the use of a qualified intermediary.
What is the difference between Section 1250 and Section 1245 recapture?
Section 1250 covers real property (the 27.5-year and 39-year structural building), and its recapture is "unrecaptured Section 1250 gain" taxed at a maximum of 25% (plus NIIT) — a cap that protects real property from full ordinary recapture. Section 1245 covers personal property (the 5-year, 7-year, and 15-year property reclassified by a cost segregation study), and its recapture is taxed as ordinary income (up to 37% + 3.8% NIIT) with no cap. This is why cost segregation, which generates Section 1245 property, produces higher recapture on sale than structural depreciation alone — a trade-off that makes cost segregation best for long holds or 1031 exits that defer the recapture.
Can I avoid capital gains tax by investing in an Opportunity Zone?
A Qualified Opportunity Zone (IRC §1400Z-2) allows you to defer capital gains from any source by reinvesting the gain in a Qualified Opportunity Fund within 180 days. The original gain is deferred (until the QOF is sold or 2026 sunset), partially excluded at 5 years (10%) and 7 years (15%), and the appreciation on the QOF investment is entirely excluded if held 10 years. The QOZ does not require like-kind real estate (unlike a 1031) and can be funded with gains from any asset. The interaction with depreciation recapture is more complex than a 1031; consult a QOZ specialist. For real-estate-to-real-estate deferral, a 1031 is often cleaner; for diversifying or using non-RE gains, a QOZ is preferred.
What is the stepped-up basis at death and how does it help?
Under IRC §1014, when a property owner dies, the heirs receive the property at a basis equal to the fair market value at the date of death — "stepped up" from the original owner's adjusted (depreciated) basis. This permanently eliminates both the capital gain (appreciation) and the deferred depreciation recapture that accumulated during the original owner's lifetime. An investor who bought for $400K, depreciated to $290K basis, and dies when the property is worth $700K leaves heirs a $700K basis — no $410K gain, no $110K recapture. This is why the lifetime strategy of 1031 exchanges (deferring gain and recapture) combined with holding until death (eliminating them) is the most powerful long-term real estate tax strategy.
Learn with Ebonie Caldwell
Keep building your investing knowledge
This guide is part of Ebonie Caldwell's real estate investing education series. Explore the contributor profile for more practical lessons, tools, and courses.
Explore Ebonie's educationReal Estate Investing Software & Education
Explore Real Estate Investment Tools
Visit REIVaultPro.com for professional services and resources.
This is a promotional link to an affiliated business of the publisher, separate from the magazine's editorial content.
Tags
Editorial Disclosure: This article is for educational purposes only and does not constitute investment, tax, or legal advice. All financial examples are hypothetical illustrations and do not represent guaranteed returns. Real estate investments involve risk, including the potential loss of principal. Consult with qualified professionals before making investment decisions. Cross-marketing links to affiliated businesses are separate from editorial content.
Sources & References
- IRS Publication 544 — Sales and Other Dispositions of Assets — Current rules on capital gains, Section 1250 recapture, Section 1231 treatment, and installment sales
- IRC Section 1250 — Gain from Disposition of Certain Depreciable Real Property — Unrecaptured Section 1250 gain rules and the 25% recapture cap
- IRC Section 1231 — Gains and Losses from Property Used in a Trade or Business — Section 1231 netting rules: capital gain treatment for net gains, ordinary for net losses
- IRC Section 1031 — Exchange of Real Property Held for Investment — Like-kind exchange deferral rules and the 45-day/180-day deadlines
- IRC Section 1400Z-2 — Special Rules for Capital Gains Invested in Opportunity Zones — QOZ gain deferral, partial exclusions, and 10-year appreciation exclusion
Sources Last Verified: November 8, 2026

Ebonie Caldwell
Real Estate & Mortgage Strategist | Real Estate Investor & Educator
Ebonie Caldwell has 25+ years of real estate and mortgage industry experience, including real estate investing, mortgage underwriting, real estate education, financing, and investment strategies. She has provided real estate investing education to more than 14,000 students.




