Get The Ultimate
1031 Exchange Calculator.

Want to understand the math behind capital gains from the sale of your investment property? Interested in going deep on the amount of taxes you’ll defer by doing a 1031 exchange? Or what about understanding the reinvestment required to take advantage of full tax deferral on your 1031?

From capital gains calculations to 1031 tax deferment to detailed scenario analysis of 1031 exchange savings you get from hiring 1031 Specialists, our Excel model has it all. Just fill out this simple form, then check your email.

Check Your Email!

You are 1 step away from accessing the ultimate 1031 exchange calculator.

All that’s left to do is check your email!

- 1031 Specialists Team
Oops! Something went wrong while submitting the form.
1031 Exchange Calculator: How to Calculate Deferred Tax, Boot, and Replacement Property Basis

1031 Exchange Calculator: How to Calculate Your Deferred Tax, Taxable Boot, and Replacement Property Basis

The complete calculation framework for a 1031 exchange — from adjusted basis through realized gain, recognized gain, cash and mortgage boot, replacement property basis, depreciation recapture, NIIT, and the full side-by-side tax comparison of selling outright vs. exchanging.

Updated May 2026  ·  20 min read

The Three Outputs Every 1031 Calculator Must Deliver

Any useful 1031 exchange calculation — whether done by hand, a CPA, or an online tool — needs to produce three numbers:

1. Your deferred tax — the total tax you avoid by exchanging instead of selling outright. This is the realized gain minus any recognized gain, multiplied by the applicable tax rates (depreciation recapture, capital gains, NIIT, and state taxes).

2. Your taxable boot — the amount that triggers immediate tax because you didn't fully reinvest. This is the recognized gain — the lesser of your total boot received or your total realized gain.

3. Your replacement property basis — the starting point for depreciation on the new property and the number that determines your gain when you eventually sell. It's lower than the purchase price by the amount of deferred gain.

The rest of this article walks through every calculation step to produce those three numbers, with a complete worked example using realistic dollar amounts.

Step 1: Calculate Your Adjusted Basis

Your adjusted basis is the starting point for every gain calculation. It represents your investment in the property, adjusted for depreciation and improvements.

Adjusted basis = Original purchase price
                   + qualifying closing costs at purchase
                   + capital improvements during ownership
                   − accumulated depreciation

Original purchase price is what you paid for the property. Qualifying closing costs include title insurance, attorney fees, recording fees, transfer taxes, and escrow fees — but not prepaid taxes, insurance prorations, or loan origination fees. Capital improvements are expenditures that add value or extend the property's life: new roofs ($15K–$50K+), HVAC systems ($5K–$25K), kitchen remodels, additions, and similar projects. Routine repairs (faucet replacements, patching, painting) are not capital improvements and don't increase basis.

Accumulated depreciation is the total depreciation you've claimed — or were entitled to claim under the "allowed or allowable" rule (IRC §1016(a)(2)) — over your ownership period. This is usually the largest basis reduction and is critical to calculate accurately.

⚠️ The "Allowed or Allowable" Trap Under IRC §1016(a)(2), the IRS reduces your basis by the depreciation you were entitled to claim, whether or not you actually took the deduction. If you never claimed depreciation on your rental property, your basis is still reduced as though you did. File IRS Form 3115 (Change in Accounting Method) before selling to recover those missed deductions. See the Form 3115 section below.

Depreciation Schedules by Property and Asset Type

Different assets within your property depreciate on different schedules. If you've done a cost segregation study, some components may be on shorter lives, affecting your total accumulated depreciation.

Asset TypeRecovery PeriodMethodConvention
Residential rental building27.5 yearsStraight-lineMid-month
Commercial building39 yearsStraight-lineMid-month
Land improvements (fencing, paving, landscaping)15 years150% declining balanceHalf-year
Appliances, carpeting, furniture5 years200% declining balance (MACRS)Half-year
Cabinetry, fixtures, signage7 years200% declining balance (MACRS)Half-year
LandNot depreciable

For most investors without a cost segregation study, the calculation is straightforward: take the depreciable building basis (purchase price minus land value), divide by 27.5 (residential) or 39 (commercial), adjust for the mid-month convention in the first and last year, and multiply by years of ownership.

