Capital Gains Tax Calculator

Calculate capital gains tax on stocks, real estate and crypto: 0%, 15% or 20% long-term rates with the official 2026 brackets, plus the 3.8% NIIT when it applies.

Quick answer

A $60,000 long-term gain (single, no other income) owes about $1,582.50 in federal tax — 0% up to $49,450, 15% on the rest.

Capital gain20,000.00 USD
Long-term capital gains tax0.00 USD0% / 15% / 20% brackets (2026)
NIIT (3.8%)0.00 USDBelow the threshold
Total tax due0.00 USD
Effective rate on gain0.0%

How to Use This Calculator

  1. Enter the sale price of the asset.
  2. Enter your cost basis (what you originally paid, plus improvements).
  3. Choose long-term (held over 1 year) or short-term, and your filing status.
  4. Add your total annual income to see if the 3.8% NIIT applies.

The Formula

Capital gain = sale price − cost basis. Long-term gains use the 0% / 15% / 20% brackets (2026: 0% up to $49,450 single / $98,900 MFJ; 15% to $545,500 / $613,700; 20% above). Short-term gains are taxed at ordinary income rates. The Net Investment Income Tax (3.8%) applies to the smaller of your investment gain or the amount by which your income exceeds $200,000 (single) / $250,000 (MFJ).

GainSale price − cost basis
Long-term0% / 15% / 20% (Rev. Proc. 2025-32)
NIIT3.8% over $200K single / $250K MFJ

Worked Example

A stock sale at $90,000 with a $30,000 cost basis gives a $60,000 long-term gain. As a single filer, the first $49,450 is tax-free and the remaining $10,550 is taxed at 15%: $1,582.50.

Quick Tips

Frequently Asked Questions

What is the long-term capital gains rate for 2026?

0% up to $49,450 of taxable gain (single) / $98,900 (MFJ), 15% up to $545,500 / $613,700, and 20% above. Source: IRS Rev. Proc. 2025-32.

Do I pay NIIT on capital gains?

Yes if your modified adjusted gross income exceeds $200,000 (single) / $250,000 (MFJ). The 3.8% applies to the smaller of your net investment income or the excess over the threshold.

Short-term vs long-term: what is the difference?

Assets held 12 months or less are short-term and taxed at your ordinary income tax rate. Held longer, they qualify for the 0/15/20% brackets.

Sources