How to Avoid Capital Gains Tax on Commercial Property Sale

You can legally defer or reduce capital gains tax on a commercial property sale using four strategies built into the federal tax code: a Section 1031 like-kind exchange, a Qualified Opportunity Fund investment, an installment sale under Section 453, or a charitable remainder trust. Each one has strict timing, documentation, and reinvestment rules, and a single misstep can collapse the deferral and leave you owing the full bill. Which strategy fits depends on what you want next — another property, a passive investment, a stream of income, or a charitable legacy.

What You’re Actually Being Taxed On

Before choosing a strategy, know what’s at stake. The headline long-term capital gains rate tops out at 20 percent, but that isn’t the whole tax.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Every dollar of depreciation you claimed (or could have claimed) on the building reduced your adjusted basis, and at sale the IRS recaptures that benefit as unrecaptured Section 1250 gain, taxed at a maximum 25 percent.2Internal Revenue Service. Treasury Decision 8836 – Unrecaptured Section 1250 Gain On a building held 15 or 20 years, that accumulated depreciation can be hundreds of thousands of dollars taxed at the higher rate.

Higher earners pay a third layer. If your modified adjusted gross income exceeds $250,000 (married filing jointly) or $200,000 (single), you owe an additional 3.8 percent net investment income tax on the smaller of your net investment income or the amount above those thresholds.3Internal Revenue Service. Net Investment Income Tax Stack the three together and the effective federal tax on a commercial sale can approach 40 percent of the gain. That’s the number the deferral strategies below are working against.

Section 1031 Like-Kind Exchange

The most widely used tool is the like-kind exchange. Section 1031 lets you swap investment or business real estate for other investment or business real estate without recognizing gain at the time of the exchange.4Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment The tax isn’t eliminated. Both the capital gain and the depreciation recapture carry forward through a transferred basis into the replacement property, and come due when you eventually sell in a taxable transaction.

“Like kind” is broad. An office building can be exchanged for a warehouse, a strip mall for raw land, a rental complex for a single-tenant retail property. Since the Tax Cuts and Jobs Act took effect in 2018, however, only real property qualifies. Equipment, vehicles, and other personal property no longer count.5Internal Revenue Service. Like-Kind Exchanges – Real Estate Tax Tips U.S. real property and foreign real property are also not like kind, so you cannot exchange a domestic building for one overseas.4Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment

The Two Deadlines

After you transfer the property you’re selling, you have 45 calendar days to identify potential replacement properties in writing, and 180 days from that same transfer date to close on the replacement — or by the due date of your return (including extensions) for the sale year, whichever comes first.4Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment Miss either deadline and the exchange collapses into a taxable sale. If you sell late in the year, file an extension; without it, you may not actually get a full 180 days.

The Qualified Intermediary Rule

You cannot touch the sale proceeds. Nearly all 1031 exchanges use a Qualified Intermediary who holds the money under a written exchange agreement that limits your ability to receive, pledge, or borrow against the funds. Treasury regulations create a safe harbor treating the QI as not your agent, so funds held there are not in your constructive receipt.6GovInfo. 26 CFR 1.1031(k)-1 – Treatment of Deferred Exchanges The QI cannot be your attorney, accountant, real estate agent, or a family member. Set up the intermediary and sign the exchange agreement before you list the property or accept an offer. Setting one up after closing is too late.

How Many Properties You Can Identify

Within the 45-day window, the three-property rule lets you name up to three potential replacements regardless of their combined value. Want to identify more than three? The 200 percent rule applies: total fair market value of all identified properties cannot exceed 200 percent of what you sold. Identification must be in writing, signed, and delivered to the QI or another party in the exchange before midnight on day 45. Verbal doesn’t count.

Boot: The Trap That Creates a Partial Tax

A 1031 exchange defers tax only on the like-kind portion. Anything else you receive is “boot,” and it triggers immediate gain recognition up to the amount received. Cash boot happens when you don’t reinvest the full sale price: sell for $800,000, buy for $700,000, and the $100,000 difference is taxable. Mortgage boot happens when the debt on the replacement is lower than the debt on what you sold; $100,000 of debt relief is treated as boot. You can offset mortgage boot with extra outside cash, but you cannot offset cash boot with extra debt. To defer 100 percent of the gain, the replacement must equal or exceed the property you sold in both price and debt.

The Related-Party Two-Year Rule

Exchanging with a spouse, parent, child, sibling, grandchild, or related business entity adds a holding restriction. If either party disposes of the property received within two years of the last transfer, the deferred gain snaps back and is taxable in the year of disposition.4Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment Narrow exceptions cover death, condemnation, and situations with no tax-avoidance purpose. Form 8824 must be filed for two additional years after a related-party exchange to confirm neither party disposed of the property.7Internal Revenue Service. 2025 Instructions for Form 8824 – Like-Kind Exchanges

Qualified Opportunity Fund Investment

