How to Calculate Deferred Gain on a 1031 Exchange

To calculate the deferred gain on a 1031 exchange, subtract any recognized gain from your total realized gain. Realized gain is the amount you received for the relinquished property minus its adjusted basis. Recognized gain is the taxable portion, equal to the lesser of your realized gain or the net boot (cash or debt relief) you took out of the deal. Whatever is left after that subtraction is what you defer, and it gets embedded in a reduced basis on the replacement property.1Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment Four steps get you there, and each one feeds the next.

Step One: Find Your Total Realized Gain

Total realized gain is the ceiling. You will never owe tax on more than this figure from the exchange, no matter how the rest of the numbers land.

Adjusted Basis

Start with what you originally paid, including acquisition costs like title insurance, recording fees, and transfer taxes. Add capital improvements made during ownership: a new roof, an addition, a full HVAC replacement. Routine maintenance does not count.

Then subtract all the depreciation you claimed, or should have claimed, while you owned the property. Residential rental uses straight-line depreciation over 27.5 years; commercial property uses 39 years.2Internal Revenue Service. Form 4562 Depreciation and Amortization Even if you skipped depreciation on your returns, the IRS reduces your basis as if you had taken it. You lose the deduction; you don’t preserve the basis.

Example: you bought a rental for $300,000, spent $50,000 on capital improvements, and claimed $80,000 in depreciation. Adjusted basis is $300,000 + $50,000 − $80,000 = $270,000.

Amount Realized

Amount realized is the gross sale price minus direct selling expenses (broker commissions, attorney fees, title charges, and similar closing costs on the sale side). If the property sold for $800,000 and you paid $50,000 in selling expenses, your amount realized is $750,000.

The Formula

Total realized gain = amount realized − adjusted basis. In the running example: $750,000 − $270,000 = $480,000.1Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment

Step Two: Measure the Boot

Boot is anything you receive in the exchange that isn’t like-kind real property. It comes in two forms, and the recognized (taxable) gain equals the lesser of your total realized gain or the total net boot.3Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment – Section (b)

Cash Boot

If the sale of the relinquished property produces more proceeds than you spend on the replacement, the leftover cash is boot. A $20,000 check at closing is $20,000 in cash boot. Using exchange proceeds for anything outside the replacement property purchase (personal expenses, non-qualified repairs) creates cash boot too.

Mortgage Relief Boot

If you shed debt, the IRS treats the reduction as if you received cash. Sold a property with a $300,000 mortgage and only took on a $250,000 mortgage on the replacement? The $50,000 difference is debt boot.4eCFR. 26 CFR 1.1031(d)-2 – Treatment of Assumption of Liabilities Downsizing your mortgage without a plan to offset the difference generates a tax bill.

Netting the Boot

You are allowed to net boot on two ledgers that can also cross-offset each other:

  • Debt netting. Liabilities relieved are offset by liabilities you assume on the replacement. Only the net difference is boot.
  • Cash netting. Cash received is offset by new cash you put into the deal.
  • Cross-offsetting. Excess cash you contribute can wipe out net debt boot. Extra debt you take on can offset cash boot you received.4eCFR. 26 CFR 1.1031(d)-2 – Treatment of Assumption of Liabilities

Cross-offsetting is the useful planning lever. If you cannot find a replacement with enough debt to match what you’re shedding, writing a bigger check at closing solves the problem. The net figure that comes out of this step is your recognized gain, unless it exceeds realized gain, in which case recognized gain caps at the realized amount.

Step Three: Calculate the Deferred Gain

Deferred gain = total realized gain − recognized gain. If the realized gain is $480,000 and net boot is $75,000, the deferred gain is $405,000. If net boot somehow exceeded realized gain (say $500,000 in boot against a $480,000 gain), recognized gain caps at $480,000 and deferred gain is zero.3Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment – Section (b)

