What Is the Capital Gains Tax on $400,000?

Federal tax on a capital gains tax on $400,000 ranges from $0 to more than $148,000. The spread comes down to three things: how long you held the asset, your filing status, and the rest of your taxable income for the year. A long-term gain taxed entirely at the 15% rate produces a $60,000 federal bill before surcharges. A short-term gain gets stacked on top of your wages and taxed at ordinary rates up to 37%. Most people with a gain this large also owe the 3.8% Net Investment Income Tax, which adds roughly $11,000 to $15,000 on top.

Short-Term vs. Long-Term Changes Everything

The single biggest factor in your bill is whether you held the asset for more than one year before selling. Sell at the one-year mark or sooner and the IRS treats the profit as a short-term capital gain, taxed at the same rates as your wages.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses For 2026, ordinary rates climb through seven brackets and top out at 37% on taxable income above $640,600 for single filers or $768,700 for married couples filing jointly.2Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026

Hold the asset for more than a year and the gain qualifies as long-term, taxed at 0%, 15%, or 20%. On $400,000, the difference is huge. A high-earning single filer in the 37% bracket could owe up to $148,000 on a short-term gain versus roughly $80,000 or less on a long-term gain, even after the investment surcharge.

2026 Long-Term Capital Gains Brackets

Long-term gains don’t drop into one flat rate. The gain gets layered on top of your other taxable income, and the rate on each dollar depends on where that combined total lands within the brackets. The 2026 breakpoints are:3Internal Revenue Service. Rev. Proc. 2025-32

  • 0% rate: taxable income (including the gain) up to $49,450 single, $98,900 married filing jointly, $66,200 head of household.
  • 15% rate: from the top of the 0% bracket up to $545,500 single, $613,700 married filing jointly, $579,600 head of household.
  • 20% rate: every dollar of gain above those 15% ceilings.

Here is how the layering works. A single filer with $100,000 of ordinary taxable income and a $400,000 long-term gain starts stacking the gain at $100,000. The 15% bracket for a single filer runs up to $545,500, leaving $445,500 of room. The entire $400,000 gain fits inside, so every dollar is taxed at 15%, for $60,000 of federal capital gains tax.

Change one number. Same single filer, but with $200,000 of ordinary income. Now only $345,500 of 15% room remains. The first $345,500 of the gain is taxed at 15% and the remaining $54,500 spills into the 20% bracket. The blended rate on the full $400,000 ends up near 15.5%.

The 3.8% Net Investment Income Tax

On top of the 0/15/20% rates, high earners face a separate 3.8% surcharge called the Net Investment Income Tax. It kicks in once your modified adjusted gross income crosses a fixed threshold, and those thresholds have never been indexed for inflation:4Internal Revenue Service. Net Investment Income Tax

  • $250,000 for married filing jointly or qualifying surviving spouse
  • $200,000 for single or head of household
  • $125,000 for married filing separately

The 3.8% applies to whichever is smaller: your net investment income for the year, or the amount by which your modified AGI exceeds the threshold.5Office of the Law Revision Counsel. 26 U.S. Code 1411 – Imposition of Tax A $400,000 gain pushes almost anyone past these thresholds. A single filer with $100,000 in wages plus the gain has modified AGI of $500,000, exceeding the $200,000 threshold by $300,000. The NIIT applies to the smaller $300,000 figure, adding $11,400.

That means the effective top federal rate on a long-term capital gain is 23.8%, combining the 20% rate and the 3.8% surcharge. You report the NIIT on Form 8960.6Internal Revenue Service. IRS Form 8960 – Net Investment Income Tax

A Worked Example

A married couple filing jointly has $150,000 in ordinary taxable income after the standard deduction and sells stock for a $400,000 long-term gain. Here is how 2026 federal tax breaks down.

Ordinary income tax on the $150,000. The 2026 joint brackets tax the first $24,800 at 10%, the next $76,000 at 12%, and the remaining $49,200 at 22%, producing roughly $22,400.2Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026

Capital gains layer. The joint 0% bracket covers taxable income up to $98,900, which the couple’s wages already exceed. The 15% bracket extends to $613,700, leaving $463,700 of room above their $150,000. The full $400,000 gain fits in the 15% bracket, for $60,000 of capital gains tax.3Internal Revenue Service. Rev. Proc. 2025-32

NIIT. Modified AGI is $550,000, exceeding the $250,000 joint threshold by $300,000. The 3.8% applies to the lesser of $400,000 (net investment income) or $300,000 (the excess), adding $11,400.4Internal Revenue Service. Net Investment Income Tax

Total federal tax on the gain itself: $71,400, an effective rate of about 17.9%. Add the $22,400 of ordinary income tax and the couple’s total federal bill comes to roughly $93,800.

