Capital Gains Tax Calculator

Estimate 2026 capital gains tax on investment sales using 2026 long-term rate tiers, an ordinary short-term rate, NIIT, and optional state tax.

$
$
Used to auto-apply the 2026 long-term tiers and NIIT threshold
Long-term rate tiers are applied automatically from 2026 taxable-income thresholds.
0 if no state tax
%
Total Tax on Gain
$1,904.00
Effective rate: 23.8%

Tax Breakdown

Capital Gain$8,000.00
Long-Term Federal Tax$1,200.00
NIIT (3.8%)$304.00
State Tax (5%)$400.00
Total Tax$1,904.00
Net Proceeds
$16,096.00
Sale proceeds minus tax
After-Tax Return
60.96%
Gain after tax / cost basis
Long-Term Top Tier
15%
Taxable income after gain: $218,000.00

Long-Term Gain Breakdown

TierTaxable GainTax
15% tier$8,000.00$1,200.00
Planning notes, formulas, and examples

About the Capital Gains Tax Calculator

When you sell an investment for a profit, the IRS taxes the gain. Short-term gains, held one year or less, are taxed at ordinary income rates. Long-term gains, held over one year, use 2026 federal capital gains tiers of 0%, 15%, and 20% based on taxable income. High earners may also owe the 3.8% Net Investment Income Tax (NIIT).

This calculator estimates the tax on a realized gain using the 2026 rate tiers, your filing status, and your taxable income before the sale. Enter your purchase price, sale price, filing status, and existing taxable income to see how much of the gain lands in each federal tier. An optional state tax rate provides a more complete picture.

When This Page Helps

Tax planning is essential for maximizing after-tax returns. Knowing the estimated tax bill before selling helps you decide whether to hold an asset longer, harvest losses, or time a sale in a lower-income year. This calculator turns the 2026 gain rules into a concrete estimate so you can make informed sell decisions.

How to Use the Inputs

  1. Enter the total cost basis (purchase price including commissions).
  2. Enter the total sale proceeds (sale price minus commissions).
  3. Select short-term (1 year or less) or long-term (over 1 year) holding period.
  4. Enter your taxable income before the sale so the 2026 long-term tiers can be applied correctly.
  5. Select your filing status for the long-term thresholds and NIIT test.
  6. If the gain is short-term, choose your ordinary marginal tax rate.
  7. Optionally check NIIT if your income exceeds the 2026 threshold for your filing status.
  8. Optionally enter your state capital gains tax rate.
  9. Review the gain, federal tax, state tax, total tax, and net after-tax proceeds.
Formula used
Capital Gain = Sale Proceeds - Cost Basis. Short-term federal tax = Gain x ordinary rate. Long-term federal tax = Gain allocated across 0%, 15%, and 20% tiers using 2026 taxable-income thresholds. NIIT = lesser of net investment income or MAGI above the statutory threshold, multiplied by 3.8%. State Tax = Gain x State Rate. Total Tax = Federal + NIIT + State. Net Proceeds = Sale Proceeds - Total Tax.

Example Calculation

Result: Tax: $1,904 / Net Proceeds: $16,096

You bought stock for $10,000 and sold for $18,000, realizing an $8,000 long-term gain. With $210,000 of taxable income before the sale, the gain falls into the 15% long-term tier for a $1,200 federal tax. Adding 3.8% NIIT ($304) and 5% state tax ($400) brings total tax to $1,904. Your net after-tax proceeds are $16,096, an after-tax return of 60.96% on the original $10,000.

Tips & Best Practices

  • Hold investments over one year to qualify for preferential long-term rates.
  • Harvest capital losses to offset gains dollar-for-dollar, with up to $3,000 excess deductible against ordinary income.
  • Consider timing sales in years when your income is lower to land in a lower bracket.
  • For 2026, the 0% long-term tier ends at $49,450 for single and married filing separately, $98,900 for married filing jointly / qualifying surviving spouse, and $66,200 for head of household.
  • For 2026, the 15% long-term tier ends at $545,500 for single, $306,850 for married filing separately, $613,700 for married filing jointly / qualifying surviving spouse, and $579,600 for head of household.
  • NIIT applies to the lesser of net investment income or the amount by which MAGI exceeds the filing-status threshold.
  • State taxes vary widely - seven states have no income tax at all, while California tops 13%.
  • Qualified dividends are taxed at the same preferential rates as long-term capital gains.

Federal Capital Gains Tax Brackets

For 2026, single filers pay 0% on long-term gains up to $49,450 of taxable income, 15% up to $545,500, and 20% above that. Married-filing-separately thresholds are $49,450 and $306,850. Married-filing-jointly / qualifying surviving spouse thresholds are $98,900 and $613,700. Head of household thresholds are $66,200 and $579,600. Short-term gains are folded into ordinary income and taxed at your marginal rate, which can still reach 37%.

Tax-Loss Harvesting Strategy

Tax-loss harvesting involves selling losing investments to realize capital losses that offset gains. Excess losses up to $3,000 per year can offset ordinary income, with any remaining carried forward indefinitely. This strategy can materially improve after-tax results for taxable portfolios.

Planning Around the Calendar

The one-year dividing line between short-term and long-term gains is strict. Selling one day early can cost thousands in extra taxes. If you are near the one-year mark, consider waiting. Similarly, if you expect a lower income next year (retirement, sabbatical, career change), deferring the sale to January may place you in a lower bracket, reducing both federal and state tax bills.

Sources & Methodology

Last updated:

Methodology

This calculator estimates tax on a single realized capital gain by subtracting cost basis from sale proceeds, then applying the selected federal capital-gains rate, optional Net Investment Income Tax, and an optional state tax rate. It is designed as a planning calculator for one gain event rather than a full tax return.

The output does not determine eligibility for the 0%, 15%, or 20% long-term capital-gains bands on its own, and it does not compute the NIIT base from full MAGI. Use it to estimate the tax impact once you already know the applicable rate assumptions for the transaction you are modeling.

Sources

Frequently Asked Questions

  • Short-term gains are profits on assets held one year or less and are taxed at your ordinary income rate (10-37%). Long-term gains apply to assets held over one year and are taxed at 0%, 15%, or 20% depending on your taxable income. The preferential long-term rates can save you thousands on the same gain amount.