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.
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.
How to Use This Calculator
- Enter the sale price of the asset.
- Enter your cost basis (what you originally paid, plus improvements).
- Choose long-term (held over 1 year) or short-term, and your filing status.
- 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 basisLong-term0% / 15% / 20% (Rev. Proc. 2025-32)NIIT3.8% over $200K single / $250K MFJWorked 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
- Holding assets over 12 months unlocks the long-term rates (0/15/20 instead of your ordinary bracket).
- Tax-loss harvesting can offset gains dollar for dollar.
- State capital gains taxes are not included here.
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.