Capital Gains Tax Calculator

🏠 Home / Tax Calculators / Capital Gains Tax Calculator

Capital Gains Tax Calculator

One extra day of holding an investment β€” 364 versus 365 β€” can be the difference between paying your full ordinary income tax rate and a preferential long-term rate as low as 0%. This calculator shows exactly what a sale costs you under both scenarios, so timing isn't left to guesswork.

Your sale details

Estimated Tax2026

Enter your details to see your estimated capital gains tax.

How to use this calculator

  1. Enter the sale price and your original cost basis for the asset.
  2. Select whether you held it for more or less than a year.
  3. Enter your other taxable income and filing status β€” capital gains stack on top of your ordinary income.
  4. Click "Calculate capital gains tax" to see your estimated tax.

How the calculation works

Your capital gain is simply sale price minus cost basis. For a short-term gain (held one year or less), that profit is taxed at your ordinary marginal rate, stacked directly on top of your other income using the same 2026 federal brackets used elsewhere on this site. For a long-term gain (held over a year), the profit is taxed using separate, preferential brackets β€” 0%, 15%, or 20% β€” determined by where your total income (other income plus the gain) falls within the 2026 long-term capital gains thresholds.

A worked example

Say you sell stock for $25,000 that you bought for $10,000 β€” a $15,000 gain β€” and you're single with $75,000 in other taxable income. Held long-term, that $15,000 gain lands entirely in the 15% bracket, producing an estimated tax of $2,250 and leaving $12,750 in after-tax profit. Held short-term instead, that same $15,000 is taxed at your marginal ordinary rate (22% in this bracket), producing a tax closer to $3,300 β€” over $1,000 more, purely because of the holding period.

Frequently asked questions

Why does "other income" matter for a long-term gain?

Long-term capital gains rates are based on your total taxable income, including the gain β€” a large gain can push part of it from the 0% or 15% band into a higher one.

What is the Net Investment Income Tax (NIIT)?

An additional 3.8% federal tax on investment income for higher earners (MAGI over $200,000 single / $250,000 married). This calculator does not include NIIT.

Does this include state capital gains tax?

No, this covers federal tax only β€” many states tax capital gains as ordinary income on top of this.

Can capital losses offset my gains?

Yes β€” realized losses can offset realized gains dollar for dollar, and up to $3,000 of any excess loss can offset other income each year, with additional losses carried forward to future years. This calculator does not model losses.

What counts as my cost basis?

Generally your original purchase price plus any commissions or fees paid. For assets with reinvested dividends, each reinvestment adds to your basis at the price paid on that date.

Estimates only β€” based on simplified 2026 federal tax rules. Not tax, legal, or financial advice. For your exact liability, consult a licensed tax professional or the IRS withholding calculator.
Scroll to Top