Guide

Capital Gains Tax on Commercial Property: What Sellers and Agents Should Know

How capital gains on commercial property are taxed (§1250 recapture, §1245, long-term rates) and how a 1031 exchange or an Opportunity Zone investment can defer the gain.

Updated November 2, 2026

Capital gains on commercial property are usually taxed in layers. Gain up to the building’s straight-line depreciation is taxed at up to 25%, depreciation on equipment and cost-segregated parts comes back as ordinary income, and the rest is long-term capital gain at 0%, 15% or 20%. A 1031 exchange or an Opportunity Zone investment can defer the gain.

If you’re selling a commercial building, that’s the short version. The rest of this guide walks through how the gain breaks down, one worked example, and how the two main deferral routes compare. It’s also part of our series for agents, since the agent is often the first person to ask a seller what they’ll do after closing. The hub is OZ talking points for your next listing appointment.

How capital gains on commercial property are taxed

A commercial building used in a business or rented out is generally §1231 property (IRC §1231). On a sale, the capital gains tax on commercial property splits like this:

Part of the gainFederal rate
Up to straight-line depreciation on the building (unrecaptured §1250 gain)Up to 25% (IRC §1(h)(1)(E))
Up to depreciation on personal property and cost-segregated components (§1245)Ordinary income (IRC §1245)
The restLong-term capital gain, 0%, 15% or 20%
On top, for some sellers3.8% net investment income tax (IRC §1411)

Commercial buildings are generally depreciated over 39 years (IRC §168(c)). Land isn’t depreciated. For the residential side, see capital gains tax on investment property.

Illustrative example: one commercial sale, dated numbers

Illustrative example only. The figures are made up to show how the gain is split, and they don’t show any tax amount or savings.

  • January 2012: An investor buys a small office building for $1,000,000. For this example, $200,000 is allocated to land and $800,000 to the building, with no cost segregation study.
  • 2012 to mid-2026: Straight-line depreciation on the building totals about $287,000. (That’s simplified: $800,000 over 39 years for roughly 14 years. Real figures depend on placed-in-service dates and conventions.)
  • June 2026: The investor sells for $1,600,000. To keep it simple, we ignore selling costs and improvements.
StepAmount
Adjusted basis ($1,000,000 − $287,000)$713,000
Total gain ($1,600,000 − $713,000)$887,000
Unrecaptured §1250 gain (up to 25%)$287,000
Long-term capital gain (0%, 15% or 20%)$600,000
§1245 ordinary income (no cost segregation)$0

If a cost segregation study had moved part of the basis into personal property, some of that $287,000 would show up instead as §1245 ordinary income. That part could still go into a 1031 exchange, but it couldn’t be deferred in an Opportunity Zone fund.

Because this sale closed in 2026, gain invested in a qualified opportunity fund through December 31, 2026 would stay on OZ 1.0 rules. A sale that closes later would fall under the rules described below.

This is not tax advice. Your CPA will work from your actual basis, depreciation records and price allocation.

Depreciation recapture on a commercial sale

The depreciation you took over the years lowers your basis, so it comes back as gain when you sell. On the building, gain up to straight-line depreciation is unrecaptured §1250 gain, taxed at up to 25%. Because commercial buildings use a 39-year schedule, this builds more slowly than on a residential rental.

Cost segregation changes the picture. It moves part of the basis into faster-depreciating personal property, and that part is §1245 property that comes back as ordinary income. For a full walk-through, see depreciation recapture for selling landlords, and the depreciation recapture calculator splits a sale into these parts.

Price allocation matters

The contract price is often split among land, building, equipment, and sometimes intangibles like an assumed lease. Each piece is taxed differently. Land has no recapture, equipment is mostly ordinary income, and the building carries §1250 gain. Buyers and sellers want different allocations, so it’s worth flagging early for both sides’ advisors. If an operating business is part of the deal, see selling a business with real estate.

1031 exchange vs Opportunity Zone deferral

These are the two main ways commercial sellers defer the gain, and they work quite differently.

1031 exchangeOpportunity Zone investment
What you reinvestAll the proceeds, into other investment or business real propertyAn amount equal to the eligible gain, into a qualified opportunity fund
What can be deferredThe whole gain, including recaptureThe §1250 and §1231 parts; §1245 recapture can’t be deferred (Treas. Reg. §1.1400Z2(a)-1(b)(11)(iii))
TimingIts own identification and closing deadlines (1031 exchange 45-day rule)Generally within 180 days (IRC §1400Z-2)

Commercial sellers often exchange into other commercial property, including triple-net leased buildings or DST interests (IRC §1031). An installment sale is another option, with ordinary recapture taxed in the year of sale (IRC §453(i)).

For a side-by-side look, read 1031 vs Opportunity Zone. If you’re wondering whether the two can be combined, see can you 1031 into an Opportunity Zone? You can also run the options with the 1031 vs DST vs Opportunity Zone calculator.

