Skip to content

Worked example

A 1031 Exchange, Worked Through With Real Numbers

One duplex, bought in 2009 and sold in 2026. This is how a 1031 exchange works in numbers rather than in principle — every figure below is arithmetic you can follow and check against your own deal.

The Easy1031 Exchange DeskReviewed September 3, 202610 min read

The short answer

A duplex bought for $420,000 and sold for $1,400,000, after $210,000 of depreciation, produces a realised gain of $1,022,000 and a combined tax bill of roughly $305,000 if sold outright. A full 1031 exchange defers all of it. Taking $100,000 out instead makes only that $100,000 taxable — roughly $34,000 — and defers the rest.

The property and the numbers

A two-unit rental in a mid-sized market, held for seventeen years. The figures are round for legibility, but the structure of the calculation is exactly the one your CPA will run.

The relinquished property
ItemAmount
Purchase price, 2009$420,000
Capital improvements since$68,000
Depreciation claimed over 17 years$210,000
Sale price, 2026$1,450,000
Closing costs and commission$50,000
Mortgage paid off at closing$310,000

Step 1: work out the gain

Gain is measured against your adjusted basis, not against what you paid. Adjusted basis is the purchase price, plus improvements, minus every dollar of depreciation you have claimed.

Calculating adjusted basis and realised gain
LineCalculationAmount
Purchase price$420,000
Plus capital improvements+ $68,000$488,000
Less depreciation claimed− $210,000$278,000
Adjusted basis$278,000
Sale price$1,450,000
Less closing costs− $50,000$1,400,000
Net sale price$1,400,000
Realised gain$1,400,000 − $278,000$1,022,000

Step 2: work out the tax at stake

The gain is not taxed at a single rate. It splits into the portion attributable to depreciation, which is recaptured at up to 25%, and the rest, which is long-term capital gain. Add the net investment income tax and state tax on top.

Assume a filer in the 20% federal capital gains bracket, subject to the 3.8% net investment income tax, in a state with a 5% rate.

Tax due on an outright sale
ComponentAmount taxedRateTax
Depreciation recapture$210,00025%$52,500
Long-term capital gain$812,00020%$162,400
Net investment income tax$1,022,0003.8%$38,836
State capital gains$1,022,0005%$51,100
Total if sold outright$304,836

Roughly $305,000 — about 30% of the gain, and around 22% of the entire sale price. That is the money a 1031 exchange keeps working in the next property instead of sending to the IRS and the state.

Step 3: what the replacement must clear

For a complete deferral the replacement has to satisfy all three tests at once.

The three thresholds for full deferral
TestThresholdWhy
Purchase priceAt least $1,400,000Equal to or greater than the net sale price
Cash reinvestedAll $1,090,000Net proceeds after the $310,000 mortgage payoff
Debt replacedAt least $310,000New borrowing, or additional cash of your own

Scenario A: a full exchange

You buy a small apartment building for $1,525,000 with $1,090,000 of exchange proceeds and a new $435,000 mortgage. All three tests clear comfortably: the price exceeds $1,400,000, every dollar of proceeds is reinvested, and the new debt exceeds the old.

Scenario A — full deferral
ItemAmount
Replacement purchase price$1,525,000
Exchange proceeds applied$1,090,000
New mortgage$435,000
Boot received$0
Tax due now$0
Gain deferred$1,022,000

Scenario B: taking $100,000 out

Now suppose you want $100,000 in your pocket — to pay down other debt, or simply because you want it. You buy the same building but instruct the intermediary to release $100,000 to you at the end of the exchange.

That $100,000 is cash boot. It is taxable, but only that $100,000. The other $922,000 of gain stays deferred.

Scenario B — partial exchange with $100,000 of cash boot
ItemAmount
Exchange proceeds applied$990,000
Cash taken out (boot)$100,000
Boot taxed first as recapture, at 25%$25,000
Net investment income tax on boot, 3.8%$3,800
State tax on boot, 5%$5,000
Tax due now$33,800
Gain still deferred$922,000

The carryover basis afterwards

In Scenario A your basis in the $1,525,000 building is not $1,525,000. Your old adjusted basis of $278,000 carries over, increased by the additional value you took on.

Practically, that means two things. Your future depreciation deductions are calculated on the lower carryover basis, so they are smaller than they would be on an outright purchase. And the deferred gain is still there, waiting — it comes due whenever you eventually sell without exchanging again.

Under current law, if you hold the property until death your heirs receive a stepped-up basis at fair market value and the deferred gain is effectively eliminated. That is the arithmetic behind the phrase swap till you drop, and it is why investors chain exchanges for decades. The glossary defines the terms used here.

Questions about the numbers

How do you calculate the gain on a 1031 exchange?

Start with the net sale price after closing costs, then subtract your adjusted basis — what you paid, plus capital improvements, minus all depreciation claimed. The result is your realized gain. Note that gain is measured against the depreciated basis, not the purchase price, which is why long-held rentals often have far larger gains than owners expect.

Why is depreciation recapture taxed separately?

Because you already received a benefit from it. Depreciation deductions reduced your taxable income each year you owned the property, and they also reduced your basis. On sale, the portion of gain attributable to that depreciation is recaptured at up to 25% rather than the lower long-term capital gains rate. A 1031 exchange defers recapture along with the rest of the gain.

What has to be true for a full deferral?

Three things at once: the replacement property must cost at least as much as the net sale price of what you sold, all of the net proceeds held by the intermediary must go into the purchase, and any debt paid off on the sale must be replaced with new debt or with additional cash. Fall short on any of them and the shortfall is taxable boot.

What happens if I take some cash out of the exchange?

That cash is boot, and it is taxable up to the amount of your realized gain — but only that amount. Taking $100,000 out of a deal with a $780,000 gain means you pay tax on $100,000 and the remaining $680,000 stays deferred. A partial exchange is a valid exchange; it is not all-or-nothing.

What is my basis in the new property?

Your old adjusted basis carries over, adjusted for any additional cash you put in and any boot you took out. It does not reset to the purchase price. That lower carryover basis is what preserves the deferred gain, and it also means your depreciation deductions going forward are smaller than they would be on an outright purchase.

Easy 1031

Run your own numbers with someone who does this daily

The Easy1031 exchange desk will walk through your figures before you commit to anything — and a standard forward exchange costs $0 to set up.

Easy1031 publishes this guide. It is a qualified intermediary, so it has a commercial interest in you starting an exchange — worth weighing, and worth comparing against other intermediaries before you commit.