Step 2: Calculate Your Realized Gain

The realized gain is your total economic profit from the transaction — the full gain that exists whether you exchange or sell outright.

Realized gain = (Sale price − selling costs) − adjusted basis

Selling costs include real estate commissions, title insurance, escrow fees, transfer taxes, and QI fees. These are "qualified exchange expenses" that reduce your amount realized. Loan origination fees, property repairs, and prorations are not qualified and cannot be deducted here — if paid from exchange funds, they create cash boot.

Step 3: Calculate Boot — The Two-Test Framework

Boot is the portion of exchange value you received that wasn't reinvested in like-kind real property. It comes in two forms, and you must run both tests independently.

Test 1: The Price Test (Cash Boot)

Cash boot = Net sale price of relinquished property − purchase price of replacement property
(If negative or zero, cash boot = $0)

If your replacement property costs less than what you sold for (after selling costs), the difference is cash boot — money that wasn't reinvested in like-kind property.

Test 2: The Equity Test (Mortgage Boot)

Mortgage boot = Old mortgage paid off − new mortgage on replacement property
(If negative or zero, mortgage boot = $0)

If you reduced your debt level through the exchange, the debt relief is mortgage boot. The IRS treats being freed from a liability the same as receiving cash.

Boot Netting: How Cash and Mortgage Boot Interact

The netting rules under Treasury Regulation §1.1031(b)-1(c) allow some offsets, but they're asymmetric:

Offset DirectionAllowed?
Cash paid → offsets mortgage boot✅ Yes
Extra debt assumed → offsets mortgage boot✅ Yes
Extra debt assumed → offsets cash boot❌ No

This asymmetry is the most common source of unexpected boot. Taking on a bigger mortgage does not offset cash you took out of the exchange.

Total net boot = Cash boot + Mortgage boot (after netting offsets)
(Cannot be less than $0)

Step 4: Determine Your Recognized Gain

The recognized gain is the amount you actually owe tax on this year. It's determined by a simple ceiling rule:

Recognized gain = Lesser of (total net boot) or (realized gain)
(Cannot be less than $0)

If your boot is $80,000 but your realized gain is only $50,000, you're taxed on $50,000. You can never be taxed on more gain than you actually realized.

Your deferred gain — the portion that carries forward into the replacement property — is simply:

Deferred gain = Realized gain − Recognized gain

Step 5: Calculate Your Replacement Property Basis

The replacement property's tax basis determines your annual depreciation deduction and your gain when you eventually sell. It's always lower than the purchase price by the amount of deferred gain — this is how the IRS preserves the deferred tax in the property's basis.

Replacement basis = FMV of replacement property − deferred gain

Equivalently:

Replacement basis = Adjusted basis of relinquished property
                       + additional cash invested
                       + recognized gain
                       + exchange expenses
                       − boot received

Both formulas should produce the same number. If they don't, recheck your math — it means an error in one of the prior steps.

📋 Why the Lower Basis Matters A lower basis means less annual depreciation and a larger taxable gain when you eventually sell. The deferred gain doesn't disappear — it's embedded in the gap between the replacement property's market value and its basis. This is the "cost" of deferral. For most investors, the time value of keeping that tax money invested for years outweighs the eventual higher tax bill.

Complete Worked Example: Full Exchange vs. Partial Exchange

Scenario

You purchased a residential rental property in 2014 for $800,000, with $10,000 in qualifying closing costs. Land value: $162,000 (20%). You claimed $235,000 in depreciation over 10 years. You made a $40,000 roof replacement in 2018. You have a $300,000 mortgage. You sell in 2025 for $1,400,000 with $70,000 in selling costs.

Your Adjusted Basis

ItemAmount
Purchase price + closing costs$810,000
+ Roof replacement (2018)$40,000
− Accumulated depreciation (building + roof)−$235,000
Adjusted basis$615,000

Your Realized Gain

ItemAmount
Sale price$1,400,000
− Selling costs−$70,000
Net sale price$1,330,000
− Adjusted basis−$615,000
Realized gain$715,000

Scenario A: Full Deferral (No Boot)

You buy a replacement property for $1,500,000 with a $400,000 mortgage, reinvesting all net equity.

