Capital Gains Tax on Selling a Business: What the Sale Really Costs an Owner
Short answer: most of the profit from selling a business is taxed as long-term capital gain (0/15/20% federally), but part is often ordinary income, such as inventory, equipment recapture and a consulting or non-compete payment. Active owners generally do not pay the 3.8% net investment income tax on the gain; passive owners do. Your state tax comes on top.
For owners at or near retirement, the sale also lands in one year of income, and that year sets how much of your Social Security is taxable and what you pay for Medicare two years later. Enter your numbers for the full cost. For the asset-versus-stock allocation question, use the business sale tax calculator.
By Hans Goldstein, EA, Enrolled Agent, enrolled to practice before the IRS. Updated December 2026.
2027 federal brackets (IRS Rev. Proc. 2026-35), SSA Section 86 thresholds, CMS 2027 Medicare premiums and IRMAA tiers, state rates as of December 2026. Estimates, not tax advice.
Worked example
A single owner, age 63, sells a business for $2,500,000. Their basis is $300,000, selling costs are $100,000 and $400,000 of the price is ordinary income (inventory, equipment and a consulting agreement). They actively work in the business and have $40,000 of other income.
| Worked example | Amount |
|---|---|
| Taxable gain | $2,100,000 |
| Federal tax on the gain | $448,608 |
| Net investment income tax (3.8%) | $0 |
| California tax on the gain | $253,314 |
| Tax most calculators show | $701,922 |
| Extra tax on Social Security the sale makes taxable ($0 more taxable) | $0 |
| Medicare Part B + D surcharge two years later | $7,186 |
| Real cost | $709,108 |
How a business sale is taxed
A business sale is not one tax. Each asset in the sale is taxed by its own rules. Goodwill and other capital assets produce long-term capital gain. Inventory and receivables are ordinary income. Equipment sold above its depreciated value produces Section 1245 recapture, taxed at ordinary rates. A payment for a non-compete is ordinary income. The buyer and seller agree on the allocation and report it on Form 8594. If you sell stock in a C corporation, the sale is a stock sale, and the entire gain is capital gain, but the buyer may pay less, so many deals are structured as asset sales.
NIIT: active vs passive owners
The 3.8% net investment income tax applies to gain from a business you do not materially participate in. If you actively work in the business, the gain from selling it is generally not subject to NIIT. The calculator has an option for it. The interest on a seller note, though, is still net investment income.
What the sale does to your Social Security and Medicare
A business sale is usually the biggest income year of an owner's life. That income, even the capital gain, counts in provisional income for Social Security and in the income Medicare uses two years later for its Part B and D surcharges. Owners who sell at 63 or older are inside that window. The result above shows the cost, and the spread comparison shows what changes if part of the price is paid over time. Read more at avoiding IRMAA and NIIT on a business sale and selling your business when you retire.
Frequently asked questions
How much is capital gains tax on the sale of a business?
Capital gain on goodwill and other long-term assets is taxed at 0%, 15% or 20% federally in 2027, plus state tax. Inventory, equipment recapture and non-compete payments are ordinary income up to 37%. Passive owners also pay the 3.8% NIIT.
Do I pay NIIT when I sell my business?
If you actively work in the business and the sale is of an active trade or business, the gain is generally exempt from the 3.8% NIIT. If you are a passive owner, it generally applies. Confirm with your CPA.
Is selling a business capital gain or ordinary income?
Both. Goodwill and similar assets are capital gain. Inventory, receivables, equipment recapture and non-compete payments are ordinary income. The purchase price allocation decides the split.
Can I avoid capital gains when I sell my small business?
Not entirely, but you can manage it: an installment sale to spread the gain, QSBS exclusion if your stock qualifies, negotiating the allocation, and timing across tax years.
Does selling my business affect Social Security?
The sale does not change your benefit, but the gain raises your income, which can make up to 85% of your benefit taxable that year and raise Medicare premiums two years later.
What is the purchase price allocation?
An agreement between buyer and seller dividing the price among assets such as equipment, inventory, goodwill and a non-compete. It is filed on IRS Form 8594 and decides how much of your price is capital gain versus ordinary income.
Run it on your real return
A free 15-minute call with Hans Goldstein: which levers fit your sale, what the Social Security and Medicare effects look like on your actual numbers, and what to ask your CPA.
Book 15 minutes 213-414-2808Educational estimate, not tax, legal or financial advice. Figures use 2027 federal brackets and thresholds (IRS Rev. Proc. 2026-35), the Social Security benefit-taxation rules in IRC Section 86, CMS 2027 Medicare premiums and IRMAA tiers, and state rates as of December 2026 (California uses the FTB 2026 schedule until the 2027 schedule is published). Later Medicare years hold the 2027 tiers flat. Your CPA should confirm any figure before you act. By Hans Goldstein, EA, Enrolled Agent (enrolled to practice before the IRS), reviewed December 2026.