The federal tax on a capital gains tax on $400,000 ranges from $0 to more than $148,000. The number depends on three things: how long you held the asset, your filing status, and how much other income you have. A long-term gain taxed entirely at 15% produces a $60,000 federal bill before surcharges. A short-term gain stacked on top of a high salary can be taxed at rates up to 37%. Most people realizing a gain this size also owe the 3.8% Net Investment Income Tax, which adds another $11,000 to $15,000 on top.
Short-Term vs. Long-Term Is the Biggest Lever
Hold the asset one year or less and the profit is a short-term capital gain, taxed at your ordinary income rates.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses For 2026 those rates climb through seven brackets to a top rate of 37% on taxable income above $640,600 for single filers and $768,700 for joint filers.2Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026
Hold it more than a year and the gain becomes long-term, taxed at 0%, 15%, or 20%. On a $400,000 profit, that difference is huge. A high earner in the top ordinary bracket could owe as much as $148,000 on a short-term gain but roughly $80,000 or less on the same gain if it qualifies as long-term, even after adding the investment income surcharge.
2026 Long-Term Capital Gains Brackets and How They Stack
Long-term gains do not sit in a single flat rate. The gain is layered on top of your other taxable income, and each dollar of the combined total is rated based on where it falls within the brackets. For 2026 the breakpoints are:3Internal Revenue Service. Rev. Proc. 2025-32
- 0% rate: taxable income (including the gain) up to $49,450 single, $98,900 joint, $66,200 head of household.
- 15% rate: from the top of the 0% bracket up to $545,500 single, $613,700 joint, $579,600 head of household.
- 20% rate: anything above those ceilings.
The layering is where most people miscalculate. Say you’re single with $100,000 of ordinary taxable income and a $400,000 long-term gain. Your ordinary income already fills the brackets up to $100,000, so the gain starts stacking from there. The 15% ceiling for single filers is $545,500, leaving $445,500 of room, and the full $400,000 fits inside it. Every dollar of the gain is taxed at 15%, or $60,000.
Change one variable. Same filer, but now with $200,000 of ordinary income. The 15% bracket still tops out at $545,500, so only $345,500 of the gain fits at 15%. The remaining $54,500 spills into the 20% bracket. The blended rate on the full $400,000 lands around 15.5%.
The 3.8% Net Investment Income Tax
Above the 0/15/20% rates sits a separate 3.8% surcharge, the Net Investment Income Tax. It kicks in once your modified adjusted gross income crosses a fixed threshold that has never been indexed for inflation:4Internal Revenue Service. Net Investment Income Tax
- $250,000 married filing jointly or qualifying surviving spouse
- $200,000 single or head of household
- $125,000 married filing separately
The 3.8% applies to the smaller of two numbers: your net investment income, 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 almost guarantees you clear the threshold. A single filer with $100,000 in wages and the $400,000 gain has modified AGI of $500,000, exceeding the $200,000 threshold by $300,000. The NIIT is 3.8% of $300,000, or $11,400. It gets reported on Form 8960.6Internal Revenue Service. IRS Form 8960 – Net Investment Income Tax
The practical upshot: the effective ceiling on a long-term gain is 23.8% (20% plus NIIT). For collectibles the combined ceiling is 31.8%.
A Full Worked Example
A married couple filing jointly has $150,000 of ordinary taxable income after the standard deduction and sells stock for a $400,000 long-term gain. Here is how their 2026 federal tax breaks down.
Ordinary income tax on the $150,000 works out to about $22,400 under the 2026 joint brackets.2Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026
The gain then stacks on top. The joint 0% bracket ends at $98,900, already passed. The 15% ceiling is $613,700, leaving $463,700 of room above the couple’s $150,000. The full $400,000 gain fits at 15%, producing $60,000 in capital gains tax.3Internal Revenue Service. Rev. Proc. 2025-32
Modified AGI is $550,000, exceeding the $250,000 joint threshold by $300,000. NIIT is 3.8% of $300,000, or $11,400.4Internal Revenue Service. Net Investment Income Tax
Federal tax attributable to the gain: $71,400. That is an effective rate of about 17.9% on the $400,000. Add the $22,400 in ordinary income tax and the couple’s total federal bill is roughly $93,800.
Rules That Change the Answer for Certain Assets
Selling Your Home
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 single, or $500,000 if married filing jointly, provided you owned and used the home as your primary residence for at least two of the five years before 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. A single filer would exclude $250,000 and pay tax only on the remaining $150,000.
Rental or Investment Real Estate
If you claimed depreciation on a rental property, the IRS recaptures a portion of that benefit at sale. Depreciation previously deducted is taxed at a maximum of 25% as unrecaptured Section 1250 gain, higher than the standard 15% or 20% rate.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses The remainder above your adjusted basis is taxed at ordinary long-term rates. On a $400,000 gain with $80,000 of prior depreciation, $80,000 could be taxed at up to 25% and the other $320,000 at up to 20%.
Collectibles
Long-term gains on art, antiques, coins, and precious metals face a maximum rate of 28%, plus the 3.8% NIIT for a combined ceiling of 31.8%.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses
Qualified Small Business Stock
Founders and early investors holding qualifying Section 1202 stock may exclude up to 100% of the gain, subject to a per-issuer cap that is the greater of $10 million or 10 times basis, with recent legislation raising the dollar figure to $15 million for stock acquired after the applicable date.8Office of the Law Revision Counsel. 26 U.S. Code 1202 – Partial Exclusion for Gain From Certain Small Business Stock A fully qualifying $400,000 gain can drop out of taxable income entirely.
Ways to Reduce the Bill
Capital losses cancel gains dollar for dollar. Selling other investments that are down before year-end reduces the taxable portion of your $400,000 gain. Net losses beyond your gains can offset up to $3,000 of ordinary income and carry forward.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses
Donating long-term appreciated property directly to a qualified charity avoids the capital gains tax on the donated portion and produces a fair-market-value deduction, generally capped at 30% of AGI with a five-year carryforward.9Internal Revenue Service. Publication 526, Charitable Contributions
For investment or business real estate, a Section 1031 like-kind exchange defers the entire gain if the proceeds go into similar property. The replacement must be identified within 45 days and the exchange closed within 180.10Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 Personal residences and vacation homes do not qualify.
Rolling the gain into a Qualified Opportunity Fund defers the tax, but the deferral ends no later than December 31, 2026, when any remaining deferred gain becomes taxable regardless of whether the fund is sold.11Internal Revenue Service. Invest in a Qualified Opportunity Fund
Pay Estimated Tax to Avoid a Penalty
A $400,000 gain produces a tax bill that paycheck withholding will not cover. The IRS charges an underpayment penalty at an interest rate currently running at 7% per year, compounded daily.12Internal Revenue Service. Interest Rates Remain the Same for the First Quarter of 2026
Two safe harbors avoid it: pay at least 90% of the current year’s tax, or pay at least 100% of last year’s total tax (110% if last year’s AGI exceeded $150,000).13Office of the Law Revision Counsel. 26 USC 6654 – Failure by Individual to Pay Estimated Income Tax The prior-year safe harbor is usually the easier one to hit when a single large gain lands, because the previous year’s bill was much smaller. No penalty applies if you owe less than $1,000 after withholding and credits. Quarterly deadlines are April 15, June 15, September 15, and January 15 of the following year, and if the sale happens late in the year you can often make a single estimated payment for that quarter instead of spreading it.
State Tax Is a Separate Bill
Federal tax is only part of the total. Most states tax capital gains as ordinary income, and rates vary widely. Florida, Texas, Nevada, and Wyoming, among others, impose no income tax. Some states apply rates above 13% to high earners. On a $400,000 gain, state tax in a high-rate jurisdiction can easily add $30,000 or more to the federal amount, so check your state’s rules before you sell.