TestCalculationBoot
Price test$1,330,000 net sale − $1,500,000 replacement = negative$0
Equity test$300,000 old mortgage − $400,000 new mortgage = negative$0
Total boot$0
Recognized gain = lesser of $0 (boot) or $715,000 (realized gain) = $0
Deferred gain = $715,000
Replacement basis = $1,500,000 − $715,000 = $785,000
Tax owed this year: $0

Scenario B: Partial Exchange (With Boot)

You buy a replacement property for $1,200,000 with a $250,000 mortgage, and pocket $60,000 in cash from the QI.

TestCalculationBoot
Price test (cash boot)$1,330,000 − $1,200,000$130,000
Equity test (mortgage boot)$300,000 − $250,000$50,000
Total boot$180,000
Recognized gain = lesser of $180,000 (boot) or $715,000 (realized gain) = $180,000
Deferred gain = $715,000 − $180,000 = $535,000
Replacement basis = $1,200,000 − $535,000 = $665,000

Step 6: The Full Tax Breakdown on Boot

The $180,000 of recognized gain in Scenario B is taxed in a specific order: depreciation recapture fills first, then capital gains, then NIIT stacks on top.

Tax LayerAmountRateTax
Depreciation recapture (Section 1250)$180,000 (fully within $235K accumulated)25%$45,000
Capital gains (remaining boot)$0 (boot didn't exceed depreciation)15%$0
Net Investment Income Tax$180,000 (MAGI > $250K MFJ)3.8%$6,840
State income tax (5% assumed)$180,0005%$9,000
Total tax on boot$60,840

The entire $180,000 of recognized gain falls within the depreciation recapture bucket because accumulated depreciation ($235,000) exceeds the recognized gain. This means the entire amount is hit at the 25% recapture rate — not the lower 15% capital gains rate.

Side-by-Side: Selling Outright vs. 1031 Exchange

ItemSell OutrightFull 1031Partial 1031
Realized gain$715,000$715,000$715,000
Recognized gain$715,000$0$180,000
Deferred gain$0$715,000$535,000
Recapture tax (25% on $235K depr.)$58,750$0$45,000
Capital gains tax (15% on $480K)$72,000$0$0
NIIT (3.8%)$27,170$0$6,840
State tax (5%)$35,750$0$9,000
Total tax owed$193,670$0$60,840
Tax savings from exchange$193,670$132,830

A full 1031 exchange saves this investor $193,670 in immediate taxes. Even the partial exchange — where they extracted $180,000 in boot — saves $132,830 compared to selling outright. That's money that stays invested, compounding over time.

Sequential Exchanges: How Prior 1031 Carryover Basis Works

If the property you're selling was itself acquired through a prior 1031 exchange, your adjusted basis carries over from the original property — not from the purchase price of the current one. This is the carryover basis principle, and it compounds with each exchange.

Example: Sequential 1031 Exchanges

You bought Property A for $300,000. After depreciation, your adjusted basis was $220,000. You exchanged into Property B (FMV $500,000) with full deferral. Your basis in Property B is $220,000 — not $500,000. The $280,000 deferred gain carries forward.

Years later, you exchange Property B (now worth $800,000, basis eroded to $180,000 after more depreciation) into Property C (FMV $900,000). Your basis in Property C is $180,000. The deferred gain from Property A and Property B — now $720,000 — sits embedded in Property C's basis.

If you sell Property C outright for $900,000, you owe tax on $720,000. If you exchange again, the deferral continues. If you hold until death, your heirs receive a stepped-up basis at fair market value, and the entire deferred gain is eliminated permanently under IRC §1014.

This is why serial 1031 exchangers track their basis meticulously across properties. Your "basis story" can span decades and multiple properties, and losing track of it means underreporting or overreporting gain when the chain eventually breaks.

What If You Never Claimed Depreciation? The Form 3115 Fix

Under the "allowed or allowable" rule (IRC §1016(a)(2)), the IRS reduces your basis by the depreciation you were entitled to claim — whether or not you actually took it. This means you owe recapture on depreciation you never deducted, and your adjusted basis is lower than you think.

The fix: file IRS Form 3115 (Application for Change in Accounting Method) and take a Section 481(a) adjustment. This lets you recover all missed depreciation in a single tax year without amending prior returns. The correction should be filed before you sell — ideally in the tax year preceding the sale — so you capture the deductions before the recapture event.

This is not optional. If you've owned a rental property for 10 years without claiming depreciation, you've missed roughly $36,400 per year in deductions on a $250,000 depreciable basis — over $364,000 total. At a 24% tax bracket, that's $87,360 in lost tax savings. And you'll still owe recapture on the full $364,000 when you sell.

The Mid-Month Convention: Partial-Year Depreciation

Real property (buildings) under MACRS uses the mid-month convention, not the half-year convention. This means the IRS assumes the property was placed in service in the middle of the month you acquired it, and disposed of in the middle of the month you sold it.

If you purchased a residential rental on March 15, the IRS treats the acquisition as occurring on March 15.5 (the middle of March). You get half a month of depreciation for March, then full months for April through December — 9.5 months of depreciation in Year 1.

At disposition, the same applies. If you sell in September, you get 8.5 months of depreciation for that year (January through mid-September). This affects your final-year depreciation and, consequently, your total accumulated depreciation at sale.

For personal property identified through a cost segregation study (appliances, carpeting, land improvements), the half-year convention applies instead — you get half a year of depreciation in both the first and last year of ownership.

Frequently Asked Questions

What happens if I didn't claim depreciation — do I still owe recapture tax?

Yes. Under the "allowed or allowable" rule (IRC §1016(a)(2)), the IRS treats you as if you claimed depreciation whether you did or not. Your basis is reduced by what you were entitled to deduct. File Form 3115 before selling to recover the missed deductions and correct your depreciation going forward.

How do I calculate boot if my replacement property costs less than my relinquished property?

The difference between the net sale price and the replacement property's purchase price is cash boot. Run a second test: if your new mortgage is smaller than the old one, the difference is mortgage boot. Both are taxable. You can offset mortgage boot by adding outside cash, but extra debt cannot offset cash boot (the asymmetry principle).

What is my new depreciation basis after a 1031 exchange?

Your replacement property basis equals the purchase price minus the deferred gain. This lower basis is split into two schedules: carryover basis (continuing the old property's remaining depreciation) and excess basis (any additional investment, starting a new 27.5-year schedule). Both are allocated between land and building.

Can I do a 1031 exchange if my property was acquired through a previous 1031 exchange?

Yes. Sequential exchanges are common. Your adjusted basis carries forward from the original property — not the purchase price of the current one. The deferred gain compounds with each exchange. Chaining exchanges until death allows heirs to receive a stepped-up basis, eliminating all deferred gain permanently.

What is the difference between mortgage boot and cash boot?

Cash boot occurs when you don't reinvest all proceeds — the replacement costs less than the net sale price. Mortgage boot occurs when your new debt is less than your old debt — the IRS treats debt relief like receiving cash. Both are taxable. They're calculated independently with separate netting rules.

Do I need a cost segregation study before doing a 1031 exchange?

Not required, but it can help. A cost segregation study reclassifies building components into shorter depreciation schedules (5, 7, or 15 years), accelerating deductions. On the relinquished property, it helps calculate total accumulated depreciation accurately. On the replacement, it maximizes future depreciation. Be aware that Section 1245 property identified through cost segregation may be recaptured at ordinary income rates (up to 37%), not the 25% Section 1250 rate.

What happens to my deferred tax when I die?

Under IRC §1014, your heirs receive the property at its fair market value — the stepped-up basis — as of the date of death. This eliminates all accumulated deferred gain, depreciation recapture, and capital gains. The deferred tax is never paid. This is one of the most powerful benefits of serial 1031 exchanges held through a lifetime.

Bottom Line

The math behind a 1031 exchange is sequential and deterministic: adjusted basis → realized gain → boot (price test + equity test) → recognized gain → replacement basis → tax breakdown. Every step feeds the next. Get the adjusted basis wrong — especially by missing depreciation or ignoring the allowed-or-allowable rule — and every number downstream is wrong. Run both the price test and equity test for boot. Remember the asymmetry principle. And always build the side-by-side comparison: the tax you'd owe selling outright vs. the tax after the exchange. That delta — often six figures — is the number that justifies the complexity.