Skip to content
CRE Toolbox

Guide

1031 Exchange for Commercial Real Estate: How It Works

By Erik Egelko · Licensed CA Broker · $200M+ Closed · DRE #01984056

Published Nov 8, 2026 · Updated Nov 25, 202616 min read

A 1031 exchange lets you sell commercial real estate held for investment or business use and put off paying tax on the gain, as long as you buy other real estate held the same way and follow the deadlines: 45 days to identify the replacement and 180 days to close on it. On a building with $1,000,000 of gain, that can mean the whole $1,000,000 stays invested instead of part of it going to taxes this year. Before you start, model the replacement property's cash flow and loan in the CRE Simulator, because a deferred tax bill doesn't make a weak deal any better.

The deadlines get their own page, the 1031 exchange timeline, and California's extra filing rules are in 1031 exchanges in California. This is general information, not tax or legal advice; confirm your own exchange with a CPA, a qualified intermediary or a tax attorney.

What a 1031 Exchange Does

Two people looking at a brick apartment building on a tree-lined street
An exchange defers the gain into the next building; it doesn't forgive it.

Section 1031 of the Internal Revenue Code says no gain or loss is recognized when real property held for productive use in a trade or business or for investment is exchanged solely for real property of like kind that will be held the same way.

Three parts of that sentence decide most exchanges.

  • It defers, it doesn't forgive. Your basis in the old building carries into the new one, so the gain is still there. It's taxed when you sell the replacement in a taxable sale, unless you exchange again.
  • It's real property only. Since the 2017 tax law, exchanges are limited to real property. Furniture, equipment and other personal property sold with a building don't qualify, per the IRS.
  • It's for investment or business property. Property held primarily for sale, such as lots a developer builds and sells, doesn't qualify. Your own home doesn't either.

1031 Exchange Rules: The Short List

Every exchange has to clear these. Miss one and part or all of the gain is taxable.

  1. Both properties are real property held for investment or for use in a trade or business. Not a home, not property held primarily for sale.
  2. Both are in the United States (or both outside it). US and foreign real property aren't like-kind.
  3. You never receive the sale proceeds. In a delayed exchange, a qualified intermediary holds them under a written agreement.
  4. You identify the replacement within 45 days of the sale, in a signed writing.
  5. You receive it within 180 days, or by your tax return due date with extensions if that's earlier.
  6. The same taxpayer sells and buys. If your LLC sold, your LLC buys.
  7. You report it on Form 8824 with your return for the year of the sale.

Rules 4 and 5 are covered day by day in the 1031 exchange timeline. Rule 6 trips up owners who want to buy the replacement in a new entity for liability reasons; talk to your attorney before you set one up, because a disregarded single-member LLC is treated differently from a new partnership.

Types of 1031 Exchanges

TypeHow it worksWhen it's used
DelayedSell first, a QI holds the proceeds, buy within 180 daysThe common setup
SimultaneousBoth closings happen the same dayRare; hard to line up two escrows
ReverseAn exchange accommodation titleholder takes title to the replacement before you sell, under Rev. Proc. 2000-37 as the Form 8824 instructions describeYou found the replacement first
Improvement (build-to-suit)Exchange funds pay for construction on the replacement before you take titleThe replacement needs work to be worth what you sold

Reverse and improvement exchanges cost more and take more setup. If you think you'll need one, raise it with the QI before you sign a purchase contract.

What Counts as Like-Kind Real Estate

Aerial view of a warehouse, a small apartment building and vacant land
An apartment building, a warehouse and raw land can all be like-kind to each other.

For real estate, like-kind is broad. The Form 8824 instructions say properties are of like kind if they're of the same nature or character, even if they differ in grade or quality, and that improved and unimproved real estate are generally like-kind to each other.

So you can sell an apartment building and buy a warehouse, sell raw land and buy a medical office, or sell a retail strip and buy a net-leased restaurant. The limit is geography: real property in the United States and real property outside it aren't like-kind.

What doesn't count: stock, partnership interests and notes. That matters when you own a building through a partnership. The partnership can exchange the building, but a partner can't exchange a partnership interest for real estate. Splitting a partnership before a sale is a common planning problem and one to take to your tax adviser early.

Is It Like-Kind If I Change Property Types?

Yes, for US real estate. Here are combinations that come up often, with the answer under the Form 8824 instructions' test (same nature or character, improved and unimproved both count):