Real Estate Has Its Own Rules

Primary Residence Exclusion

If the $400,000 gain came from selling the home you lived in, you may owe nothing. Federal law lets you exclude up to $250,000 of gain if you’re single, or $500,000 if you’re married filing jointly, as long as you owned and used the home as your primary residence for at least two of the five years before the sale.7Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence A qualifying married couple would exclude the entire $400,000 and owe zero federal tax. A single filer would exclude $250,000 and pay tax on the remaining $150,000.

Depreciation Recapture on Rental Property

If you claimed depreciation on a rental or other investment property, the IRS claws back part of that benefit at sale. Depreciation previously deducted is taxed at a maximum rate of 25% as unrecaptured Section 1250 gain, higher than the standard long-term rate.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Only the depreciation portion is taxed at that higher rate; the rest of the gain above your adjusted basis is taxed at the regular long-term rates. On a $400,000 gain from a rental with $80,000 in prior depreciation, $80,000 is taxed at up to 25% and the other $320,000 at up to 20%.

Collectibles and Qualified Small Business Stock

Two asset types sit outside the normal rate structure.

Gains on art, antiques, coins, precious metals, and similar collectibles are taxed at a maximum long-term rate of 28%.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Add the 3.8% NIIT and a $400,000 collectibles gain can face a combined federal rate of 31.8%.

Qualified small business stock goes the other way. Founders and early investors in certain small businesses may exclude part or all of the gain under Section 1202. For qualifying stock acquired after September 27, 2010, up to 100% of the gain can be excluded. The per-issuer cap is the greater of $10 million or 10 times your adjusted basis, raised to $15 million for stock acquired after the recent statutory update.8Office of the Law Revision Counsel. 26 U.S. Code 1202 – Partial Exclusion for Gain From Certain Small Business Stock If a $400,000 gain qualifies for the full exclusion, the entire amount drops out of your taxable income.

Ways to Shrink the Bill

A $400,000 gain is large enough that several strategies become worth exploring before or during the year of the sale.

Offset With Capital Losses

Capital losses cancel capital gains dollar for dollar. Selling a losing position worth $50,000 in losses drops the taxable gain to $350,000. If total losses exceed gains, you can deduct up to $3,000 of the net loss against ordinary income and carry the rest forward.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses

Donate Appreciated Property

Donating long-term appreciated assets directly to a qualified charity avoids the capital gains tax on the donated portion while letting you claim a fair-market-value deduction. The deduction for appreciated property is generally capped at 30% of your AGI, with excess carrying forward for up to five years.9Internal Revenue Service. Publication 526, Charitable Contributions This works especially well for a low-basis asset, because neither you nor the charity ever pays tax on the built-up gain.

Like-Kind Exchanges for Real Estate

If the gain comes from selling investment or business real estate, a Section 1031 like-kind exchange defers the entire tax by reinvesting the proceeds into similar property. You must identify the replacement property within 45 days and close within 180 days.10Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 Personal residences and vacation homes don’t qualify. The tax isn’t eliminated, only postponed until you eventually sell without doing another exchange.

Qualified Opportunity Zone Funds

Investing capital gains into a Qualified Opportunity Fund can defer the tax on those gains, but the deferral period ends no later than December 31, 2026. Any deferred gain becomes taxable by that date regardless of whether you sell the fund investment.11Internal Revenue Service. Invest in a Qualified Opportunity Fund

Don’t Forget Estimated Payments

A $400,000 gain usually creates a tax bill your regular withholding won’t cover. Underpay during the year and the IRS charges a penalty with interest currently running at 7% per year, compounded daily.12Internal Revenue Service. Interest Rates Remain the Same for the First Quarter of 2026

You can avoid the penalty by hitting one of two safe harbors: pay at least 90% of what you owe for the current year, or pay at least 100% of your prior year’s total tax (110% if your prior-year AGI exceeded $150,000).13Office of the Law Revision Counsel. 26 USC 6654 – Failure by Individual to Pay Estimated Income Tax For a one-time windfall, the prior-year safe harbor is usually easier to hit. If you owe less than $1,000 after withholding and credits, no penalty applies.

Estimated payments are due April 15, June 15, September 15, and January 15 of the following year. If the sale happens late in the year, you can often make a single estimated payment for the quarter in which the gain occurred rather than spreading it across all four.

State Tax Can Add Thousands

Federal tax is only part of the picture. Most states tax capital gains as ordinary income, and the rates vary widely. Florida, Texas, Nevada, and Wyoming impose no state income tax at all. On the other end, some states apply rates above 13% to high earners, and a $400,000 gain in a high-tax state can easily add $30,000 or more on top of the federal bill. A few states offer preferential rates or partial exclusions for long-term gains or certain asset types, so check your state’s rules before you sell.