Capital Gains Tax Calculator

Calculate your federal short-term and long-term capital gains tax liability, 0%/15%/20% LTCG brackets, and 3.8% Net Investment Income Tax (NIIT).

Filing & Gains Parameters

$
$
$
Total Capital Gains Tax Due
$1,100federal liability

Effective capital gains rate: 4.40% on $25,000 in gains

Preferential LTCG Active

Short-Term Tax

$1,100

Ordinary rate

Long-Term Tax

$0

0 / 15 / 20%

NIIT Surtax (3.8%)

$0

$0 (Under cap)

Total Taxable AGI

$110,000

Wages + all gains

Federal Tax Bracket Allocation

Ordinary Base Income (Wages/Salary)$85,000
Short-Term Gains (Taxed at ordinary margin)$5,000 → +$1,100
Long-Term Gains (Preferential LTCG)$20,000 → +$0
Total Capital Gains Tax$1,100
Effective Capital Gains Tax Rate4.40%
Tax Savings Benchmark

By holding investments for more than 365 days, gains are taxed at 0%, 15%, or 20% rather than ordinary income brackets reaching up to 37%. On a $50,000 gain, long-term treatment can save up to $8,500+ in federal taxes.

Federal Capital Gains Tax Framework
Short-Term Gains (≤ 1 Yr)
Tax = ST Gain × Marginal Ordinary Rate
Long-Term Gains (> 1 Yr)
Tax = LT Gain × (0%, 15%, or 20%)
Net Investment Surtax (NIIT)
NIIT = min(NII, MAGI - $200k) × 3.8%
Step-by-Step Calculation Breakdown
Example: Single Filer, $85,000 Wages, $5,000 Short-Term Gain, $20,000 Long-Term Gain
1. Ordinary Income Margin: $85,000 base places ST gains in the 22% bracket
2. Short-Term Tax: $5,000 × 22% = $1,100.00
3. Long-Term Tax: $20,000 falls in 15% LTCG bracket = $3,000.00
4. MAGI Threshold: Total $110,000 is under $200k single NIIT limit = $0.00 NIIT
5. Total Capital Gains Tax: $1,100 + $3,000 = $4,100.00
6. Effective Capital Gains Rate: $4,100 ÷ $25,000 total gains = 16.40%
Total Capital Gains Tax Due:$4,100.00 (16.40% Effective)

Key Capital Gains Tax Optimization Strategies

  • Cross the 365-Day Threshold: Delaying sales by just a few days to surpass 12 months often cuts federal taxes from 24%–37% down to 15%.
  • Tax-Loss Harvesting: Realize paper losses before December 31 to offset realized capital gains dollar-for-dollar and reduce taxable income.
  • Primary Residence Exemption (Section 121): Exclude up to $250,000 ($500,000 if married) of capital gain on a home sale if you lived in it for 2 of the past 5 years.

Frequently Asked Questions

What is the difference between short-term and long-term capital gains?
Short-term capital gains are profits from assets held for one year or less and are taxed as ordinary income at your marginal federal rate (up to 37%). Long-term capital gains apply to assets held for longer than one year and receive preferential tax rates of 0%, 15%, or 20%.
What is the Net Investment Income Tax (NIIT)?
The NIIT is an additional 3.8% surtax applied to net investment income (including dividends and capital gains) for taxpayers with Modified AGI above $200,000 (single) or $250,000 (married filing jointly).
Who qualifies for the 0% long-term capital gains rate?
Single taxpayers with total taxable income up to $47,025 and married couples filing jointly up to $94,050 pay 0% federal tax on their long-term capital gains.
Can capital losses offset capital gains?
Yes. Capital losses offset capital gains dollar-for-dollar. If net losses exceed gains, you can write off up to $3,000 per year against ordinary wages, with any remaining unused losses carried forward indefinitely.
Are cryptocurrency transactions subject to capital gains tax?
Yes. The IRS treats cryptocurrency as property. Selling, trading, or spending cryptocurrency triggers a taxable capital gain or loss depending on your holding period and purchase cost basis.

Related Tools