Big Sale TaxHans Goldstein: Tax & Exit Planning
Home / Capital Gains / Commercial property
Commercial real estate sale

Capital Gains Tax on Commercial Property: Where the Big Numbers Hide

Short answerA commercial building sale is taxed in pieces: building depreciation at up to 25%, the rest as long-term gain, and any cost segregation components as ordinary income in the year of sale. A net Section 1231 loss in the prior five years can turn part of the gain ordinary. In our New Jersey example, cost segregation raises the tax at sale from $848,273 to $1,096,218.

Why a commercial sale is taxed in more pieces than a house

A commercial building is depreciated over 39 years under IRC 168(c), against 27.5 for residential rentals, so each year adds less to the 25% layer. What makes commercial sales different is everything around the shell: parking lots, signage, dedicated electrical, tenant improvements, and the in-place leases a buyer pays for. Each piece has its own recovery period and its own tax character when you sell.

The building's straight-line depreciation is unrecaptured Section 1250 gain, taxed at no more than 25% (IRC 1(h)(1)(E), 2026). Gain above the depreciation is long-term capital gain at 0%, 15% or 20% (Rev. Proc. 2025-32, 2026; see the rate table). Passive owners add the 3.8% net investment income tax (IRC 1411, 2026). In our first example, a New Jersey couple selling an office building pays $848,273 on $2,356,000 of gain: $523,135 federal, $89,528 NIIT and $235,610 to New Jersey, whose 10.75% top rate applies above $1 million of income (NJ Division of Taxation, 2026 schedule).

Cost segregation: the early deduction comes back at ordinary rates

A cost segregation study pulls components out of the 39-year building and into 5-, 7- and 15-year classes. Combined with bonus depreciation, which was 100% for property acquired after September 27, 2017 and placed in service before 2023 (IRC 168(k)(6)), and is again 100% for property acquired after January 19, 2025 (P.L. 119-21; IRS Publication 946), that can mean hundreds of thousands of dollars deducted in year one.

At sale the bill arrives. Personal property components are Section 1245 property, so gain up to the depreciation taken is ordinary income (IRC 1245). Fifteen-year land improvements such as paving are Section 1250 property, but bonus depreciation is not straight-line for recapture purposes (Treas. Reg. 1.168(k)-2(g)(3)), so the excess over straight-line is ordinary too under IRC 1250(a). Both are taxed in the year of sale even if you carry a note (IRC 453(i)).

In our second example the same building with a 2018 study shows $2,992,000 of gain instead of $2,356,000, because the extra deductions lowered basis, and the tax at sale is $247,946 higher. That is not a loss on its own: the deductions saved tax years earlier, often at higher rates. The question is the spread between the rate you deducted at and the rate you pay back at, and how long you held the savings. Our cost segregation before a sale page runs that trade-off.

Section 1231 netting and the five-year lookback

Commercial buildings held over a year are Section 1231 assets. All your 1231 gains and losses for the year are netted: a net gain is taxed as long-term capital gain, a net loss is fully ordinary (IRC 1231(a)). That asymmetry is generous, and the lookback claws part of it back. If you deducted net 1231 losses in any of the five preceding years, this year's net 1231 gain is ordinary income up to the amount of those losses not already recaptured (IRC 1231(c)).

The recaptured amount comes first out of the 25% layer: the IRS unrecaptured Section 1250 gain worksheet subtracts it before anything else (Schedule D instructions, 2025). In our third example a $250,000 loss taken in 2023 adds $13,213 to the bill, because that slice moves from a 25% ceiling to ordinary rates. Owners with several properties can sometimes sequence sales so loss years and gain years do not collide inside the same five-year window.

Tenant improvements: write off the old ones before you sell

Landlord-funded build-outs are depreciated over their own lives; interior improvements to nonresidential buildings are generally qualified improvement property with a 15-year life (IRC 168(e)(6)). When a tenant leaves and the improvements are torn out, the code lets you treat them as disposed of at lease end and deduct the remaining basis (IRC 168(i)(8)(B)).

Owners often skip this, and the stranded basis just rides along until sale. Writing it off in the year of the demolition gives an ordinary deduction now, rather than a smaller gain later at capital gain rates. Before you list, ask your CPA to walk the rent roll and the fixed asset schedule side by side and retire anything that no longer exists. The reverse also holds: improvements you put in for a current tenant and the in-place leases add value the buyer will pay for, and the purchase agreement should allocate that value deliberately (see purchase price allocation).

