To calculate a 1031 exchange, find your realized gain (sale price minus selling costs minus adjusted basis), then your boot (cash you take out plus any debt you don't replace). You pay tax now only on the boot, and the rest of the gain is deferred until you sell without exchanging again.
Key takeaways
- A 1031 exchange moves the tax on your gain to a later year, when you finally sell without exchanging again.
- Boot is the taxable part of an exchange: cash you receive plus debt relief that a new loan or cash you add doesn't cover.
- In our fourplex example, a regular sale costs $102,210 in tax, while a trade up to an $800,000 property defers all $395,000 of gain.
- To defer the whole gain, the replacement has to cost at least your net sale price, and you have to reinvest all of your equity.
- Your new basis is the replacement price minus the deferred gain, so depreciation on the new property starts from a lower number.
- You get 45 days to identify replacement property and 180 days to close, but a year-end sale can lose part of that window to your tax return due date.
The 1031 exchange formula
Every 1031 exchange calculator runs the same seven steps, and you can do them by hand:
- Adjusted basis = purchase price (with closing costs) + capital improvements − depreciation taken.
- Amount realized = sale price − selling costs.
- Realized gain = amount realized − adjusted basis.
- Boot = cash you receive + net debt relief, minus exchange expenses, never below zero. Net debt relief is the loan paid off at sale minus the new loan you take on and any cash you add.
- Recognized gain (taxed now) = the smaller of boot or realized gain.
- Deferred gain = realized gain − recognized gain.
- New basis = replacement price − deferred gain.
This is the same math as IRS Form 8824, the form you file for the exchange. Line 15 is boot, line 19 is realized gain, line 20 is recognized gain, line 24 is deferred gain and line 25 is your new basis. The IRS example there shows how debt nets out: Taylor trades a $220,000 building with an $80,000 mortgage for a $250,000 building with a $150,000 mortgage, plus $40,000 cash. Taylor's realized gain is $120,000, but only the $40,000 cash is taxed, because the $150,000 of new debt more than covers the $80,000 Taylor shed.
One rule before the math: only real property qualifies. Since the Tax Cuts and Jobs Act, Section 1031 covers real estate only, and property you hold mainly to resell doesn't count, per the IRS real estate tax tips page (last reviewed May 2026).
Worked example: a fourplex with a $395,000 gain
Here's an example deal. The investor is married filing jointly with $150,000 of other taxable income and pays a flat 5% state tax. Those are assumptions, so swap in your own numbers before you rely on any of this. The building was depreciated over 27.5 years, the schedule IRS Publication 527 uses for residential rentals.
Example: fourplex sale (Galleon example, not a quote)
| Item | Amount |
|---|---|
| Purchase price with closing costs (land $80,000, building $320,000) | $400,000 |
| Capital improvements | $30,000 |
| Depreciation taken ($11,636 a year for about 10.3 years) | −$120,000 |
| Adjusted basis | $310,000 |
| Sale price | $750,000 |
| Selling costs (6%) | −$45,000 |
| Amount realized | $705,000 |
| Realized gain ($705,000 − $310,000) | $395,000 |
| Mortgage paid off | $250,000 |
| Equity sent to the exchange | $455,000 |
Scenario A: what a regular sale costs
A taxable sale is taxed in layers. The depreciation you took comes back first as "unrecaptured section 1250 gain," taxed at up to 25% (IRS Topic 409). The rest is long-term capital gain. For 2026, joint filers stay in the 15% bracket until taxable income passes $613,700, per Rev. Proc. 2025-32. Our investor lands at about $545,000 ($150,000 plus the $395,000 gain), so 15% applies. The 3.8% net investment income tax hits the smaller of the gain or income above $250,000 for joint filers (IRS Topic 559). We treat income and MAGI as the same here to keep it simple.
Scenario A: tax on a regular sale (rates as of the 2026 tax year)
| Layer | Math | Tax |
|---|---|---|
| Depreciation (unrecaptured §1250) | $120,000 × 25% | $30,000 |
| Long-term capital gain | $275,000 × 15% | $41,250 |
| Net investment income tax | ($545,000 − $250,000) × 3.8% | $11,210 |
| State (example rate) | $395,000 × 5% | $19,750 |
| Total | $102,210 |
We used the full 25% on the depreciation layer to stay conservative, and your real rate on that slice may be lower. Even so, about 26% of the gain goes to tax, and the investor has $352,790 left to reinvest.
A regular sale leaves $352,790 for the next deal. A full exchange keeps all $455,000 working.
Scenario B: a full exchange into an $800,000 eight-unit
Here the investor trades up to an eight-unit building for $800,000. The qualified intermediary (QI) sends the full $455,000, and a new $345,000 loan covers the rest. Many small investors use a DSCR loan for this step, so check that the building's rent covers the new payment.
- Cash received: $0
- Net debt relief: $0 (the $250,000 paid off is less than the $345,000 new loan)
- Boot and recognized gain: $0
- Deferred gain: $395,000
- New basis: $800,000 − $395,000 = $405,000
On Form 8824, line 18 is the $310,000 basis plus the $95,000 of extra debt taken on, or $405,000. Line 19 is $800,000 − $405,000 = $395,000, which matches the realized gain. When those two agree, your math is right.
Watch out: Count closing costs once. In this deal, the $95,000 of extra debt already paid for the $45,000 of selling costs. Add those costs to line 18 again as exchange expenses and line 18 becomes $450,000, the gain drops to $350,000 on paper, and your new basis is $45,000 too high.
What deferral costs you later
The IRS fact sheet on like-kind exchanges puts it plainly: the gain is "tax-deferred, but it is not tax-free." Your basis in the new $800,000 building is $405,000, so your depreciation write-offs start from that lower number. Investors who grow a real estate portfolio through exchange after exchange carry that lower basis forward each time.
A full exchange can still create some tax. In the IRS's Form 8824 example, $35,000 of depreciated section 1245 components (the parts a cost segregation study pulls out) shows up as ordinary income on line 21. If you've done a cost seg study, bring it to your CPA early.
A tax deferral also won't rescue a weak property. Run the replacement through the same checks you'd use to analyze a rental property before you identify it.
Scenario C: trading down to a $650,000 property
Now the investor buys a smaller $650,000 building with $430,000 of the exchange money and a $220,000 loan. The QI sends the leftover $25,000 to the investor.
Scenario C: partial exchange (Galleon example, not a quote)
| Step | Amount |
|---|---|
| Cash received | $25,000 |
| Net debt relief ($250,000 − $220,000) | $30,000 |
| Boot, taxed now | $55,000 |
| Deferred gain ($395,000 − $55,000) | $340,000 |
| New basis ($650,000 − $340,000) | $310,000 |
We assume the boot is taxed first at the 25% depreciation rate, which is the conservative way to estimate it (confirm the order with your CPA). That's $13,750 federal plus $2,750 state, or $16,500. There's no net investment income tax, because income of about $205,000 stays under $250,000.
Look at what the smaller loan did. Of the boot, $30,000 is debt relief, so about $9,000 of the tax comes from money the investor never received, and $16,500 of the $25,000 check goes to tax.
There's a simple test for full deferral: the replacement has to cost at least your amount realized (here $705,000), and you have to reinvest all of your equity (here $455,000). The $650,000 building falls $55,000 short, which is exactly the boot. If you buy at a higher price but take a smaller loan, cash you add at closing offsets the debt relief, per the Form 8824 instructions.
The 45-day and 180-day deadlines
You must identify replacement property in writing within 45 days of selling, and close by day 180 or your tax return due date (with extensions), whichever comes first, per the Treasury regulations. If one exchange includes several sales, both clocks start at the earliest one.
That earlier-of rule catches year-end sellers. Here's a sale that closes Dec 15, 2026:
| Deadline | Date |
|---|---|
| Old property closes | Dec 15, 2026 |
| Day 45: identify in writing | Jan 29, 2027 |
| 2026 tax return due without extension | Mid-April 2027 |
| Day 180: replacement must close | Jun 13, 2027 |
Without an extension, this investor's window ends in mid-April, about two months early. File the extension and the full 180 days come back.
Identification rules
Your list must be in writing and signed, describe each property clearly (an address, legal description or distinct name) and go to someone who isn't a disqualified person, such as your QI. You also pick one of these limits:
- Up to 3 properties of any value.
- Any number of properties, if their total value is no more than 200% of what you sold. For the $750,000 fourplex, that's $1,500,000.
- More than either limit, but only if you actually buy at least 95% of the total value you listed.
Forty-five days goes fast, so start your search before the old property closes. Operator, Galleon's system of record for your properties, runs two agents: the Buy Box Agent and the Rent Monitoring Agent. The Buy Box Agent fits this job. You set the location, property type and signals you care about, and it checks on-market and off-market properties every day and sends you new matches, each with a 0 to 100 Buy Box score, so you have candidates to review before day one of the clock.
Last updated November 24, 2026. This is general information, not tax, legal or lending advice. The figures are illustrative and use simplified assumptions. Talk to your CPA, attorney, lender and a qualified intermediary before you sell or exchange property.
FAQ
What is the 95% rule in a 1031 exchange?
If you identify more properties than the 3-property rule or the 200% rule allows, your list only counts if you actually buy at least 95% of the total value you identified. Miss it and the exchange can fail.
What is the 2-year rule for a 1031 exchange?
It covers exchanges with related parties, such as a spouse, child, parent, sibling or related company. If either side sells the exchanged property within 2 years of the last transfer, the deferred gain becomes taxable that year, unless an exception applies (a death, an involuntary conversion or no tax-avoidance purpose). Section 1031 itself doesn't set a minimum holding period for regular exchanges. The test is that you held the property for investment or business use.
Can you do a 1031 exchange yourself?
You can do much of the legwork, but you can't touch the sale money. Funds count as received once they're credited to your account, set aside for you or made available for you to draw on, and that can make the gain taxable. That's why most deferred exchanges use a qualified intermediary. Your own agents and related parties can't be your QI, because the IRS calls them disqualified persons.
How much does a 1031 exchange cost?
There's no government figure. Each QI sets its own fees, and you'll still pay normal selling and buying costs. Get a written fee schedule, then count those fees once as exchange expenses in the formula.
Does a 1031 exchange avoid depreciation recapture?
It defers it if you take no boot. Boot can be taxed at up to 25% as unrecaptured section 1250 gain, and cost seg components can create ordinary income even in a full exchange.