How Opportunity Zone deferral works for a commercial seller

For investments made after December 31, 2026, the deferred gain is taxed when you sell the fund interest or five years after investing, whichever comes first. At five years you get a 10% basis step-up (30% for a qualified rural fund). Hold for 10 years and your basis becomes the investment’s fair market value. The Opportunity Zone tax benefits guide covers each benefit in detail, and how to choose Opportunity Zone funds explains what to look at when comparing them.

The 180-day window

Opportunity Zone deferral generally depends on investing within 180 days. When that window starts depends on how the gain was earned, so we cover it separately in the 180-day rule for sellers. The 180-day deadline calculator gives you the date.

OZ 2.0 timing: what changes on January 1, 2027

OZ 2.0 zones take effect January 1, 2027 and run through December 31, 2036. States have nominated tracts from 25,462 eligible tracts nationwide, and Treasury’s review is still under way. Gains invested through December 31, 2026 stay on OZ 1.0 rules, and the original OZ 1.0 zones end December 31, 2028. If your sale is near the turn of the year, the date you invest can decide which set of rules applies. See OZ 2.0 for the full picture, and check a tract on the Opportunity Zone map.

Run your numbers: try the Opportunity Zone calculator.

If the buyer is an opportunity fund

Commercial buildings in a zone can draw fund buyers, but the fund generally has to substantially improve the building by adding more than its basis within 30 months. Land-heavy sites and buildings due for major renovation fit best. See the substantial improvement rule for buyers.

Questions to ask a commercial seller

  • Has a cost segregation study been done? When?
  • How is the property owned: individually, in an LLC, or a partnership with other owners?
  • Are there existing leases, and will any equipment or business assets convey?
  • Is the plan to exchange, to get out, or to carry a note?

Sources: IRC §1231; IRC §1; IRC §1245; IRC §1250; IRC §168; IRC §1411; IRC §1031; IRC §453; IRC §1400Z-2; Treas. Reg. §1.1400Z2(a)-1; IRS Publication 544; Notice 2026-40; Rev. Proc. 2026-14; Treasury OZ 2.0 eligible tracts data file (Sept 2026).

Not tax advice. Nothing in this guide is tax, legal, or investment advice. Talk with a qualified CPA before making any decision.

Frequently asked questions

How is the capital gain on commercial property calculated?
Start with the sale price, subtract selling costs, and compare it with your adjusted basis: what you paid plus improvements, minus the depreciation you took. The gain is then split into parts. Gain up to the straight-line depreciation on the building is unrecaptured §1250 gain, taxed at up to 25%. Depreciation on personal property and cost-segregated components is ordinary income. The rest is usually long-term capital gain at 0%, 15% or 20%, and the 3.8% net investment income tax can apply for some sellers.
What is depreciation recapture on a commercial building?
It is the part of your gain that comes from depreciation you already deducted. On the building itself, gain up to straight-line depreciation is unrecaptured §1250 gain, taxed at up to 25%. Components reclassified as personal property in a cost segregation study are §1245 property, and that part comes back as ordinary income.
Should I compare a 1031 exchange with an Opportunity Zone investment?
They work differently. A 1031 exchange can defer the whole gain, including recapture, if all the proceeds go into other investment or business real property. An Opportunity Zone investment only needs an amount equal to the eligible gain, invested in a qualified opportunity fund within 180 days. It can defer the §1250 and §1231 parts, but not §1245 recapture. Your CPA can tell you which fits your situation.
How long do I have to reinvest the gain?
For an Opportunity Zone investment, you generally have 180 days. When the clock starts depends on how the gain was earned, so see our 180-day rule guide for sellers. A 1031 exchange has its own deadlines, covered in our 1031 exchange 45-day rule guide.
What changes on January 1, 2027?
OZ 2.0 zones take effect January 1, 2027 and run through December 31, 2036. For investments made after December 31, 2026, the gain is deferred until you sell or until five years after investing, whichever comes first. You get a 10% basis step-up at five years (30% for a qualified rural fund), and your basis becomes fair market value after a 10-year hold. Gains invested through December 31, 2026 stay on OZ 1.0 rules.
How long is commercial property depreciated?
Nonresidential real property is generally depreciated straight-line over 39 years (IRC §168(c)). Land isn't depreciated.

Get OZ 2.0 updates

OZ 2.0 news, guidance, and key deadlines. Unsubscribe anytime.

Tools: Depreciation recapture calculator · 1031 vs DST vs Opportunity Zone calculator · Substantial improvement test calculator · all Opportunity Zone tools

Disclaimer

Nothing in this guide is tax, legal, or investment advice. Opportunity Zone investments involve long hold periods, illiquidity, and significant risk. Consult a qualified CPA and investment advisor before making any decision.

All guides →