§1031 Like-Kind Exchange
"Swap till you drop. Then your heirs get the step-up and the IRS gets nothing. Forever-deferred is functionally tax-free."
The 60-second pitch
You bought a duplex in 2009 for $300K. It's now worth $1.1M. If you sell it, you owe roughly $190K in federal long-term capital gains tax plus depreciation recapture plus state — call it $220K out the door. Painful.
§1031 says: don't sell. Exchange. Roll 100% of the proceeds into a "like-kind" real estate property within strict deadlines, and you defer 100% of the tax. There's no cap. You can keep rolling forever.
The Tax Cuts and Jobs Act in 2017 narrowed §1031 to real property only (no more equipment, art, or crypto). But for real estate it's wide open — any investment or business real estate qualifies as "like-kind" to any other. A single-family rental swaps for a strip mall. A vacant lot swaps for an apartment building. The IRS doesn't care about the type — only that both legs are real property held for investment or business.
The endgame is "swap till you drop." Each exchange defers the gain. When you die, your heirs inherit at a stepped-up basis under §1014 — the deferred gain evaporates. Done at scale across a portfolio, §1031 is the legal version of "never paying capital gains."
Real-world example
The setup. Marcus owns an 8-unit apartment building he bought in 2014 for $850,000. Adjusted basis after 11 years of depreciation: $580,000. Fair market value today: $1,850,000.
The straight-sale tax. If he sold outright: $1,270,000 gain. Roughly $270K of that is unrecaptured §1250 gain taxed at 25%, and $1,000,000 is long-term cap gain at 20% federal. Plus 3.8% NIIT on most of it. Plus Arizona 2.5%. Total federal+state tax: ~$330,000. He pockets $1.52M minus selling costs.
The §1031 play. Marcus closes the sale on March 15, 2025 with a Qualified Intermediary (QI) holding the $1.85M in escrow. He never touches it. He identifies 3 candidate replacement properties in writing on April 22 (day 41 — under the 45-day wire). On August 10 (day 148 — under the 180-day wire), he closes on a 24-unit garden apartment in Tempe for $2.6M, using the QI funds plus a new $850K mortgage.
The basis math. His new basis in the Tempe property: $580K (the carryover basis from the old property) + $750K (the new debt over the old debt) = roughly $1.33M. The $1.27M of deferred gain rides along, embedded in the lower-than-FMV basis. He'll depreciate from $1.33M, not $2.6M, but until he sells without a 1031 he never owes the tax.
The endgame. Marcus does this again at age 65 (selling the 24-unit into a 40-unit), then again at 72. He dies at 81 owning a $14M building with $9M of deferred gain. His daughter inherits at $14M stepped-up basis under §1014. The $9M of deferred gain disappears. Forever-tax-free.
The step-by-step checklist
- Confirm the property qualifies. Must be "held for productive use in a trade or business or for investment." Personal residence: no (use §121 instead). Flip property: no (it's inventory). True rental or investment property: yes.
- Engage a Qualified Intermediary (QI) BEFORE closing the sale. The QI holds the proceeds in escrow. You must not constructively receive the money — touching it for even a moment kills the exchange. Big QIs: IPX1031, Asset Preservation, First American Exchange. Fees: $1,000–$2,500.
- Insert the §1031 cooperation clause in the relinquished-property sale contract. Standard 2-sentence clause that obligates buyer to cooperate with the exchange (it costs them nothing).
- Close the sale. Proceeds wire directly to the QI's segregated escrow account. From this moment, two clocks start ticking simultaneously.
- Identify replacement property in writing within 45 days. Hand-delivered or mailed to the QI. Three rules (use whichever helps): 3-property rule (any 3 properties, any value); 200% rule (any number of properties, total FMV ≤ 200% of relinquished); 95% rule (any number of properties, you must close on 95% of identified FMV).
- Close on replacement property within 180 days of the original sale. The clock includes the 45 days — they run concurrently, not consecutively. No extensions except for federally-declared disasters (rare; check IRS notices each year).
- Match or exceed the value AND the debt. To defer 100%, the replacement must have: (a) FMV ≥ relinquished sale price, AND (b) debt assumed ≥ debt released. Cash you take out is "boot" and taxable. Debt relief not offset by new debt is "mortgage boot."
- Use 100% of the proceeds. Any cash held back is "cash boot" — taxable to the extent of gain. Even $1 of boot doesn't blow the whole exchange, just creates partial gain recognition.
- If using a related party (sibling, parent, your LLC), both must hold for 2 years.
§1031(f)— if either party sells within 2 years of the exchange, the deferral is retroactively disqualified. Tricky territory; avoid unless necessary. - File Form 8824 with the tax return for the year of the relinquished sale. Reports the exchange, the QI, the dates, and the basis calculation. If the 180-day close crosses year-end, you may need to elect out of installment treatment.
- Keep all closing statements + QI escrow records 7 years. The basis carries forward forever — your great-grandchildren may need this paperwork to compute their basis on a future sale.
- Optional: stack with cost segregation on the replacement property. A study can carve the new basis into 5/15/27.5-year buckets and unlock fresh bonus depreciation under §168(k) — even on the lower carryover basis.
IRS code & authority
- §1031(a) The core deferral rule. "No gain or loss shall be recognized on the exchange of real property held for productive use in a trade or business or for investment if such real property is exchanged solely for real property of like kind."
- §1031(a)(3) The 45-day identification and 180-day exchange period rules.
- §1031(f) Related-party rule. 2-year holding requirement to prevent basis-shifting between family/affiliates.
- §1031(h) Foreign real property is NOT like-kind to U.S. real property. Can swap U.S. for U.S., or foreign for foreign, never crossing the border.
- Reg §1.1031(k)-1 The 1991 "safe harbor" regulations defining QIs and the deferred exchange procedure. Most exchanges today are "delayed Starker exchanges" using these safe harbors.
- §1014 Step-up basis at death. The reason "swap till you drop" works — heirs inherit at FMV, deferred gain extinguished.
- §1411 Net Investment Income Tax (3.8%). NIIT applies to any boot recognized in an exchange.
- Form 8824 Like-Kind Exchanges. Filed with the return for the year the relinquished property was sold.
- Rev. Proc. 2002-22 Tenancy-in-common (TIC) interests as §1031-eligible. Used to combine multiple investors' funds in a replacement.
- Rev. Proc. 2000-37 Reverse exchanges — buying the replacement before selling the relinquished, with an Exchange Accommodation Titleholder.
Audit risk flags
- Missing the 45-day identification. No grace period. Day 46 = exchange fails = full taxable sale. Defense: Identify on day 30. Have backups in writing. Use the 3-property rule unless you have a specific reason not to.
- Missing the 180-day close. Same brutality. Defense: Get under contract on day 60 with a 90-day close. Build margin.
- Constructive receipt of funds. Even briefly. Even by your LLC. Even "I'll just hold it overnight." Kills the exchange. Defense: Wire instructions go straight to the QI from the closing table. Verify the title company has them.
- Disqualified QI. Your tax professional, attorney, real estate agent, employee, or someone you've used in those roles in the past 2 years CANNOT be your QI under
Reg §1.1031(k)-1(k). Defense: Use a national independent QI firm. - Boot received unintentionally. Taking out cash at closing, paying off your old mortgage with non-replacement-property debt, or buying replacement at lower value. Defense: Trade equal or up in both value and debt.
- "Held for investment" challenge. If you 1031 into a property and move in 6 months later, the IRS can argue it wasn't "held for investment." Defense: Rent the replacement for at least 2 years (the IRS safe harbor in Rev. Proc. 2008-16) before any personal use.
- Related-party 2-year basis-shifting. Selling to your brother, then he sells to a third party 11 months later. The IRS unwinds the exchange. Defense: Avoid related-party exchanges; if essential, document arm's-length pricing and the 2-year hold by both parties.
- Foreign property mix-up. A U.S. investor exchanging a Florida condo for a Costa Rica condo gets a fully taxable sale, not a §1031. Defense: Know §1031(h).
When NOT to do this
- You want to retire and live off the money. 1031 is about deferral, not exit. If you need cash, just pay the gains. Strategies like the Qualified Opportunity Zone may serve better.
- Your gain is small. QI fees ($1.5K), legal fees, and the timeline stress cost real money. Under ~$100K of deferred tax, the math may not be worth it.
- You're selling your primary residence. Use §121 instead — up to $500K MFJ tax-free, no replacement required. Save §1031 for investment property.
- You're a flipper. Properties held primarily for sale (inventory) don't qualify. The IRS will look at your historical holding pattern. Less than ~12 months = high challenge risk.
- You bought less than 6 months ago. The "held for investment" intent test gets shaky on short holds. Wait at least a full year if you can.
- You want a different asset class. Real estate only since 2018. You can't 1031 into a business, equipment, or stock.
- The replacement property pipeline is dry. If you can't credibly identify a strong replacement in 45 days, you'll be forced into a bad deal. Don't list until you've scoped 5+ candidates.
Track your deferred gain across every exchange
PilePilot's Books agent maintains your basis carryforward across decades and Form 8824 filings — so when it's time for the next exchange (or your heirs need to know basis), the numbers are right. Built for real estate investors who hold for life.
Start your free trial →No credit card. Your data is private and isolated — export or delete it anytime.
Disclaimer. §1031 is unforgiving — a missed deadline turns a deferred exchange into a fully taxable sale. Always engage an experienced QI and a tax professional before you sign the listing agreement on the relinquished property, not after.