Sale of S Corporation Stock Mid-Year: Basis, Income Allocation, and Tax

Selling your S corporation shares partway through the tax year sets three tasks in motion: finalize your stock basis as of the closing date, agree with the buyer on how the corporation’s annual income gets split between you, and report the resulting capital gain at the correct rate. The sale of S corporation stock mid-year gets messy because the corporation still files one annual return, and the allocation choice alone can move thousands of dollars of taxable income from one party to the other. Everything below is federal treatment; state rules add their own layer.

Fixing Your Stock Basis as of the Sale Date

Your stock basis is the running total of your tax investment in the S corporation, and it determines whether you walk away with a gain or a loss. It starts with what you paid for the stock (cash plus the adjusted basis of any property you contributed) and moves every year with corporate activity. Before you sign anything, calculate it precisely as of the sale date.1Internal Revenue Service. S Corporation Stock and Debt Basis

The adjustments run in a specific order, and the order matters:

  • Increases first. Add your share of ordinary business income, separately stated income items (interest, capital gains, and the like), tax-exempt income, and any additional capital you contributed during the year.
  • Then subtract distributions of cash or property.
  • Then subtract your share of nondeductible corporate expenses, such as penalties or the disallowed half of meals.
  • Losses last. Subtract your share of losses and deductions, but only down to zero. Basis never goes negative.

Income has to raise basis before distributions and losses draw it down. Skip the sequence and a routine distribution can look like it exceeded basis and generated phantom gain.

If a distribution actually exceeds your stock basis, the excess is taxed as capital gain on your personal return. When the corporation has no accumulated earnings and profits from a prior C corporation period, distributions run tax-free up to basis and anything above is gain. When it does have accumulated E&P, distributions above the accumulated adjustments account can be treated as dividends before excess-over-basis gain kicks in.2Office of the Law Revision Counsel. 26 USC 1368 – Distributions A big distribution shortly before closing needs particular attention, because any gain it produces reduces the basis available to offset gain on the stock sale itself.

One distinction trips up experienced preparers. Debt basis is not part of this calculation. If you loaned money directly to the corporation, that loan created a separate debt basis that can absorb pass-through losses, but only stock basis figures into gain or loss when you sell the shares.1Internal Revenue Service. S Corporation Stock and Debt Basis

Splitting the Year’s Income Between You and the Buyer

The corporation files one Form 1120-S for the full year, but two people owned your shares during it. The code offers two ways to divide that annual income, loss, and deduction. The choice flows directly into each party’s K-1 and, through the K-1, into each party’s basis at the moment of the sale.

The Per-Day Default

Without a specific election, the default applies. The corporation figures total annual income and loss as if nothing changed, divides by the number of days in the year, and assigns each day’s slice to whoever held the stock that day.

It’s simple, and it can be blind to reality. If most of the year’s income lands after you sell, some of it still flows to you based on the days you held the stock. The reverse works the same way: a large loss after the sale can partly reduce your income for the year. Sellers sometimes prefer the default when they expect the corporation to generate losses or tax-exempt income after the sale date, because those items still travel partly to them.

Closing of the Books

The alternative is an election under Section 1377(a)(2) that treats the corporation’s tax year as two separate periods, one ending on the sale date and the next starting the day after. The corporation performs an interim close to calculate income and deductions actually earned in each period.3Office of the Law Revision Counsel. 26 USC 1377 – Definitions and Special Rule

Two conditions matter. The election is available only when a shareholder’s entire interest terminates, so a partial sale is out. And the corporation and all “affected shareholders” must consent. Affected shareholders means you and the buyer when you sell to another person; if you instead sell the shares back to the corporation, the group expands to everyone who held stock at any point during the year.3Office of the Law Revision Counsel. 26 USC 1377 – Definitions and Special Rule

Once made, the election is irrevocable. It’s the better answer whenever income is heavily concentrated on one side of the sale date, because each party is taxed on what was actually earned during their ownership. Which method to use is a standard negotiation point in the purchase agreement, since the outcome is essentially a wealth transfer between buyer and seller.

