Capital gains tax calculator
Federal capital gains tax, net investment income tax and your state rate on a sale of shares.
- Federal capital gains tax$60,420
- Net investment income tax (3.8%)$14,440
- You keep$305,140
Splitting a sale across tax years can change the bill. Matches are fee-only advisors listed on Wellspent. Free, no obligation.
Find a fee-only advisorTax year 2026 · Single filer, standard deduction; federal tax with the gain stacked on your other income; state at the rate you enter; not tax advice.
How this is calculated
The gain is proceeds minus basis. Long-term gain is taxed at the capital gains rates, stacked on top of your other taxable income; short-term gain is taxed like wages. Net investment income tax applies to the part of the gain that lifts your income over the threshold.
For 2026, long-term gains are taxed federally at 0%, 15% or 20%; a single filer reaches the 20% rate at taxable income over $545,500. The 3.8% net investment income tax applies above $200,000 of modified AGI (single) or $250,000 (married filing jointly).
Assumptions
- Single filer taking the standard deduction; other income is all ordinary income.
- State tax uses the rate you enter on the whole gain.
- No capital losses or carryovers.
This is an educational estimate, not tax advice: your own return can include items this calculator leaves out.
Federal figures for tax year 2026
Sources
- Rev. Proc. 2025-32irs.gov
Supporting text
Heads of Household $66,200 $579,600 All Other Individuals $49,450 $545,500
- IRS Topic no. 559, Net investment income taxirs.gov
Supporting text
A 3.8 percent net investment income tax (NIIT) applies to individuals, estates, and trusts that have net investment income above applicable threshold amounts.
Facts checked November 21, 2026 · Tax year 2026