Under Section 1400Z-2, you can invest capital gains into a Qualified Opportunity Fund, which must hold at least 90 percent of its assets in property or businesses within designated census tracts.8Office of the Law Revision Counsel. 26 USC 1400Z-2 – Special Rules for Capital Gains Invested in Opportunity Zones The fund must be organized as a corporation or partnership and self-certifies by filing Form 8996 annually.9Internal Revenue Service. Instructions for Form 8996

The original program’s deferral and step-up benefits have largely expired. The mandatory inclusion date for all deferred gains is December 31, 2026, so investing now provides little deferral because the original gain becomes taxable at year-end regardless.10Internal Revenue Service. Opportunity Zones Frequently Asked Questions The 10 and 15 percent basis step-ups required investing by the end of 2021 and 2019 respectively. Those windows are closed.

What remains valuable is the 10-year appreciation exclusion. If you hold a QOF investment for at least ten years, you can elect a fair market value basis when you sell, eliminating federal capital gains tax on any appreciation that occurred inside the fund.8Office of the Law Revision Counsel. 26 USC 1400Z-2 – Special Rules for Capital Gains Invested in Opportunity Zones You still pay tax on the original gain you invested, but a decade of growth comes out tax-free.

If the fund acquires existing buildings rather than building new, it must substantially improve them: within any 30-month period after acquisition, additions to basis must exceed the adjusted basis of the building at the start of that period.10Internal Revenue Service. Opportunity Zones Frequently Asked Questions Vacant land purchases avoid the test.

Installment Sale Under Section 453

An installment sale spreads taxable gain over the years you actually receive payments. Any sale where at least one payment arrives after the close of the tax year qualifies.11Office of the Law Revision Counsel. 26 USC 453 – Installment Method Each payment carries a proportionate share of gain, basis recovery, and interest income. This works well when you’re willing to carry the financing and want to avoid jumping into a higher tax bracket from a lump sum.

Watch the $5 million threshold. If the face amount of your outstanding installment obligations exceeds $5 million at year-end, the IRS charges interest on the deferred tax attributable to the portion above that threshold, tied to the federal underpayment rate.12Office of the Law Revision Counsel. 26 U.S. Code 453A – Special Rules for Nondealers On a high-value sale, that charge can erode the cash-flow benefit. Run the numbers before committing to an installment structure at that scale.

Charitable Remainder Trust

A charitable remainder trust combines deferral with philanthropy. You transfer the property to an irrevocable trust, the trust sells it without owing capital gains tax (as a tax-exempt entity), and full proceeds are reinvested. You receive income from the trust for up to 20 years or for your lifetime, and whatever remains at the end passes to a charity you designated at creation.13Office of the Law Revision Counsel. 26 U.S. Code 664 – Charitable Remainder Trusts

Annual distributions must fall between 5 and 50 percent of trust value. A charitable remainder annuity trust pays a fixed dollar amount based on initial value; a charitable remainder unitrust pays a fixed percentage recalculated each year.14Internal Revenue Service. Charitable Remainder Trusts The remainder going to charity must be worth at least 10 percent of the initial trust value.13Office of the Law Revision Counsel. 26 U.S. Code 664 – Charitable Remainder Trusts You also get an income tax deduction in the funding year based on the present value of the future charitable remainder.

The trade-off is permanent. Once property goes into a CRT, you cannot get it back, and distributions to you are taxable as received. This strategy fits owners who want to support a charitable cause and are comfortable converting equity into an income stream rather than a lump sum they control.

Forms and Documentation That Protect the Deferral

Every strategy above requires specific IRS forms, and skipping or misfiling them can undo the tax treatment.

  • Like-kind exchanges are reported on Form 8824, showing descriptions of both properties, dates of transfer and receipt, the relationship between parties, and the deferred gain calculation. Related-party exchanges require Form 8824 for two additional years after the exchange.15Internal Revenue Service. Instructions for Form 8824 (2025)
  • Installment sales are reported on Form 6252, which tracks the gross profit ratio and computes the taxable portion of each year’s payments. File it every year you receive a payment, not just the sale year.16Internal Revenue Service. About Form 6252, Installment Sale Income
  • Opportunity Zone deferrals are reported on Form 8949 and Schedule D, with a separate line showing the QOF’s EIN and investment date. The fund itself files Form 8996 annually.17Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets9Internal Revenue Service. Instructions for Form 8996

Before any transaction closes, gather your complete ownership records: original purchase price, closing costs, every capital improvement receipt, and your full depreciation schedule. Independent appraisals establish fair market value for both the property you’re selling and any replacement. Your basis records are what will support the numbers you report, and reconstructing them years later is difficult.

State Tax Is a Separate Question

Federal deferral doesn’t automatically mean state deferral. Some states don’t conform to Section 1031 or modify the benefit. A handful require annual filings to track deferred gains from property sold within their borders, even after you’ve exchanged into a replacement in another state; when that replacement is eventually sold, the original state may tax the deferred gain at that point. Opportunity Zone conformity also varies — not all states recognize the federal exclusion on QOF appreciation. Before any strategy that crosses state lines, confirm both the state where you’re selling and the state where you’re buying recognize the deferral you’re planning around.