Skip to main content
/
capital gains taxlong-term capital gainsshort-term gainsNIITinvestment tax
//// Financial · Investing & Taxes

Capital Gains Tax Calculator

Enter your purchase price, sale price, and holding period to see your exact federal capital gains tax, NIIT, and state tax — plus a side-by-side comparison of what you'd save by waiting for long-term treatment.

Where this fits

This tool lives inside Trading Income and is most useful for traders.

401(k) Limit 2024$23,000
Roth IRA Limit$7,000
S&P 500 Avg Return~10%/yr

Asset Sale Details

Long-term gains qualify for preferential 0%, 15%, or 20% rates.

$
$
$
%

Capital Gain

$35,000

Long-term

Federal Tax

$5,250

15% rate

NIIT (3.8%)

$0

Not applicable

State Tax

$1,750

5.0% rate

Total Tax

$7,000

20.0% of gain

Net Proceeds

$53,000

After all taxes

Tax Breakdown

Sale price$60,000
Cost basis$25,000
Capital gain$35,000
Federal tax (15%)$5,250
State tax (5.0%)$1,750
Net proceeds$53,000
1

Step 1 — Calculate the Gain

gainAmount = salePrice − costBasis

$60,000 − $25,000 = $35,000

= $35,000

Long-term gain — held more than 1 year.

2

Step 2 — Determine the Federal Rate

LTCG rate from 2024 bracket (0%, 15%, or 20%) based on total income

Total income = $85,000 + $35,000 = $120,000 → 15% LTCG rate

= 15% federal rate → $5,250

2024 single-filer rates. LTCG 0%: ≤$47,025 | 15%: $47,026–$518,900 | 20%: >$518,900.

IRC § 1(h)

3

Step 3 — Total Tax (Federal + NIIT + State)

totalTax = federalTax + niitAmount + stateTax

$5,250 + $0 + $1,750

= $7,000

No NIIT — MAGI ($120,000) is below $200,000 threshold. State tax: 5.0% × gain.

IRC § 1411 — Net Investment Income Tax

4

Step 4 — Net Proceeds After Tax

netProceeds = salePrice − totalTax

$60,000 − $7,000 = $53,000

= $53,000

Effective tax rate on the gain: 20.0%.

Key insight

Your $35,000 long-term gain faces a 20.0% total effective rate — leaving $53,000 after all taxes.

#ShowYourWork