Home / Taxes

Capital Gains Tax Calculator

Selling stocks, funds, crypto or other investments for a profit? Estimate the federal tax on your gain and see how much holding for more than a year could save.

Federal tax on this gain—
Capital gain
Long-term capital gains tax
Net investment income tax (3.8%)
Effective rate on the gain
You keep
If held over 1 year instead

2026 federal estimate. State tax not included. Collectibles and some real estate gains have different rates.

Short-term vs long-term capital gains

Capital gain = sale price - cost basis (what you paid, plus fees)

2026 long-term capital gains rates

Rate Single Married filing jointly Head of household
0% up to $49,450 up to $98,900 up to $66,200
15% up to $545,500 up to $613,700 up to $579,600
20% above that above that above that

Gains are stacked on top of your other income, so your other income decides which band the gain falls into. High earners may also owe the 3.8% net investment income tax on gains when income is above $200,000 (single) or $250,000 (married filing jointly).

Worked example

Riley is single with $60,000 of other taxable income and sells shares for $30,000 that cost $10,000, a $20,000 gain.

Frequently asked questions

How long do I need to hold an investment for long-term rates?

More than one year. The holding period starts the day after you buy and includes the day you sell.

Are crypto gains taxed the same way?

Yes. The IRS treats cryptocurrency as property, so selling or trading it is taxed using the same short-term and long-term capital gains rules.

What if I sold at a loss?

Capital losses offset capital gains. If losses are larger, you can deduct up to $3,000 a year ($1,500 if married filing separately) against other income and carry the rest forward.

Are there exceptions to the 0/15/20% rates?

Yes. Gains on collectibles such as coins and art can be taxed up to 28%, and part of the gain on depreciated real estate can be taxed up to 25%. Selling your main home may be partly or fully tax-free under the home sale exclusion.

Related calculators

Sources

This calculator gives estimates for general information only. It is not financial, tax or legal advice. Last reviewed 11/21/2026.