SellingBuyingLike-kind?
Apartment buildingIndustrial buildingYes
Retail strip centerSingle-tenant net lease propertyYes
Office buildingVacant land held for investmentYes
Rental house held for investmentSmall apartment buildingYes
Commercial buildingInterest in a qualifying DSTYes, if structured as in Rev. Rul. 2004-86
Commercial buildingLLC or partnership interest that owns a buildingNo
US buildingBuilding outside the United StatesNo
BuildingLots you'll subdivide and sellNo, property held primarily for sale

What changes when you switch types is the underwriting, not the tax. A buyer coming from apartments into a net lease property is trading many short leases for one long one, with different risks; see also how to underwrite industrial real estate and how to underwrite a retail strip center.

The Qualified Intermediary

Delayed exchanges are the common kind: you sell first and buy later, and you can't touch the sale proceeds in between. If you have the money, or the right to get it, the exchange fails.

That's why you use a qualified intermediary (QI). Under Treas. Reg. §1.1031(k)-1, a QI is someone who isn't you or a disqualified person, signs a written exchange agreement with you, and in effect takes the old property from you and delivers the new property to you. The agreement has to limit your rights to receive, pledge, borrow or otherwise get the benefit of the money before the exchange ends.

Who can't be your QI matters as much as who can. The regulation disqualifies anyone who has acted as your employee, attorney, accountant, investment banker or broker, or real estate agent or broker in the two years before the first sale closes, plus certain related people and entities. Services on the exchange itself, and routine title, escrow and bank services, don't count. Your own broker or CPA can't hold the money.

Sign the exchange agreement before the sale closes. Once escrow wires the proceeds to you, it's too late to start an exchange on that sale. And ask the QI, in writing, where the money sits until you buy and who can move it; for six months, that account holds most of your equity.

How to Defer All of the Tax

Full deferral comes down to two tests. Buy replacement property worth at least what you sold (after selling costs), and reinvest all of your net cash. If the replacement costs as much or more and all the equity goes in, the debt usually takes care of itself, because you'll need at least as much financing or extra cash to close.

That last line is the part people forget. Your depreciation on the new building starts from a lower basis than its price, because the deferred gain rides along with it.

How to Do a 1031 Exchange, Step by Step

  1. Run the numbers before you list. Ask your CPA for your adjusted basis, the realized gain and how much of it is depreciation. If the gain is small or you have a loss, an exchange may not be worth it.
  2. Pick a qualified intermediary and sign the exchange agreement before your sale closes. Tell escrow, so the proceeds go to the QI.
  3. Shop the replacement while your property is in escrow. Get rent rolls, leases and a T-12 on the candidates. Pre-screen the loan.
  4. Close your sale (day 0). Confirm the QI received the funds, and calendar day 45, day 180 and your return due date.
  5. Identify by day 45, in writing, signed, to the QI. Name a first choice and backups that each work.
  6. Close the replacement by day 180 (or the return due date). Buy at least what you sold, reinvest all the cash, and replace the debt or add cash.
  7. File Form 8824 with your return for the year of the sale, and extend the return if day 180 falls after its due date.

Boot: The Part That Gets Taxed

A hand sliding an envelope across a conference table
Cash you take out at closing is boot, and gain is taxed up to that amount.

Anything you receive that isn't like-kind real estate is called boot. Under IRC §1031(b), if you get cash or other property along with the replacement, gain is recognized up to the amount of that boot. Losses aren't recognized.

Cash boot is the obvious kind: money you keep, including sale proceeds used for things that aren't exchange costs. If you pull $100,000 out at closing, up to $100,000 of gain is taxable.

Mortgage boot is the one that surprises sellers. The Form 8824 instructions treat the excess of the liabilities you were relieved of over the liabilities you take on (plus any cash you add) as money received. Trade down in debt without adding cash, and the difference is taxed.

The fix in Example 2 would have been to buy a building of at least $1,900,000, or to bring $200,000 of your own cash to the purchase. Adding cash offsets debt relief; taking on more debt doesn't offset cash you keep.

How to Calculate Boot and Recognized Gain

Work it in this order. Your CPA does the official version on Form 8824; this is the version to run before you make an offer.

Realized gain = amount realized (price − selling costs) − adjusted basis

Net debt relief = debt paid off − new debt − your own cash added (not below zero)

Recognized gain = the smaller of realized gain and (cash and other boot kept + net debt relief)

Basis in the replacement ≈ replacement price − deferred gain