Calculating Your Gain or Loss

Once your adjusted basis is set (including any income allocated to you under the method above), the formula is simple: sale price minus adjusted stock basis. The sale price includes cash plus the fair market value of any non-cash consideration. A positive number is taxable gain; a negative one is a deductible loss.

S corporation stock is a capital asset, so gain or loss is capital in character. Holding period sets the rate. One year or less is short-term, taxed at ordinary rates. More than one year is long-term, taxed at preferential rates.

A net capital loss offsets other capital gains first, then reduces ordinary income by up to $3,000 per year ($1,500 if you file separately).4Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Any unused amount carries forward indefinitely.5Internal Revenue Service. Topic No. 409 Capital Gains and Losses

Boundary worth stating: the Section 1202 qualified small business stock exclusion, which can exempt up to 100% of gain on some C corporation stock, does not reach S corporation shares. Section 1202 requires original issuance by a C corporation, so S corp shares are ineligible regardless of company size or industry.

Rates and the 3.8% Surtax

For 2026, long-term capital gains rates depend on your taxable income and filing status. Single filers pay 0% up to $49,450, 15% through $545,500, and 20% above that. For joint filers, the 15% bracket starts at $98,900 and 20% starts at $613,700. Short-term gain is added to ordinary income and taxed at your marginal rate, which can reach 37%.

Higher-income sellers also face the 3.8% net investment income tax. It applies once modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). These thresholds aren’t indexed for inflation.6Internal Revenue Service. Net Investment Income Tax

Gain on S corporation stock is generally net investment income for this purpose.7eCFR. 26 CFR 1.1411-4 – Definition of Net Investment Income There is a carve-out: gain attributable to a trade or business you materially participated in (and that isn’t a financial trading operation) can be excluded. Proving material participation at the shareholder level requires documentation of the hours you actually spent in the business. Passive investors should assume the surtax hits their whole gain. Top-bracket sellers on long-term gain can see a combined federal rate of 23.8%.

What Happens to Your Suspended Losses

If your share of corporate losses ever exceeded your combined stock and debt basis, the excess was suspended and carried forward. Many sellers assume the sale finally frees those losses. It usually doesn’t.

Suspended losses carry forward only with respect to that shareholder and are treated as if the corporation incurred them the following year. Sell your entire interest and you have no stock or debt basis the next year for those losses to hit against. They are permanently forfeited. The only exception is a transfer to a spouse or incident to divorce, where the suspended losses follow the stock to the new owner.8Office of the Law Revision Counsel. 26 USC 1366 – Pass-Thru of Items to Shareholders

If you’re sitting on significant suspended losses, run the math on contributing additional capital before the sale to restore basis and unlock the deduction. Whether it pays off depends on your marginal rate and the size of the contribution you’d need, but writing off large suspended losses without checking is a common and expensive mistake.

When the Buyer Pays Over Multiple Years

If the deal spreads payments across two or more tax years, you can report the gain under the installment method and pay tax as you receive each payment.9Internal Revenue Service. Form 6252, Installment Sale Income

The method is available for stock that isn’t publicly traded. Publicly traded stock triggers full recognition in the year of sale regardless of the payment schedule.10Office of the Law Revision Counsel. 26 USC 453 – Installment Method Closely held S corporation shares almost always qualify.

You report the sale on Form 6252 in the year of sale and every year afterward until you receive the final payment. The form calculates a gross profit percentage that applies to each payment. If the sale produces a loss, the installment method isn’t available at all; a loss is recognized entirely in the sale year.

One point worth flagging: even with installment reporting, your share of pass-through income or loss for the portion of the year you owned the stock is taxable in the sale year. Installment treatment defers the gain on the stock, not the K-1 income.

Treating the Stock Sale as an Asset Sale