When the mortgage is bigger than your basis

Commercial owners who refinanced over the years often owe more than their adjusted basis. The amount realized on a sale includes debt the buyer pays off or takes over, even if it exceeds the property's value (Commissioner v. Tufts, 461 U.S. 300 (1983)). You can owe tax on gain that never reaches your bank account, and the same holds if you hand the keys to the lender.

It also shapes the exits. In a 1031, debt paid off that is not replaced by new debt or added cash is taxable boot (see 1031 boot). In an installment sale where the buyer takes over your loan, the excess of that debt over your basis counts as a payment in the year of sale (Treas. Reg. 15a.453-1(b)(3)). Map the debt before you pick a structure.

1031 options: another building or a Delaware statutory trust

Commercial property can be exchanged for any real property held for investment or business use, including apartments, land or a net-leased store (IRC 1031). Owners tired of tenants often use a Delaware statutory trust: a fractional interest in a professionally managed property that the IRS treats as real estate for 1031 purposes if the trustee's powers are tightly limited, with no new capital, no renegotiated leases and no new borrowing (Rev. Rul. 2004-86). Compare it on our Delaware statutory trust and tenancy in common pages, and see 1031 vs installment sale.

Exchanging California property for property elsewhere carries a reporting tail: the owner files an annual California information return for as long as the gain stays deferred (FTB 3840, per the 2026 Form 593 instructions).

State withholding at closing

Several states make the buyer or escrow hold back tax from the seller's proceeds, mostly for nonresidents. Verified figures for 2026:

StateWhat is withheld
California3 1/3% of price, or an elected gain-based amount, on sales over $100,000 (Form 593, 2026)
New JerseyNonresident estimated payment of 10.75% of gain, at least 2% of price (GIT/REP-1, 2026)
New YorkNonresident estimated tax of 10.9% of gain at deed recording (Form IT-2663, 2026)
OregonLeast of 4% of price, 8% of gain or net proceeds, over $100,000 (OR-18-WC, 2026)

The withholding is a prepayment, not the final tax, but it can strand cash you planned for a 1031 or a down payment. Some states exempt 1031 exchanges or sales at a loss, but the exemption form generally has to be in the escrow file before closing. Our state pages list each state's rule.

Other ways commercial sellers keep more

Owner-users can sell and lease back the building to free capital while staying put (sale-leaseback). Sellers willing to carry paper can use an installment sale, though cost segregation recapture is still due in year one. An Opportunity Zone fund can take the capital gain portion, and a charitable remainder trust fits owners with a giving plan. For a smaller rental, see capital gains tax on rental property.

To see every path side by side with your numbers, get the Big Sale Tax Analysis.

What to know

Cost segregation is a timing trade, not free money, and the recapture lands in the sale year whatever structure you choose. A 1031 defers gain but keeps you in real estate, and a Delaware statutory trust gives up control and liquidity. Seller financing leaves you exposed to the buyer's credit. State withholding is a prepayment you may wait a year to recover.

Worked example

Married couple with $300,000 of other income. Bought in 2018 for $4,000,000 ($800,000 land), sold in 2026 for $6,000,000 less $300,000 of costs. Eight years of 39-year depreciation: $656,000. Gain $2,356,000. A 2018 study moved $800,000 into 5-, 7- and 15-year property, written off with 100% bonus depreciation. At sale those components are allocated $500,000, all ordinary recapture; the rest of the building carried $492,000 of straight-line depreciation. Gain $2,992,000. Same as the first example, but the couple deducted a $250,000 net Section 1231 loss on another property in 2023. That amount of this year's 1231 gain is taxed as ordinary income, taken first from the 25% layer.

Engine runOffice building, New Jersey, no cost segregationSame building, cost segregation in 2018No cost segregation, $250,000 1231 loss in 2023
Filing statusMarried, jointMarried, jointMarried, joint
StateNew JerseyNew JerseyNew Jersey
Other income (wages, pension, interest)$300,000$300,000$300,000
Long-term capital gain$1,700,000$2,000,000$1,700,000
Unrecaptured Section 1250 gain (25% max)$656,000$492,000$406,000
Section 1245 recapture (ordinary income)$0$500,000$0
Ordinary income from the sale (short-term gain, inventory, non-compete)$0$0$250,000
Federal income tax on the sale$523,135$692,642$536,347
Net investment income tax (3.8%)$89,528$113,696$89,528
State income tax on the sale$235,610$289,880$235,610
Total tax caused by the sale$848,273$1,096,218$861,485
Effective rate on the gain36.0%36.6%36.6%
Gain kept after these taxes$1,507,728$1,895,782$1,494,515