Rows D and E make the point people miss. In E, you took on $300,000 more debt than you paid off, and the $100,000 of cash you kept is still fully taxable boot. New debt never offsets cash you keep. Row C shows the opposite direction: your own cash added at closing does offset debt relief.

Row C also shows the trade-off of trading up with less debt. You defer everything, but you've put $150,000 of new money into the deal. That money has a cost too, so test the replacement's cash-on-cash return on all the equity in it, old and new, with the cash-on-cash calculator.

Replacing the Debt

Two people reviewing loan papers at a conference table
The lender sizes the new loan on the replacement's income, not on your needs.

On commercial property, the debt is usually the hardest part to replace. A lender sizes the new loan on the new building's income, not on your needs. If the replacement has a lower cap rate than the building you sold, it may not support a loan as big as the one you paid off, and you'll need to bring cash to avoid mortgage boot.

Check the loan before you identify. Run the replacement's NOI through the DSCR calculator at a real quote, and see DSCR vs LTV for how lenders set the amount. A deal that defers $200,000 of tax but needs $300,000 of cash you don't have isn't a deal.

DSTs as Replacement Property

A Delaware statutory trust (DST) is a way to buy a fractional interest in a larger property, often a net-leased or apartment property run by a sponsor. In Rev. Rul. 2004-86, the IRS ruled that an interest in a DST set up as described there is treated as an interest in the real estate, so it can be replacement property.

The ruling depends on the trust being passive. The trustee in the ruling couldn't take new capital, renegotiate the loan or the lease (except in a tenant bankruptcy or insolvency), reinvest sale proceeds, or make more than minor non-structural changes. That's what makes a DST useful as a backup: you can close on it quickly and in odd amounts to soak up cash that would otherwise be boot. It's also what makes it inflexible. You don't control the property, and if it needs fresh money, the structure has few good answers.

DST interests are generally sold as securities offerings, with sponsor fees built in. Read the offering documents as closely as you'd read a seller's rent roll.

Depreciation Recapture Gets Deferred Too

Part of the gain on a commercial building comes from depreciation you've taken. When you sell outright, that part is taxed at its own rate; the IRS says unrecaptured section 1250 gain on real property is taxed at a maximum 25% rate (Topic 409).

In a full exchange, that gain is deferred with the rest, because it's part of the realized gain that isn't recognized. In Example 1, if $300,000 of the $1,000,000 gain came from depreciation, that $300,000 rolls into the new building's lower basis along with everything else. The Form 8824 instructions warn that recapture can still apply in some exchanges, particularly with boot or with personal property in the deal, so it's one of the numbers your CPA should run before closing. If you've done a cost segregation study, ask your CPA how the reclassified property is treated in the exchange.

How Long Do You Have to Hold 1031 Property?

Section 1031's text doesn't set a minimum holding period. It asks whether the property was held for productive use in a trade or business or for investment, and whether the replacement will be held the same way. Intent is judged on the facts, so a quick resale, a flip or a move-in soon after the exchange invites the question of whether the property was held for sale or personal use instead. The two-year rule people hear about is a different rule, for related-party exchanges (below). How long is long enough for your situation is a question for your tax adviser before you buy, not after.

Every exchange is reported on Form 8824 with your return for the year you gave up the old property. If you exchange with a related party, such as a family member or an entity you control, either side's sale of the property within two years generally brings the deferred gain back into income, with exceptions in the Form 8824 instructions.

Defer the Tax or Pay It: A Worked Comparison

The deferred tax stays invested. Here's what that's worth on the same $1,100,000 of equity, ignoring closing costs.

Your own comparison needs your real tax rate from your CPA, your real loan quote, and a realistic price for a building you'd actually buy. Run both versions through the DSCR calculator and project the hold with the IRR calculator.

When a 1031 Exchange Doesn't Make Sense

  • You have a loss. Section 1031 doesn't recognize losses either, so an exchange wastes a loss you could otherwise use. Sell outright and talk to your CPA.
  • The gain is small. QI fees, a rushed purchase and higher acquisition costs can outweigh a small tax deferral.
  • You want out of real estate. An exchange only defers tax into more real estate.
  • You need the cash. Any cash you keep is boot, and if you need most of it, there isn't much left to defer.
  • The only replacements you can find are weak. Paying the tax on a good sale beats deferring it into a bad building.
  • The new loan won't fit. If the replacement can't support the debt you're paying off, you'll need new cash or you'll recognize gain anyway.

