Can someone walk through a 1031 exchange calculation example?

Sold a rental duplex earlier this year and my CPA mentioned a 1031 exchange to defer the gain, but I want to understand the actual numbers before our next meeting. The property sold for $410,000. I originally paid $280,000, took about $45,000 in depreciation over the years, and I'm under contract on a replacement property at $395,000. I've read a few articles but they all skip the part where you figure out realized gain, recognized gain, and the new basis in the replacement property. I keep second-guessing whether I'm using the right starting numbers. Can someone walk through a 1031 exchange calculation example with something close to these figures so I know what I'm actually looking at on Form 8824?

35 comments

I went through one last year so let me try to lay out the basic structure. Your realized gain starts with amount realized (selling price minus selling costs) minus your adjusted basis. Adjusted basis is what you paid plus improvements minus all depreciation claimed. So if you paid $280k and claimed $45k depreciation, your adjusted basis is $235k before you factor in any closing costs you capitalized. The realized gain is the difference between what you netted on the sale and that $235k.

Jordan G.

Author

That depreciation piece is what I kept getting wrong — I was using the original purchase price instead of the adjusted basis. That changes the gain number significantly.

Yes, exactly. And that $45k of depreciation doesn't disappear even in a 1031 — it carries into the replacement property's basis, which is why the deferred gain follows you.

The key split in a 1031 is between realized gain and recognized gain. Recognized gain is what you actually pay tax on NOW. If you reinvest everything — all equity, all proceeds — into equal or greater value replacement property, recognized gain can be zero. The moment you take cash out (boot) or buy down in price, you recognize gain up to the amount of boot received. Form 8824 Part III walks through this line by line.

Jordan G.

Author

So since my replacement is $395k and my sale was $410k, the $15k difference would be boot and I'd recognize gain on that $15k even if everything else is clean?

Yes, that's the basic idea. The $15k price difference could create $15k of recognized gain, but you recognize only up to your total realized gain — whichever is less. Your CPA will want to confirm the net figures after closing costs on both sides.

I did a 1031 two years ago and the basis calculation in the replacement property is where I nearly made a mistake. I uploaded my closing statements and the draft Form 8824 to taxr.ai and had it walk through each line of Part III with my actual numbers. It flagged that I hadn't reduced the exchange basis by the deferred gain correctly. The rule: replacement basis equals cost of new property minus deferred gain. So if your new property is $395k and you defer $120k of gain, your starting depreciation basis in the new property is $275k, not $395k.

Jordan G.

Author

This is the part my CPA glossed over. So the deferred gain lives in the lower basis and you recapture it when you eventually sell the replacement — or do another 1031?

Exactly right. Each time you 1031, the deferred gain rides in the basis of the next property. It only gets taxed when you sell without exchanging — or at death, where heirs may get a stepped-up basis and the deferred gain could disappear entirely.

Don't forget depreciation recapture sits on top of this. That $45k you claimed over the years is taxed as unrecaptured Section 1250 gain, at a maximum 25% rate, when you eventually sell without a 1031 — it doesn't just blend into the capital gain. Even in a 1031 it carries into the replacement property's basis, keeping the recapture exposure alive.

Yes, and unrecaptured Section 1250 gain has its own rate treatment — it's not the same rate as long-term capital gain. Worth flagging this to your CPA because it affects how big the eventual tax bill is if you ever exit without exchanging.

Jordan G.

Author

I didn't realize the recapture was tracked separately inside the deferred gain. My CPA is going to need to break that out for me on the 8824.

The 45-day and 180-day deadlines are real and strict in a 1031. I know you asked about the calculation, but the timing rules have tripped up more people I know than the math has. You identify replacement property within 45 days of closing your relinquished property, and the exchange must close within 180 days. Missing either kills the exchange and makes the whole gain taxable.

Jordan G.

Author

Already past the 45-day ID deadline in my case — the replacement property was identified on time. Just trying to get the numbers right before we close on it.

Good, that's the hard part. The 180-day clock runs from your sale date, not from when you identified, so confirm exactly when that closes.