Computed October 7, 2026 by the Big Sale Tax engine (engine.js yearTax): federal brackets, 0/15/20% thresholds and AMT from Rev. Proc. 2025-32 (OBBBA-adjusted) and the One Big Beautiful Bill Act (P.L. 119-21); NIIT under IRC 1411 (thresholds not indexed); state tax from the engine's state table. "Tax caused by the sale" = tax with the sale minus tax without it. Excludes selling costs, local taxes and estimated-tax timing. Education only.

Run your own numbers

Federal on the sale$0
NIIT$0
State$0
Total tax, held over a year$0
Effective rate0%
If held one year or less$0

2026 law from the engine: federal 0/15/20% brackets (Rev. Proc. 2025-32), 25% cap on unrecaptured 1250 gain, ordinary rates on 1245 recapture, 3.8% NIIT over $200,000 single / $250,000 joint (IRC 1411), AMT, and your state's rules. Tax shown is the tax caused by the sale. Excludes selling costs, local taxes and NIIT exceptions for active business owners. Education only.

Free PDF sheet

Long-Term vs Short-Term Capital Gains (2026)

The one-year holding rule, the 2026 0/15/20% thresholds for every filing status, NIIT, recapture, the state layer and a worked $200,000 example: 11 months vs 13 months, and what spreading the gain can save.

By entering your email you agree to receive this sheet and occasional educational emails from Hans Goldstein: Tax & Exit Planning. Unsubscribe anytime.

Frequently asked questions

What are the capital gains tax implications of investing in commercial real estate?
You deduct depreciation while you own it, then pay it back at sale: up to 25% on building depreciation and ordinary rates on cost segregation components, plus 0%, 15% or 20% on the appreciation (Rev. Proc. 2025-32, 2026) and often the 3.8% NIIT. A 1031 exchange can defer all of it as long as you keep reinvesting in real estate.
Does New Hampshire have a capital gains tax on commercial real estate?
No. New Hampshire has no tax on wages or capital gains, and its interest and dividends tax was repealed for periods beginning after December 31, 2024. Federal tax still applies, and the state charges a real estate transfer tax of $0.75 per $100 of price under RSA 78-B:1.
What are the long-term capital gains tax implications of investing in commercial real estate?
Holding over a year makes the building a Section 1231 asset: net gains get capital gain rates and net losses are ordinary. Over a long hold, depreciation grows the 25% layer, and a net 1231 loss in the five years before a sale can turn part of the gain ordinary (IRC 1231(c)). Holding until death gives heirs a stepped-up basis.
Is depreciation recapture on commercial property 25%?
For straight-line building depreciation, 25% is the maximum rate (IRC 1(h)(1)(E), 2026). Components from a cost segregation study are different: personal property and bonus-depreciated land improvements are recaptured as ordinary income at up to 37%. In our New Jersey example, cost segregation raises the sale-year tax by $247,946.
Can I 1031 a commercial property into residential rentals?
Yes. Any real property held for investment or business use is like-kind to any other, so an office building can be exchanged for apartments, land or a Delaware statutory trust interest (IRC 1031(a)). Personal property such as furniture or equipment no longer qualifies and is taxed separately.
How do capital gains taxes affect the profitability of commercial real estate investments?
Tax at exit can take a third of the gain in a high-tax state: our New Jersey example pays $848,273 on $2,356,000, an effective 36.0%. Investors who model after-tax returns compare holding, exchanging and selling, because deferral keeps the tax money working.
How Hans helps: the $5,000 Big Sale Tax Analysis runs your sale through every path that fits: a cash sale, a Section 453 installment sale, 1031, Opportunity Zones, charitable trusts, timing and loss offsets, year by year, and ends with a written recommendation your CPA can check. Get the Big Sale Tax Analysis.
Next step

Know your number before you sign.

The Big Sale Tax Analysis is a flat $5,000. Start with a free scoping call; you are invoiced only after it, and only if you go ahead.

Prefer email? Request the analysis by email.

Book a callCall Hans