Common 1031 Exchange Mistakes

  • Touching the money. Proceeds wired to you, even briefly, can end the exchange. The exchange agreement has to be signed before closing.
  • Buying in a different name. The taxpayer who sold has to be the one who buys.
  • Forgetting the debt. Matching the price but not the loan, without adding cash, creates mortgage boot.
  • Paying non-exchange costs from proceeds. Using exchange funds for items that aren't exchange costs can be cash boot. Ask your QI and CPA which closing costs qualify before escrow pays them.
  • Assuming furniture and equipment ride along. Personal property isn't like-kind after 2017, so its value can be taxable.
  • Overpaying under deadline pressure. The tax saving can disappear into a price that's 5% too high.

Documents to Gather for a 1031 Exchange

  • Closing statement and deed from when you bought the property you're selling.
  • Depreciation schedules and capital improvement records, so your CPA can compute adjusted basis.
  • The current loan payoff statement.
  • The QI's exchange agreement, assignment and identification form.
  • For each replacement: the rent roll, leases, a T-12 operating statement, the current tax bill and a loan term sheet. How to verify a seller's NOI covers what to check in each.

Is an Exchange Worth It?

Usually, when the gain is large and you want to stay in real estate. The tax you defer stays invested and earns a return. But an exchange pushes you to buy within 180 days, and a rushed purchase can cost more than the tax. If you can't name two or three buildings you'd actually buy before you list, the exchange is driving the deal, and that's backwards. Underwrite the replacement the same way you'd underwrite any deal: start with the commercial real estate underwriting guide, check the price with the cap rate calculator, and project the hold with the IRR calculator. The Multifamily Underwriting Kit has a one-page dashboard that lays out a replacement property for a partner or lender in the time you have.

Frequently Asked Questions

What is a 1031 exchange?

A way to sell real estate held for investment or business use and defer the tax on the gain by buying other real estate held the same way, under Section 1031 of the Internal Revenue Code.

Can I exchange an apartment building for a warehouse?

Yes. For real estate, like-kind is broad: improved and unimproved US real property are generally like-kind to each other, whatever the property type.

Can I 1031 exchange commercial property into residential property?

Yes, if the residential property is held for investment, such as a rental house or an apartment building. Commercial and residential rentals are like-kind to each other. A home you plan to live in doesn't qualify, and a replacement rental you later move into has extra holding rules before any gain on it can be excluded as a home sale, so talk to your CPA first.

What is boot in a 1031 exchange?

Cash or other non-like-kind property you receive, including debt you're relieved of and don't replace. Gain is taxed up to the amount of boot.

Do I have to use a qualified intermediary?

In a delayed exchange, you can't receive or control the sale proceeds. A qualified intermediary holds them under a written agreement, which is the regulation's safe harbor for this.

Can a DST be replacement property?

Yes, if it's structured like the trust in Rev. Rul. 2004-86, which the IRS treated as an interest in real estate. It's passive, so you give up control.

Does a 1031 exchange avoid depreciation recapture?

It defers it. The gain from past depreciation carries into the new property's basis and is taxed when you sell that property in a taxable sale.

Do I have to buy a more expensive property to defer all the tax?

You have to buy at least as much as your net sale price and reinvest all the cash. If you buy for less, the difference generally shows up as cash or debt relief, which is boot and taxable up to the gain.

Can I take some cash out in a 1031 exchange?

Yes, but the cash is boot, and gain is taxed up to the amount you take. The rest of the gain can still be deferred.

How long do I have to hold property in a 1031 exchange?

The statute doesn't set a minimum period. It requires that both properties be held for investment or business use, which is judged on the facts. The two-year rule applies to related-party exchanges.

Can I do a 1031 exchange into a property I'll build on?

Yes, through an improvement exchange, but only construction finished before you take title and within the exchange period counts toward the replacement value.

Should I do a 1031 exchange if I have a loss?

Usually not. Section 1031 doesn't recognize losses, so an exchange would defer a loss you might otherwise use. Ask your CPA before deciding.

Can I exchange into a property owned by a relative?

Related-party exchanges are allowed but have extra rules. If either side disposes of the exchanged property within two years, the deferred gain generally becomes taxable, with exceptions listed in the Form 8824 instructions.

Sources and Further Reading

CRE Simulator

Want the whole picture? The Simulator works out what the deal makes over your hold, then stress-tests it against recessions and rate shocks.

Run the Simulator