This article is educational and is not tax, legal, or financial advice. The strategies below have meaningful rules, deadlines, and exceptions, and every situation is different. Confirm the specifics with your CPA and attorney before acting.

By the time most owners think about taxes, the deal is already structured — and that’s exactly backwards. When your business comes with real estate, some of the most valuable decisions you’ll make are tax decisions, and they have to be made before you sign. Two tools in particular deserve a seat at the table early: the sale-leaseback and the 1031 exchange.

The sale-leaseback: turn your building into cash without moving

A sale-leaseback does something that sounds almost too convenient: it lets you sell your building and keep operating in it at the same time.

The mechanics are simple. You sell the property to a real estate investor, and as part of the same transaction you sign a long-term lease — usually triple-net — to stay on as the tenant. Nothing about your day-to-day operation changes. The sign on the door is the same; only the deed changes hands.

What you get in return is liquidity. The equity that was locked inside the building becomes cash you can use — to fund growth, pay down debt, diversify your net worth out of a single concentrated asset, or simply take chips off the table before you sell the business itself.

Owners reach for a sale-leaseback in a few situations:

The trade-off is that you give up the building’s future appreciation and commit yourself to lease payments. It’s the mirror image of keeping the building for income: there, you sell the business and become a landlord; here, you sell the building and become a tenant. Which one fits depends on whether you’d rather hold the real estate or hold the cash.

The 1031 exchange: defer the tax on the building

When you sell appreciated real estate, the gain is taxable — sometimes substantially so. A 1031 exchange (named for the section of the tax code) lets you defer that capital-gains tax by reinvesting the proceeds into another “like-kind” investment property.

The crucial point for business sellers: the 1031 applies to the real estate, not the business. Your building can qualify. Your company’s goodwill, equipment, and going-concern value cannot. This is one more reason to value and document the real estate as its own asset — it’s the part of your sale that opens the door to a 1031.

Used well, a 1031 lets you roll the gain from the building your business occupied into something more passive — a single-tenant property with a national tenant, a share of a larger commercial asset, or another investment that fits your retirement. You defer the tax and reposition the wealth at the same time.

But the rules are strict, and they’re where people stumble:

Miss a deadline or take possession of the funds, and the deferral evaporates. A 1031 has to be set up before you close the sale, with the intermediary and the replacement strategy already in motion.

Two more things to raise with your CPA

Beyond those headline strategies, two issues quietly shape what you keep.

Purchase price allocation. When a sale includes both a business and real estate (or business assets of different kinds), the contract allocates the total price across the categories — goodwill, equipment, inventory, and real property. That allocation drives how both you and the buyer are taxed, and it’s negotiated. Buyers and sellers often want different allocations, so it’s worth understanding the trade-offs rather than treating it as boilerplate.

Depreciation recapture. If you’ve depreciated the building over the years — and most owners have — the IRS recaptures part of that benefit at sale, taxing the depreciated portion of your gain at a higher rate than ordinary long-term capital gains. It’s a frequent and unwelcome surprise. A 1031 exchange can defer it; an installment sale generally cannot. Either way, you want it modeled before you sign, not discovered at tax time.

Why this has to happen early

The thread running through all of this is timing. A sale-leaseback changes how you structure the whole deal. A 1031 exchange must be arranged before closing and runs on a 45-day clock. Purchase price allocation is negotiated in the contract itself. Depreciation recapture should shape your reserve and your strategy. None of these can be bolted on after the fact.

That’s why the owners who keep the most aren’t necessarily the ones who sold for the highest headline price — they’re the ones who built their team and their structure before going to market. Loop in your CPA and a real estate–savvy advisor early, and treat the tax plan as part of the deal rather than an afterthought.

It all rests on one foundation: knowing what the business and the building are each worth today. A clear, confidential valuation is the starting point for every structure in this guide — and the first step toward an exit that’s as efficient on the tax side as it is rewarding on the sale side.