An S corporation asset sale example is the clearest way to see why sellers often owe more tax than they expect: the gain doesn’t come out as one clean capital gain. It gets split among ordinary income, a 25% rate on certain real estate gain, and long-term capital gain, and each piece is taxed at its own rate on the shareholder’s personal return. For 2026, the top ordinary rate is 37% and the top long-term capital gains rate is 20%, so a profitable sale can produce a blended effective rate well above what the shareholder assumed going in.1Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026
Why the Gain Gets Split Into Pieces
In a stock sale, the shareholders sell their ownership interest and the entire gain is typically long-term capital gain. An asset sale works differently. The S corporation sells its individual assets, and each asset produces its own gain with its own tax character. Inventory gain is ordinary. Equipment gain is largely ordinary because of depreciation recapture. Real estate gain carries a special 25% rate on the portion tied to prior straight-line depreciation. Only what’s left, typically goodwill, comes out as long-term capital gain.
Buyers usually push for asset sales because they get a stepped-up basis in each acquired asset, which produces bigger depreciation and amortization deductions for years. Sellers agree, often at a higher price, and then discover the tax cost of the fragmentation.
How the Price Gets Divided Among Assets
Federal law requires buyer and seller to agree on how the purchase price is allocated across the acquired assets, and both parties report the allocation on Form 8594.2Office of the Law Revision Counsel. 26 USC 1060 – Special Allocation Rules for Certain Asset Acquisitions3Internal Revenue Service. About Form 8594, Asset Acquisition Statement Under Section 1060 The allocation uses the residual method: seven asset classes are filled in order up to fair market value, and whatever purchase price remains at the end lands in Class VII as goodwill.4eCFR. 26 CFR 1.1060-1 – Special Allocation Rules for Certain Asset Acquisitions
The classes that matter most for the tax result:
- Classes I through IV cover cash, securities, and inventory. Inventory gain is ordinary income.
- Class V is tangible business assets, including equipment, vehicles, and buildings. This is where depreciation recapture lives.
- Class VI is intangibles other than goodwill, such as non-compete agreements and customer lists.
- Class VII is goodwill and going concern value, the residual bucket. Goodwill gain is generally long-term capital gain.
Class V is where the surprise usually hits. Under Section 1245, gain on equipment or other tangible personal property is converted to ordinary income up to the amount of depreciation previously claimed on that asset.5Office of the Law Revision Counsel. 26 USC 1245 – Gain From Dispositions of Certain Depreciable Property If you depreciated a machine by $100,000 and sell it at a $90,000 gain, the full $90,000 is ordinary. Buildings follow Section 1250. Most commercial real estate placed in service after 1986 was depreciated straight-line, so there is typically no ordinary recapture. Instead, gain up to the amount of prior straight-line depreciation becomes “unrecaptured Section 1250 gain,” taxed at a maximum federal rate of 25%.6Office of the Law Revision Counsel. 26 USC 1250 – Gain From Dispositions of Certain Depreciable Realty
A Worked Example: Alpha Services
Alpha Services is an S corporation owned entirely by Mr. Smith, who has a stock basis of $150,000. Alpha sells all of its operating assets for $1,500,000 in cash, and the buyer assumes $100,000 in liabilities. Total consideration to allocate: $1,600,000.
Step 1: Allocate the Price
Alpha’s assets, adjusted tax basis, and fair market value:
- Cash: $50,000 basis, $50,000 FMV, $50,000 allocated.
- Inventory: $150,000 basis, $200,000 FMV, $200,000 allocated.
- Equipment: $200,000 basis, $450,000 FMV, $450,000 allocated. Original cost $450,000 with $250,000 in accumulated depreciation.
- Building: $400,000 basis, $600,000 FMV, $600,000 allocated. Original cost $600,000 with $200,000 in accumulated straight-line depreciation.
- Goodwill: $0 basis. The residual $300,000 lands here ($1,600,000 total minus $1,300,000 already allocated).
Total basis across all assets is $800,000. Total allocation is $1,600,000. Total gain: $800,000.
Step 2: Sort the Gain by Character
- Cash: no gain.
- Inventory: $50,000 of ordinary income.
- Equipment: $250,000 gain. Because Alpha claimed $250,000 in depreciation on this equipment, the entire $250,000 is Section 1245 ordinary income.5Office of the Law Revision Counsel. 26 USC 1245 – Gain From Dispositions of Certain Depreciable Property
- Building: $200,000 gain, all of it unrecaptured Section 1250 gain because prior depreciation was straight-line. Taxed at a maximum rate of 25%.
- Goodwill: $300,000 of long-term capital gain.
The $800,000 total gain breaks down as $300,000 ordinary (inventory plus equipment recapture), $200,000 unrecaptured Section 1250 gain, and $300,000 long-term capital gain.
Step 3: Push the Gain to the Shareholder
Alpha does not pay tax on this gain. It reports the sale on Form 1120-S and passes the gain through to Mr. Smith on Schedule K-1, broken out by character.7Internal Revenue Service. Instructions for Form 1120-S (2025) The corporation itself does not file Form 4797. Mr. Smith reports the gains on his own Form 4797 with his personal return using the information on his K-1.8Internal Revenue Service. Instructions for Form 4797 (2025) Alpha does separately file Form 8594 to report the purchase price allocation.3Internal Revenue Service. About Form 8594, Asset Acquisition Statement Under Section 1060
Step 4: Estimate the Tax
Assume Mr. Smith’s other income already puts him in the top 2026 brackets:1Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026
- $300,000 ordinary at 37%: about $111,000.
- $200,000 unrecaptured Section 1250 gain at 25%: $50,000.
- $300,000 long-term capital gain at 20%: $60,000.
Federal income tax comes to roughly $221,000, plus any state income tax. Several states also impose an entity-level tax on S corporations at varying rates. And the tax is owed for the year of the sale regardless of whether Alpha has distributed the cash. That timing mismatch catches people off guard. The bill arrives whether or not the money is in the shareholder’s account.
Extra Taxes That Can Stack On Top
The 3.8% Net Investment Income Tax
Shareholders who did not materially participate in the business face an additional 3.8% net investment income tax. It applies to the lesser of net investment income or the amount by which modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly.9Internal Revenue Service. Questions and Answers on the Net Investment Income Tax Those thresholds are not adjusted for inflation.
For a passive shareholder, gain from the sale of S corporation assets is net investment income. If Mr. Smith were passive with $800,000 of gain and MAGI well above the threshold, NIIT could add up to $30,400 ($800,000 times 3.8%). Shareholders who actively ran the business are generally exempt, so the material participation question should be settled before closing.
The Built-in Gains Tax for Former C Corporations
If the S corporation used to be a C corporation, Section 1374 imposes a corporate-level tax of 21% on gains that existed at the time of conversion, but only if the asset is sold within five years of the conversion date.10Office of the Law Revision Counsel. 26 USC 1374 – Tax Imposed on Certain Built-in Gains
Suppose Alpha converted from C to S status three years before the sale, and at the time of conversion the building’s fair market value exceeded basis by $150,000. A sale inside the five-year window subjects up to $150,000 of the building’s gain to the 21% tax at the corporate level. Mr. Smith still pays personal tax on the full pass-through gain, but he gets a deduction for the built-in gains tax the corporation paid. Once the five-year window closes, the built-in gains tax no longer applies, so recent converters have a strong reason to watch the calendar.
What Happens to the Cash Afterward
The $800,000 gain that flows through to Mr. Smith increases his stock basis from $150,000 to $950,000 immediately, before any cash moves. That basis increase is what prevents the sale proceeds from being taxed a second time when they are distributed.
If the S corporation has accumulated earnings and profits left over from prior C corporation years, it maintains an Accumulated Adjustments Account tracking income that has already been taxed at the shareholder level. Distributions come out in order:11Internal Revenue Service. Distributions With Accumulated Earnings and Profits – IRS Practice Unit
- First from AAA, tax-free up to the AAA balance. In the example, the first $800,000 distributed reduces AAA and stock basis without additional tax.
- Then from accumulated C corporation earnings and profits, taxable as dividends.
- Then as a tax-free return of basis until stock basis reaches zero.
- Any further distributions become capital gain from a deemed sale of stock.
Timing Traps: The Installment Method Has Limits
Sellers who take payments over several years can defer gain using the installment method, with two big exceptions. Depreciation recapture cannot be deferred. All Section 1245 recapture and unrecaptured Section 1250 gain must be reported in the year of sale, even if no payment has arrived yet.12Internal Revenue Service. Publication 537, Installment Sales In the Alpha example, the $250,000 of equipment recapture and $200,000 of unrecaptured Section 1250 gain hit Mr. Smith’s return in year one no matter the payment schedule. Inventory is also ineligible for installment reporting, so the $50,000 of ordinary income from inventory is recognized up front too.
When the S corporation liquidates after the sale and distributes installment notes to the shareholders, Section 453(h) lets the shareholders continue reporting gain on the installment method as they collect payments.
Ways to Reduce the Bill
Personal Goodwill
If a key shareholder’s personal reputation, client relationships, or expertise are what the buyer is really paying for, a portion of the price may be attributable to that individual’s personal goodwill rather than to a corporate asset. Structured correctly, the shareholder sells the personal goodwill directly to the buyer in a side transaction. The payment bypasses the S corporation, avoids any built-in gains tax exposure, and comes to the shareholder as long-term capital gain.
Courts have accepted this treatment, but the facts have to support it. The shareholder cannot have a non-compete or employment contract that already transferred the goodwill to the corporation. The individual must have been free to leave and compete. A third-party appraisal allocating value between personal and corporate goodwill strengthens the position. Without documentation and proper formalities, the IRS will treat the entire amount as a corporate asset sale.
Suspended Passive Losses
Passive shareholders may have accumulated passive activity losses that were suspended for lack of passive income to offset. When those shareholders dispose of their entire interest in the activity, all suspended losses are released and become fully deductible in that year.13Internal Revenue Service. Publication 925 (2025), Passive Activity and At-Risk Rules $80,000 in suspended losses becomes $80,000 available to offset the sale-year income. Pull the carryforward numbers before closing so the net tax picture is accurate.
Section 338(h)(10)
When buyer and seller cannot agree on structure, a joint election under Section 338(h)(10) is a common compromise. The buyer purchases the stock, but both parties elect to treat the transaction as if the corporation sold its assets and then liquidated. The buyer gets the stepped-up basis it wanted, and the selling shareholders report gain as they would in an asset sale.14Internal Revenue Service. Instructions for Form 8023, Elections Under Section 338 for Corporations Making Qualified Stock Purchases
Every S corporation shareholder must consent to the election, including those who are not selling. The election is made on Form 8023, due by the 15th day of the ninth month after the acquisition date. Miss that deadline and the election is gone. A separate election under Section 336(e) can reach a similar result when the buyer is not a corporation or the transaction does not meet the technical requirements of 338(h)(10).