Bureau of Wealth

Capital Gains Tax Calculator 2026: Federal and NIIT

By the Bureau of Wealth team Updated

This calculator is general information, not financial advice. Check your own figures with the provider or a qualified adviser before acting on them.

Enter what you paid, what you sold for, how long you held it and your other income to see the federal tax, Net Investment Income Tax and state tax on your gain in 2026.

Using 2026 rates rates checked 14 September 2026

What you paid, including purchase fees.

How long you held it

Wages and other ordinary income before the standard deduction.

Check the highlighted fields to see your results.

What this calculator assumes

  • The tax is worked out for one sale in tax year 2026, using the standard deduction and the federal brackets for single, married filing jointly or head of household. Itemized deductions and credits are not included.
  • Other income means wages and other ordinary income. Qualified dividends, other gains and losses from the same year, and adjustments to income are not counted, so your real modified adjusted gross income may differ.
  • Long-term gains use the 0%, 15% and 20% rates. The higher maximum rates for collectibles (28%) and unrecaptured section 1250 gain on real estate (25%) are not modeled.
  • Net Investment Income Tax treats this gain as your only investment income.
  • State tax is a flat rate you enter, applied to the whole gain. Your state may use brackets or its own rules for gains, so check with your state tax agency.
  • ROI Calculator: Total and Annualized Return

    Work out your total and annualized return on the investment first, then use this calculator to see how much of that gain you keep after tax.

  • Investment Fees Calculator

    Fees reduce the growth that becomes a taxable gain, so compare what a lower-cost fund would leave you before tax enters the picture.

How the tax on your gain is worked out

Your gain is the sale price minus your cost basis and selling costs. The calculator then takes the 2026 standard deduction off your other income to find your ordinary taxable income, and places the gain on top of it. This stacking matters: your wages fill the lower brackets first, and the gain is taxed at the rates that apply to the income above them.

If you held the asset for more than a year, the gain is long-term. In 2026 a single filer pays 0% on long-term gains while total taxable income is up to $49,450, 15% up to $545,500 and 20% above that. For married couples filing jointly the breakpoints are $98,900 and $613,700, and for heads of household $66,200 and $579,600. If you held it for a year or less, the gain is short-term and is taxed as ordinary income at your regular brackets.

A worked example

A single filer with $60,000 of other income sells shares for $30,000 that cost $10,000, after holding them for more than a year. Taxable income before the sale is $43,900, so the first $5,550 of the $20,000 gain fits under the $49,450 breakpoint and is taxed at 0%. The remaining $14,450 is taxed at 15%, for federal tax of $2,167.50, or 10.8% of the gain. Sell the same shares after a year or less and the federal tax rises to $3,750.

With other income of $40,000 instead, the whole $20,000 gain falls in the 0% band and there is no federal tax on it.

The Net Investment Income Tax

The IRS charges a 3.8% Net Investment Income Tax on the lesser of your net investment income or the amount your modified adjusted gross income is above a threshold: $200,000 for single and head of household filers, and $250,000 for married couples filing jointly. The IRS says these thresholds are not indexed for inflation. A single filer with $250,000 of other income and a $100,000 long-term gain pays $15,000 of federal tax at 15% plus $3,800 of NIIT, a total of $18,800. The same gain held short-term costs $38,130.25.

If you sold at a loss

The calculator shows no tax on a loss. IRS Topic 409 says that if your capital losses are more than your capital gains, you can deduct the excess against other income up to $3,000 a year ($1,500 if married filing separately), and carry the rest forward to later years. Losses on personal-use property, such as your home or car, are not deductible.

Planning a sale

Holding past the one-year mark and timing sales for a year when your other income is lower can both reduce the rate. A tax professional can check the details for a large or unusual sale. To see what the investment earned before tax, use the ROI calculator, and to see how fees eat into the growth that creates a gain, try the investment fees calculator.

Frequently asked questions

What counts as long-term?

The IRS treats a gain as long-term if you held the asset for more than one year before selling it. One year or less makes it short-term, taxed at the same rates as your wages.

Can I really pay 0% on a capital gain?

Yes, if your taxable income including the long-term gain stays within the 0% band: up to $49,450 for single filers in 2026 or $98,900 for joint filers. The gain still counts toward that total, so a large gain can push part of itself into the 15% band.

Does the gain push my wages into a higher bracket?

Not the rates on your wages. A long-term gain is stacked on top of your ordinary income and taxed at its own rates, although it can bring in the Net Investment Income Tax. A short-term gain is ordinary income, so it can move part of your income into a higher bracket.

Is the Net Investment Income Tax on the whole gain?

Not always. It is 3.8% of the smaller of your net investment income and the amount your modified adjusted gross income is over the threshold, so someone just over $200,000 as a single filer pays it on only part of the gain.

What should I include in cost basis?

Enter what you paid, including purchase fees. Put fees you paid when selling in selling costs, since both reduce the gain.

Sources

Figures come from institutions millions of people rely on. How we keep calculators accurate.