The realized gain calculation in your situation would be roughly: amount realized (let's say $410k minus maybe $12k selling costs = $398k) minus adjusted basis ($280k minus $45k depreciation = $235k) = realized gain around $163k. That's just illustrative but the structure is right. Form 8824 Line 19 is where realized gain lands.

Worth noting Line 19 on Form 8824 is the "realized gain" line and Line 23 is the "recognized gain" — the difference between them is what you're deferring. The carryover basis then flows to your new property.

Something I learned the hard way: if you have a mortgage on the relinquished property, the loan payoff counts as "debt relief" and the IRS treats it as boot if the replacement property doesn't have an equal or larger mortgage. You can offset debt-relief boot with cash you bring in, but you can't offset cash boot with new debt.

Jordan G.

Author

There is a mortgage on the duplex — about $190k left. So I need to either carry at least that much debt on the replacement or bring extra cash to the table?

Yes, that's exactly the rule. If the replacement mortgage is less than $190k, the difference is boot. Talk to your QI about how to structure the closing to avoid an unintended taxable piece.

I had a similar structure last spring — relinquished property with leftover mortgage, replacement slightly lower in value. I pasted both HUD-1 settlement statements and my tentative 8824 numbers into Taxr and it built a side-by-side worksheet showing realized gain, recognized gain, the debt-relief boot calculation, and the carryover basis. Helped me catch that my QI had the boot number wrong before we finalized anything.

Jordan G.

Author

The debt-relief boot piece you mentioned is exactly where I'm worried about. I'll look at that before closing.

Just to be clear on basis in the replacement: the carryover basis formula is cost of replacement property MINUS deferred gain. Some people think you just take the old basis and add it forward, but that's not right. The deferred gain is the lever. And then you depreciate that lower basis over 27.5 years for residential rental property under MACRS.

Yes, 27.5 years on the structure for residential rental — but the carried-over basis keeps depreciating over the old property's remaining recovery period, and only any excess basis starts a fresh 27.5-year schedule when you place the replacement in service, unless you elect out.

My exchange closed fine but I filed the 8824 wrong in the first year — I put the full replacement property cost as the new basis instead of cost minus deferred gain. The IRS didn't catch it immediately but the wrong basis was generating inflated depreciation deductions every year. Had to file an amended return when I figured it out.

Jordan G.

Author

That is exactly the kind of error I'm trying to avoid. Does the qualified intermediary give you a summary document that feeds into the 8824?

Mine gave a closing summary but it only showed exchange proceeds, not the gain calculation or the adjusted basis numbers. I had to assemble Form 8824 myself using the QI summary plus my original purchase records.

Worth mentioning: the 1031 only defers federal tax. Some states don't conform to IRC Section 1031, or have their own clawback rules when you sell a California property and buy in Nevada, for example. Your CPA needs to check state treatment separately — it can create a state tax bill even when your federal gain is fully deferred.

Yes, California is the one that bites people most often here — they have a tracking requirement that follows the deferred gain across state lines. Not a reason to skip the exchange, but definitely a conversation for a CPA who knows both states.

I always tell people to get the qualified intermediary agreement reviewed before they sign it. Some QI contracts have indemnification clauses that limit your remedies if they mess up your exchange timeline or misplace funds. It's not a tax question exactly but a bad QI can cost you the entire exchange.

On the Form 8824 itself: Part I covers identification and timing, Part II handles related-party exchanges if applicable, and Part III is where the actual gain calculation lives — realized gain, recognized gain, and the basis of the replacement property. If you've never filled one out, the Part III instructions are worth reading slowly because the lines build on each other.

Jordan G.

Author

I pulled up the 8824 instructions last night and Part III is denser than I expected. Lining it up against the example numbers people posted here made it click a lot more.

One scenario worth checking: if you paid any closing costs on the replacement property out of exchange funds, those reduce the amount you're treated as reinvesting. If you paid them outside the exchange from personal funds, the treatment can differ. QI should be able to clarify but it flows into whether you have any boot.

Pulling this together: realized gain = amount realized minus adjusted basis. Recognized gain = lesser of realized gain or net boot received. Deferred gain = realized minus recognized. Replacement basis = cost of new property minus deferred gain. That's the 1031 exchange calculation in four lines. Everything else — recapture, debt relief, state tax — layers on top of that core structure.

Jordan G.

Author

This is the clearest summary in the thread. I'm going into my CPA meeting with the 8824 open and these four lines written down. Thank you everyone.