In many S corporation deals, the buyer and seller can jointly elect under Section 338(h)(10) to treat the stock purchase as if the corporation had sold all its assets and liquidated. The transaction is recharacterized in full: the corporation is deemed to sell its assets at fair market value, distribute the proceeds to you, and liquidate.

The buyer gets a stepped-up basis in the corporation’s assets, meaning larger depreciation and amortization deductions going forward. Your tax picture shifts too. Instead of a single capital gain on stock, you recognize gain on a deemed asset sale, which can include ordinary income from depreciation recapture on equipment and other depreciable property. The trade-off usually favors the buyer, so sellers typically negotiate a higher price to compensate for the harsher character of the gain.

The election requires the buyer to be a corporation that acquires at least 80% of the target’s voting power and value within 12 months. All S corporation shareholders must consent, including any who aren’t selling. The parties file Form 8023 jointly by the 15th day of the ninth month after the acquisition date.11Internal Revenue Service. Instructions for Form 8023

A related election under Section 336(e) plays a similar role but doesn’t require the buyer to be a corporation. Individuals and partnerships can qualify as purchasers, and the seller and the target make the election without needing the buyer’s agreement. When the buyer isn’t a corporation, Section 336(e) is the only route to asset-sale treatment.

Built-in Gains Tax if the Company Used to Be a C Corp

If the S corporation was previously a C corporation (or picked up assets from one in a tax-free transaction), an entity-level tax can apply to built-in gains recognized during the first five years of S status.12Office of the Law Revision Counsel. 26 USC 1374 – Tax Imposed on Certain Built-In Gains The tax hits the corporation, not you, but it reduces after-tax income flowing to shareholders.

The tax applies when the corporation disposes of assets it held at the time of conversion and the sale price exceeds the asset’s basis as of the conversion date. The rate is a flat 21%. Assets acquired after the S election generally aren’t subject.12Office of the Law Revision Counsel. 26 USC 1374 – Tax Imposed on Certain Built-In Gains

For a mid-year stock sale this matters in two places. First, a Section 338(h)(10) election that produces a deemed asset sale can trigger the built-in gains tax on former C corporation assets and cut your net proceeds. Second, even without that election, if the corporation happens to sell appreciated assets during the year before your stock changes hands, the built-in gains tax reduces the income flowing to you on your final K-1. If the company has been an S corporation for more than five years, the recognition period has expired and the tax no longer applies.

Reporting the Sale

Seller and corporation each have their own filings, and mismatched paperwork is what prompts IRS letters.

What You File

You report the stock sale on Form 8949, listing the acquisition date, the sale date, the sale proceeds, and your adjusted basis.13Internal Revenue Service. Instructions for Form 8949 The net gain or loss flows to Schedule D of your Form 1040, which aggregates all your capital transactions.14Internal Revenue Service. About Form 8949, Sales and Other Dispositions of Capital Assets If you used the installment method, add Form 6252 for the sale year and each year you receive a payment.

Your share of the corporation’s pass-through income for the portion of the year you owned the stock is reported separately using your final K-1. Don’t combine the K-1 income with the gain on the stock sale; they’re independent.

What the Corporation Files

The S corporation issues you a final Schedule K-1 (Form 1120-S) reflecting income, losses, deductions, and credits allocated to you through the date your ownership ended. The “Final K-1” box in the upper right should be checked.15Internal Revenue Service. Schedule K-1, Form 1120S (Final) The numbers on that K-1 depend entirely on which allocation method was used.

If the closing-of-the-books election was made, the corporation attaches an election statement to its Form 1120-S for that year. The statement declares the year is treated as two separate periods under Section 1377(a)(2), and it must be signed by a corporate officer and include written consent from all affected shareholders.16GovInfo. 26 CFR 1.1377-1 – Pro Rata Share Without proper documentation, the IRS defaults to per-day allocation and can shift income in ways neither party intended.

The corporation should keep the interim balance sheet and income statement prepared as of the termination date, along with the documentation supporting basis calculations. The taxpayer carries the burden of proving both the basis and the allocation method, so contemporaneous records are worth the effort.