To defer the entire gain and recognize nothing, you have to hit two targets. The replacement property’s total purchase price must equal or exceed the amount realized on the relinquished property, and you must take on equal or greater debt (or make up the shortfall with cash). Miss either target and boot appears.5Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031

Step Four: Set the Replacement Property Basis

The deferred gain does not vanish. It rides into the replacement property as a reduced basis, which is what makes the tax eventually come due when you sell the replacement in a taxable transaction. Two methods produce the same number.6Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment – Section (d)

Subtraction Method

Replacement property basis = total purchase cost − deferred gain. Buy a replacement for $950,000, defer $405,000, and the new basis is $545,000. You paid $950,000, but the IRS treats it as $545,000 for depreciation and future gain.

Addition Method

This is the statutory approach. Start with the adjusted basis of the relinquished property, subtract any money received (cash and liabilities relieved), add any gain recognized on the exchange, and add any new liabilities assumed or additional cash paid.4eCFR. 26 CFR 1.1031(d)-2 – Treatment of Assumption of Liabilities The IRS uses this method in its regulations and on Form 8824, so running it alongside the subtraction method is a useful cross-check.

The practical consequence: annual depreciation on the replacement is calculated from the lower basis, not the price you paid. Smaller write-offs each year are part of how the IRS eventually recoups what you deferred.

The Recapture Character Rides Along

Not every dollar of deferred gain is taxed the same when it is finally recognized. The portion attributable to depreciation you previously claimed, called unrecaptured Section 1250 gain, is taxed at a maximum federal rate of 25%.7Internal Revenue Service. Topic No. 409, Capital Gains and Losses Gain above that is taxed at the applicable long-term capital gains rate, generally 15% or 20%.

In the running example, $80,000 of the $480,000 realized gain came from depreciation. A 1031 exchange defers both the recapture portion and the ordinary capital gain portion, but it does not reclassify them. When the replacement property is eventually sold in a taxable transaction, the recapture amount still faces the 25% rate. Investors running a chain of exchanges over decades can accumulate substantial recapture, so cumulative depreciation across properties has to be tracked.

What Can Void the Whole Calculation

Every number above assumes the exchange itself is valid. A few requirements, if missed, disqualify the exchange entirely and make the full gain immediately taxable.

Two hard deadlines. Both run from the day you transfer the relinquished property, and neither bends for weekends or holidays. You must identify replacement property in writing within 45 calendar days, delivered to your qualified intermediary or another party to the exchange. And you must close on the replacement within 180 calendar days of the transfer, or by the due date (including extensions) of your tax return for that year, whichever comes first.8Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment – Section (a)(3)

No touching the money. If you have actual or constructive receipt of the sale proceeds at any point between selling and buying, the exchange fails. A qualified intermediary must hold the funds under a written exchange agreement that limits your ability to receive, pledge, borrow against, or otherwise benefit from them.9eCFR. 26 CFR 1.1031(b)-2 – Safe Harbor for Qualified Intermediaries10Internal Revenue Service. Rev. Proc. 2003-39 Anyone who has acted as your employee, attorney, accountant, broker, or real estate agent within the prior two years cannot serve as your intermediary.

Related-party trap. Exchanging with a related party triggers a two-year holding requirement on both sides. If either party disposes of the property inside that window, the deferred gain snaps back and becomes taxable in the year of the early disposition.11Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment – Section (f)

Reporting on Form 8824

Every 1031 exchange is reported on IRS Form 8824 (Like-Kind Exchanges), filed with your return for the year the relinquished property was transferred.12Internal Revenue Service. About Form 8824, Like-Kind Exchanges The form asks for the description and dates of both properties, the amount realized, the adjusted basis, any boot received, the recognized gain, the deferred gain, and the basis of the replacement property. In other words, it walks through the same four steps above.13Internal Revenue Service. Instructions for Form 8824 (2025) If the exchange straddles two tax years (sold in December, closed in March), file Form 8824 in both years.