Selling a business and the real estate it occupies are two separate sales with separate tax results, even when both close on the same day. Under IRC Section 1031, only the real property can go into a tax-deferred exchange, and only when the sale is treated for tax purposes as a sale of the building itself. Goodwill, equipment and the shares of the company do not qualify, so their gain is taxed in the year of sale or, under the installment method, as payments arrive. Depreciation recapture on equipment is taxed in the year of sale either way.
This guide covers the decisions an owner-operator makes about the building at the exit, from deal structure to allocation and the exchange. How the exchange itself works is covered in our guide to a 1031 exchange into NNN property.
Does it matter whether the building sits in your company or in a separate LLC?
Yes, whether the building sits in your operating company or in a separate LLC decides how it can be sold and exchanged. A building owned by the operating company goes wherever the business goes unless it is carved out. A building owned by you or a separate LLC can be leased, sold or exchanged on its own schedule.
Many owners already hold the building in a separate LLC that leases it to the operating company, often on an informal lease that has rarely been revisited. That structure is the easiest to sell around, because the business buyer can sign a new lease or buy the LLC’s building in a second contract. When the building sits inside the company, the choice between an asset sale and a stock sale decides whether it can be exchanged at all.
How does an asset sale or a stock sale change what happens to the building?
In an asset sale, the company sells its assets, including the building, so the company can exchange it. In a stock sale, or a sale of interests in an LLC taxed as a partnership, the buyer purchases the ownership interest and the building stays inside the entity, so the seller has sold an interest rather than real estate.
A single-member LLC that has not elected corporate tax treatment is the exception. The IRS disregards it and treats a sale of all of its interests as a sale of its assets, building included.
The comparison below shows how each structure treats a building owned by the operating company.
| Factor |
Asset Sale |
Stock or Partnership Interest Sale |
| What the buyer purchases |
Selected assets, including the building if it is part of the deal |
The owner’s shares or partnership interests |
| Who owns the building after closing |
The buyer, or the seller’s company if the building is carved out |
The same entity, now owned by the buyer |
| Can the seller exchange the building |
Yes, the selling entity can exchange it |
No, because shares and partnership interests are not real property, although a sale of a whole single-member LLC counts as a sale of its building |
| How the building’s value is set |
Allocated in the purchase agreement and on Form 8594 |
Priced inside the share price |
| Usual preference |
Buyers, for the stepped-up basis |
Sellers of C corporations, to avoid a second layer of tax |
Can you 1031 exchange the building in a stock sale?
No, a stock sale gives the seller nothing to exchange, because the seller sells shares and the building never leaves the company. Treas. Reg. 1.1031(a)-3 lists stock and partnership interests among the assets that are not real property for Section 1031, regardless of how state law classifies them.
When a buyer acquires at least 80 percent of an S corporation’s stock, the parties can elect under Section 338(h)(10), which requires a corporate buyer, or under Section 336(e), which does not. Either election treats the stock sale as a sale of the company’s assets followed by a liquidation for federal tax purposes. The regulations for both elections state that the company recognizes all of the gain on that deemed sale, with an exception only for the installment method, so a seller who wants to exchange the building should plan on a real asset sale or on taking the building out of the company first.
Can you move the building out of the company before the sale?
Yes, you can move the building out of the company before the sale, but the tax cost depends on the entity. Under IRC Section 311(b), a corporation that distributes appreciated property recognizes gain as if it had sold the property at fair market value, and that gain is taxed before any exchange can begin.
A C corporation pays tax on that gain, and the shareholder generally owes a second tax because the building’s value is treated as a dividend. An S corporation passes the gain through to its shareholders instead of paying it at the corporate level. An S corporation that converted from a C corporation can also owe corporate-level built-in gains tax on the appreciation that existed at conversion if it distributes or sells the building within five years after its first S corporation year begins.
An LLC taxed as a partnership can generally distribute property to a member without current tax under Section 731. Exceptions apply when a member contributed appreciated property within the previous seven years, or when the distribution shifts mortgage debt so that a member’s share falls by more than that member’s basis in the LLC. A distribution timed right before a sale also raises the holding and timing questions covered in our post on the drop and swap. Each route needs a CPA’s numbers before the letter of intent is signed.
What are your three options for the building?
An owner who sells the business can keep the building and lease it to the buyer, sell it to the buyer with the business, or sell it to an investor in a sale-leaseback before the business sells. Each path changes how much cash arrives at closing and what risk the owner keeps.
The table compares the three paths on cash, tax and risk.
| Factor |
Keep and Lease to the Buyer |
Sell to the Business Buyer |
Sale-Leaseback to an Investor |
| Cash for the building at closing |
None, because rent arrives monthly |
The building’s allocated price |
The investor’s price, set by the new lease |
| Tax on the building now |
None until a later sale |
Due unless exchanged |
Due unless exchanged |
| 1031 exchange available |
Later, when the building sells |
Yes, if the owner of the building sells it |
Yes, if the owner of the building sells it |
| Owner’s role after closing |
Landlord to the new operator |
None |
None |
| Main risk kept |
The buyer’s credit and the vacancy risk of one tenant |
Reinvestment and timing |
Reinvestment and timing |
| Best fit |
Owners who want income and can wait to sell |
Buyers who want to own and can finance the building |
Buyers who want the business without the real estate |
The choice is also a choice about where future income comes from. In Chapter 3, About NNN Property, of The NNN Triple Net Property Book, Alan Fruitman writes, “You are financially comfortable when you have enough spending money to not worry about day-to-day expenses. You are wealthy when all of your spending money comes from the income of your investments.” A business sale ends the paycheck from the business, and the building is often the largest asset left that can replace it with investment income.
Should you keep the building and lease it to the buyer of your business?
Yes, keeping the building and leasing it to the buyer of your business makes sense when the owner wants income, the buyer is creditworthy, and the rent is at market. The owner becomes landlord to one tenant whose credit is usually far weaker than a national NNN tenant’s, so the lease, guarantee and buyer’s financing deserve an investor’s scrutiny.
A building leased to one operator carries the vacancy risk described in our comparison of single-tenant vs multi-tenant NNN property. If the operator fails, the building produces no income until it is re-leased. A buyer that financed the acquisition with debt also has less room to absorb a bad year than the owner did.
Keeping the building also defers the decision on the building’s tax. A building held for investment after the business sale can still be sold later and exchanged into NNN property, so leasing now does not close the door on a 1031 exchange. An S corporation that still carries earnings from its years as a C corporation should have its CPA check the passive investment income limits in Sections 1375 and 1362(d)(3) before it keeps the building as a rental.
What lease terms protect you when the buyer becomes your tenant?
The lease protects the owner when it is written as a true NNN lease at market rent, with a term that lets the building be sold or financed later. The tenant should pay taxes, insurance and maintenance, and the buyer’s principals should guarantee the rent, since the operating entity is usually new and thinly capitalized.
Owners who keep the building often ask for these provisions:
- The guarantee comes from the buyer’s parent or principals and stays in place for the full term.
- A security deposit or letter of credit covers several months of rent and is drawn on before any lawsuit.
- The tenant delivers annual financial statements so the owner can track rent coverage.
- Assignment and subletting require the landlord’s consent, so the lease cannot pass to a weaker operator without review.
- The tenant must sign an estoppel certificate on request, which a future buyer or lender will require.
- The lease sets rent increases and renewal rent in advance, so a later buyer or lender can value the building from the lease rather than from a rent negotiation still to come.
Even a well-written lease does not end the risk of a failed operator, and if the tenant files for bankruptcy, the owner’s rights are set by the federal Bankruptcy Code. Our guide to tenant bankruptcy explains how a rejected lease is treated and how much an owner can recover.
How does the rent you set change the price of both the business and the building?
Rent moves value between the business and the building. Every dollar of rent lowers the business’s earnings, so a buyer pays less for the business, while the same dollar raises the building’s value at its cap rate. Because a building’s rent usually sells for a higher multiple than the business’s earnings, higher rent shifts value toward the building.
The illustrative example below assumes the business earns $1,000,000 a year before rent, sells at 5.0 times earnings after rent, and the leased building is valued at a 7.0 percent cap rate.
| Annual Rent |
Business Earnings After Rent |
Business Value at 5.0x |
Building Value at 7.0% |
Combined Value |
| $150,000 |
$850,000 |
$4,250,000 |
$2,142,857 |
$6,392,857 |
| $200,000 |
$800,000 |
$4,000,000 |
$2,857,143 |
$6,857,143 |
| $250,000 |
$750,000 |
$3,750,000 |
$3,571,429 |
$7,321,429 |
In this example, each extra dollar of rent removes $5 from the business price and adds about $14.29 to the building’s value. That gap is why buyers, their lenders and any later NNN investor all test whether the rent is at market, and a market rent opinion from an appraiser keeps the number defensible.
When should you sell the building to the buyer of your business?
Selling the building to the business buyer fits when the buyer wants to own its location and can finance both the business and the real estate. The owner leaves with no landlord role, and the building’s share of the price can go into a 1031 exchange if the entity that owns the building is the seller.
This path puts the most weight on the purchase price allocation, because the price the buyer pays for the building is the most the owner can exchange. It also puts the exchange on the business deal’s timetable, so the qualified intermediary and the search for replacement property need to start before the closing date is set.
Can the building go into a 1031 exchange when the rest of the business sale cannot?
Yes, the building can be exchanged even though the goodwill and equipment sold with it are taxed. IRC Section 1060 states that a sale still counts as an applicable asset acquisition when Section 1031 applies to only part of the assets, so the exchange and the allocation rules work side by side.
When the building and the business belong to different taxpayers, such as the owner’s single-member LLC and an S corporation, the building’s sale is a separate transaction with its own price, because Treas. Reg. 1.1060-1(b)(5) groups only transfers from the same seller to the same purchaser. A single-member LLC is disregarded for this test, so it does not separate the sales when the owner runs the business as a sole proprietor or through another single-member LLC. Both prices should still reflect fair market value, since the IRS can challenge a split that shifts value from the business to the building.
A separate purchase agreement for the real estate, or a separate real estate section with its own price, makes the exchange easier to document and assign to the qualified intermediary. The 45-day and 180-day periods run from the day the building transfers, not from the date the business sale was signed, and the 180-day period ends sooner if the due date of the tax return for that year, including extensions, comes first.
When does a sale-leaseback before the business sale make sense?
A sale-leaseback fits when the likely buyers of the business want the operations but not the real estate. The owner sells the building to an investor, the operating company signs a new long-term NNN lease, and the business is then sold with that lease in place. The owner’s building entity can exchange its proceeds.
Many business buyers, including private equity firms, would rather spend their capital on the business than on buildings. Alan Fruitman makes the same point about national retailers in The NNN Triple Net Property Book, explaining that a company that ties up money in real estate has less available to expand its business, which is why most national tenants rent rather than own.
The lease decides the price. An investor values a sale-leaseback on the strength of the tenant, the rent and the term, and a lease signed by a private, single-location operator usually trades at a higher cap rate than one backed by a national credit tenant. Rent set above market raises the building’s price but lowers the business’s value and makes the lease more likely to be rejected if the operator later fails.
Selling the building to an investor is a separate listing with its own buyer pool, and a broker who sells net leased property can market it to that pool. Real Estate Broker Match refers owners to listing brokers nationwide for this kind of sale.
Why does goodwill never qualify for a 1031 exchange?
Goodwill never qualifies because Section 1031 covers only real property, and goodwill is neither land, an improvement to land, nor an interest in real property. Even before 2018, when personal property could be exchanged, Treas. Reg. 1.1031(a)-2(c)(2) provided, as it still does, that the goodwill of one business is not of like kind to the goodwill of another.
The 2020 regulations define real property as land, improvements to land, unsevered natural products of land, and water and air space above land, along with interests in real property such as leaseholds and easements. Treas. Reg. 1.1031(a)-3(a)(5)(ii) also states that a license or permit to operate a business on real property is not real property, so the value of a business’s right to operate does not become exchangeable by sitting inside a building.
Which parts of a business sale can go into a 1031 exchange?
Only the land, the building and other interests in real property can go into a 1031 exchange. Equipment, inventory, receivables, customer lists and goodwill do not qualify and are taxable on the sale. The table uses the seven asset classes from the Form 8594 instructions, which every applicable asset acquisition follows.
| Asset Class |
What It Includes |
Can It Go Into a 1031 Exchange? |
| Class I |
Cash and bank deposits |
No |
| Class II |
Actively traded securities, certificates of deposit and foreign currency |
No |
| Class III |
Accounts receivable, other debt instruments and assets marked to market at least annually |
No |
| Class IV |
Inventory |
No |
| Class V, real property |
Land, buildings, structural components and other real property |
Yes |
| Class V, other assets |
Equipment, furniture, vehicles and other personal property |
No, because personal property has not qualified since 2018 |
| Class VI |
Section 197 intangibles other than goodwill, such as a noncompete, licenses and customer lists |
No |
| Class VII |
Goodwill and going concern value |
No |
Fixtures and building systems that count as real property under the regulations or state law can qualify even when they were depreciated as personal property.
How does purchase price allocation affect the tax on the building?
The purchase price allocation sets how much of the price is real estate, and only that amount can be exchanged. Under Section 1060, buyer and seller allocate the price across the seven asset classes using the residual method, so goodwill takes whatever is left after the other classes are filled at fair market value.
Buyer and seller want different allocations, because each asset class is taxed differently on each side.
| Asset |
Buyer’s Tax Result |
Seller’s Tax Result |
| Land |
Not depreciable |
Section 1231 gain, generally taxed as long-term capital gain, which can be deferred in a 1031 exchange |
| Building |
Depreciated over 39 years |
Section 1231 gain, generally taxed as long-term capital gain, with the part from prior depreciation taxed at up to 25 percent. It can be deferred in a 1031 exchange. |
| Equipment |
Depreciated over 5 or 7 years, often faster with bonus depreciation |
Ordinary income up to the depreciation taken |
| Noncompete agreement |
Amortized over 15 years |
Ordinary income |
| Goodwill |
Amortized over 15 years |
Generally long-term capital gain when the seller built the goodwill rather than bought it |
The rates in the table apply to individuals and to owners of S corporations and LLCs. A C corporation pays a flat 21 percent on all of these gains.
The tension is easy to price. If an appraisal supports moving $300,000 from goodwill to the building, the seller defers tax on that $300,000 instead of paying about $60,000 at a 20 percent rate, while the buyer’s annual deduction on it falls from $20,000 over 15 years to at most about $7,692 over 39 years. The appraisal has to support the move, because the allocation must reflect fair market value.
Is the purchase price allocation binding on you and the buyer?
Yes, a written allocation generally binds both parties. Section 1060(a) provides that when buyer and seller agree in writing on the allocation or on the value of any asset, the agreement binds both of them unless the IRS determines it is not appropriate. Both parties report it on Form 8594 with their returns for the year of sale.
The instructions carve out the exchanged portion. Form 8594 is not required for assets exchanged under Section 1031, but it is required for the part of the sale that does not qualify, so a business sale with an exchanged building still files it for the goodwill and equipment. A seller who negotiates the allocation after the price is set loses most of the leverage.
How much tax does each piece of a business sale carry?
Each asset in a business sale carries its own tax, so the total depends on the mix. Equipment recapture is ordinary income, prior depreciation on the building is taxed at up to 25 percent, and the rest of the building gain and the goodwill are generally taxed as long-term capital gain.
This illustrative example assumes a $6,000,000 sale of an owner’s business and building. The S corporation sells equipment and goodwill, and the owner’s single-member LLC sells the building to the same buyer. The building cost $1,200,000, of which $300,000 was land, and has $400,000 of depreciation, for an $800,000 adjusted basis. The equipment cost $600,000 and has $550,000 of depreciation.
The table shows the federal tax on each piece of the sale, with and without the building exchanged.
| Asset |
Allocated Price |
Gain |
Federal Tax at Top Rates |
Tax With the Building Exchanged |
| Land and building |
$2,400,000 |
$1,600,000 |
$340,000 |
$0 |
| Equipment |
$400,000 |
$350,000 |
$129,500 |
$129,500 |
| Goodwill |
$3,200,000 |
$3,200,000 |
$640,000 |
$640,000 |
| Total |
$6,000,000 |
$5,150,000 |
$1,109,500 |
$769,500 |
The building’s $340,000 is $400,000 of prior depreciation at 25 percent plus $1,200,000 of appreciation at 20 percent. The equipment’s $129,500 is $350,000 of recapture at 37 percent, and the goodwill’s $640,000 is 20 percent of $3,200,000.
The figures leave out state tax and assume the owner’s other ordinary income already reaches the 37 percent bracket, which in 2026 begins above $768,700 of taxable income on a joint return. They also assume the owner materially participated in the business, which generally keeps these gains out of the 3.8 percent net investment income tax. The exchanged column assumes the owner reinvests all proceeds, replaces the debt and has no building components depreciated as personal property, which can trigger recapture even in an exchange.
The exchange defers $340,000 of tax and nothing more, because the other $3,550,000 of gain is not real property. How each layer is calculated is covered in our guides to capital gains tax on real estate and depreciation recapture.
How does a business sale change the 1031 exchange of the building?
A business sale changes the 1031 exchange of the building in three ways. The business deal usually sets the building’s closing date and so starts the 45-day clock, the seller’s advisers on that deal cannot serve as the qualified intermediary, and the entity that sold the building must be the one that buys the replacement property.
That rule is the same taxpayer requirement. For a single-member LLC, the taxpayer is the owner, so the owner or another single-member LLC the owner wholly owns can take title. A partner who wants cash and a partner who wants NNN income generally cannot get both results inside one LLC’s exchange, which is the problem a drop and swap is designed to solve.
Under Treas. Reg. 1.1031(k)-1(k)(2), anyone who acted as the seller’s employee, attorney, accountant, investment banker, broker or real estate agent within the two years before the building transfers is a disqualified person. The exceptions are services only for 1031 exchanges and routine financial, title insurance, escrow or trust services from a financial institution, title insurance company or escrow company. Firms related to those advisers can also be disqualified, so the qualified intermediary should be independent of the deal team described in our 1031 exchange team guide.
In Chapter 2, What NNN Buyers Need to Know, of The NNN Triple Net Property Book, Alan Fruitman writes, “There comes a time in most people’s life when preserving their assets becomes more important than trying to exponentially increase them. This transition normally comes around the time of retirement. When you retire, safe and predictable income is normally the top priority.” A business exit is often that moment, and the replacement property is usually chosen for credit and lease term rather than growth, as our guide to a 1031 exchange in retirement explains.
The search should start before the business closes, because the business deal sets the building’s closing date and the 45-day clock starts the day the building transfers. Our post on when to hire a 1031 buyer broker lays out that timeline. An owner who keeps exchanging until death follows the strategy Alan calls 1031 Until You Die, in which heirs receive a stepped-up basis.
When should a business seller pay the tax on the building instead?
A 1031 exchange of the building is the wrong move for a business seller who needs the cash, has a small gain on the building, or wants out of real estate entirely. Paying the tax on a modest gain can cost less than the risk of a rushed replacement purchase made on the business deal’s timetable.
Our guide on whether to do a 1031 exchange or pay the tax walks through that decision. A seller who finances the buyer’s purchase of the building can also spread the gain under the installment method instead, which our comparison of a 1031 exchange vs installment sale explains. Gain from straight-line depreciation on a building is reported as the payments arrive, and Treas. Reg. 1.453-12 counts it before the rest of the gain, while components depreciated as personal property are recaptured in the year of sale under Section 453(i).
About the Author
Alan Fruitman is the founder of 1031tax.com and President & Managing Broker of Real Estate Foundation, Inc. Alan began his real estate career in 1993 and has closed more than 1,000 properties valued at several billion dollars. He is the author of The NNN Triple Net Property Book and is a nationally recognized authority on single tenant net leased property and IRC Section 1031 exchanges. With more than 30 years of experience, Alan advises investors on identifying, underwriting, and acquiring absolute NNN leased assets with corporate guarantees, including banks, quick service restaurants, pharmacies, dollar stores, convenience stores, and auto related retailers. Alan holds Colorado real estate license ER1322889 and helps buyers and sellers nationwide.
This article is for general informational purposes only and does not constitute legal, tax, financial, or real estate advice. Every exchange and tax situation is unique. We strongly encourage you to work with qualified professionals, including a qualified intermediary, CPA, and real estate attorney, before making any decisions related to a 1031 exchange. 1031tax.com is a service of Real Estate Foundation, Inc.