M
MoneyMath

Capital Gains Tax Calculator (2026)

Sold stock, crypto, or property? Calculate federal capital gains tax including short-term vs long-term rates, NIIT surtax, and your net after-tax proceeds.

๐ŸŸข Updated April 2026๐Ÿ‘ค Reviewed by MoneyMath Editorialโšก Runs in your browser ยท inputs never leave your device
$
$
$
Long-Term Capital Gains Tax
$4,500
Net after tax: $25,500
Capital gain (or loss)$30,000
Tax rate applied15%
Federal capital gains tax$4,500
NIIT (Net Investment Income Tax 3.8%)$0
Total federal tax$4,500
Show the formula
gain = proceeds โˆ’ basis
LTCG rate: 0% / 15% / 20% based on total income
NIIT 3.8% if MAGI > $200k (single) / $250k (MFJ)
net = gain โˆ’ federal tax โˆ’ NIIT

Short-term vs long-term โ€” the 12-month rule

If you held the asset for one year or less, your gain is short-term and taxed at your ordinary income bracket (10% โ€“ 37%). If you held for more than 12 months, you qualify for preferential long-term rates of 0%, 15%, or 20% depending on your income. Waiting a few extra weeks can save thousands.

2026 Long-Term Capital Gains Brackets

  • 0% rate: Taxable income up to $48,350 (single) / $96,700 (MFJ) / $64,750 (HoH)
  • 15% rate: Up to $533,400 (single) / $600,050 (MFJ) / $566,700 (HoH)
  • 20% rate: Above those thresholds

Don't forget NIIT

If your MAGI exceeds $200,000 (single) or $250,000 (MFJ), an additional 3.8% Net Investment Income Tax (NIIT) applies to capital gains, dividends, rental income, and interest. That effectively makes the top LTCG rate 23.8%. This calculator includes NIIT automatically.

State capital gains tax

Most states tax capital gains as ordinary income (no preferential rate). No tax: Florida, Texas, Nevada, Tennessee, Washington (most income), Wyoming, Alaska, South Dakota, New Hampshire. High: California (up to 13.3%), Hawaii (up to 11%), New York (up to 10.9%), New Jersey (up to 10.75%). Add your state rate to the federal figure for total tax.

Strategies to reduce capital gains tax

  • Tax-loss harvesting: Sell losers to offset winners (up to $3,000 of losses can offset ordinary income annually).
  • Hold 12 months + 1 day to convert short-term to long-term rates.
  • 0% bracket: If your income is modest, stack LTCG up to the 0% threshold โ€” tax-free.
  • Qualified Opportunity Zones: Defer and potentially eliminate some gains by reinvesting in QOZs (check current law).
  • Charitable gifts of appreciated stock: Donate instead of sell โ€” deduct full market value AND avoid the capital gains tax entirely.
  • Step-up at death: Heirs inherit at fair market value, wiping out unrealized gains. Estate planning matters.

Frequently Asked Questions

Is crypto treated the same as stock?

Yes. The IRS treats cryptocurrency as property, so the same short-term vs long-term rules apply. Every trade (crypto-to-crypto, crypto-to-cash, crypto-for-goods) is a taxable event. Track cost basis obsessively โ€” exchanges often report incomplete data on 1099-DA.

What about capital gains on my primary home?

Section 121 exclusion: if you've owned AND lived in your primary residence for 2+ of the last 5 years, you can exclude up to $250,000 of gain (single) or $500,000 (MFJ) from tax. Excess above the exclusion is LTCG.

Can capital losses offset my salary?

Yes โ€” up to $3,000/year of net capital losses can offset ordinary income. Losses beyond that carry forward indefinitely. This is the primary mechanic of tax-loss harvesting.

Do I pay capital gains on a 401(k) or IRA?

No. Gains inside retirement accounts are tax-deferred (Traditional) or tax-free (Roth). Capital gains tax only applies to taxable brokerage accounts.

Does this calculator include state tax?

No โ€” federal only. Add your state's capital gains rate (see state section above). For accuracy, check your state DOR website for current rates.