Capital Gains Tax Calculator

2026 federal + state capital gains tax — stocks, real estate, crypto, and any appreciated asset.

Capital gains taxis owed when you sell an asset for more than you paid. In 2026, long-term gains (held >1 year) are taxed at preferential rates of 0%, 15%, or 20% depending on your income — far lower than the up-to-37% rate on short-term gains. This calculator computes your exact federal tax, NIIT surcharge (3.8% for high earners), and state tax, then shows your true after-tax net proceeds and ROI.

How Capital Gains Tax Is Calculated

Capital gains tax is applied to your net gain — the sale price minus your adjusted cost basis (original purchase price plus improvements and selling costs). The applicable rate depends on your holding period and total taxable income.

Capital Gain = Sale Price − Adjusted Basis
Adjusted Basis = Purchase Price + Improvements + Selling Costs
Federal Tax = Gain × LTCG Rate (0%, 15%, or 20%)
NIIT = max(0, Gain − Threshold Excess) × 3.8%
Total Tax = Federal + NIIT + State
2026 LTCG RateSingleMarried Filing Jointly
0%Up to $48,350Up to $96,700
15%$48,351 – $533,400$96,701 – $600,050
20%Above $533,400Above $600,050
+3.8% NIITMAGI > $200,000MAGI > $250,000

Worked example:Single filer with $80,000 ordinary income sells stock held 2 years for a $50,000 gain. Adjusted basis = $50,000, sale = $100,000. LTCG rate = 15%. Federal tax = $7,500. NIIT does not apply ($130,000 combined < $200,000 threshold). At 5% state rate: $2,500 state tax. Total tax = $10,000. Net proceeds = $40,000. After-tax ROI = 40% vs. 50% pre-tax.

💡 Expert Pro-Tip

Timing your sale across tax years can eliminate gains tax entirely. If your total taxable income keeps you in the 0% LTCG bracket ($48,350 for single filers in 2026), you owe zero federal capital gains tax — legally. Couples with $96,700 or less in taxable income can sell appreciated assets completely tax-free at the federal level. This is especially powerful for retirees drawing down investments in low-income years. Use our Income Tax Calculator to find your taxable income before planning a sale.

Capital Gains Tax Calculator

Asset Details

✅ Qualifies for preferential LTCG rates (0%, 15%, or 20%)

Your Tax Situation

Wages, business income, etc. (used to determine bracket)
0% for TX, FL, NV, WA, WY, AK, SD; 13.3% CA top rate

Capital Gains Tax FAQ — 2026

What are the 2026 long-term capital gains tax rates?

For 2026, long-term capital gains (assets held over 1 year) are taxed at 0%, 15%, or 20% depending on your taxable income. Single filers pay 0% on gains if taxable income is under $48,350; 15% up to $533,400; and 20% above that. Married filing jointly thresholds are $96,700 and $600,050. These are the same preferential rates that have been in place and were preserved under the 2026 OBBBA legislation.

What is the Net Investment Income Tax (NIIT) and do I owe it?

The NIIT is a 3.8% surtax on investment income (including capital gains) for taxpayers whose modified adjusted gross income (MAGI) exceeds $200,000 (single) or $250,000 (married filing jointly). If your total income including the gain exceeds these thresholds, the NIIT applies to the lesser of: (1) your net investment income, or (2) the amount your MAGI exceeds the threshold. This can effectively raise your top LTCG rate to 23.8% at the federal level.

How is short-term capital gains tax calculated?

Short-term capital gains (assets held 1 year or less) are taxed as ordinary income at your regular federal income tax rate — which can be as high as 37% in 2026. There is no preferential rate. This is why holding an asset for just over 1 year before selling can dramatically reduce your tax bill. For example, a $50,000 gain taxed as short-term at 32% costs $16,000; as a long-term gain at 15%, only $7,500.

Does the primary home exclusion apply to capital gains?

Yes. If you've owned and lived in a home as your primary residence for at least 2 of the last 5 years, you can exclude up to $250,000 in gains ($500,000 for married couples) from capital gains tax. This exclusion does not apply to investment properties. If you sell a home after less than 2 years or it's a second home, the full gain is taxable. Home improvements increase your cost basis, reducing your taxable gain.

Can capital losses offset capital gains?

Yes. Capital losses from selling assets at a loss offset capital gains dollar-for-dollar. Long-term losses first offset long-term gains; short-term losses first offset short-term gains, then any remainder crosses categories. If total losses exceed gains, you can deduct up to $3,000 of excess losses against ordinary income per year. Additional losses carry forward indefinitely. This is the basis of tax-loss harvesting strategies.