Estimate the federal tax on an investment gain: 2025 long-term 0/15/20% brackets stacked on your other income, short-term ordinary rates, and the 3.8% NIIT.
Free toolNo signupFormula shown
Saved & recent
CHECK ENTRYSAVED
RESULT
—
FORMULA USEDCapital Gains Tax Calculator
Two clocks: short-term vs. long-term
The tax on a gain depends on how long you held the asset. One year or less → short-term, taxed at your ordinary income rates (10–37%). More than one year → long-term, taxed at 0%, 15%, or 20%. The holding clock runs from the day after purchase to the sale date.
How the 0/15/20% bands stack
Long-term gains sit on top of your ordinary income. For 2025, single filers pay 0% on taxable income up to $48,350, 15% up to $533,400, and 20% above that; married joint thresholds are $96,700 and $600,050. With $80,000 of ordinary income, the first long-term dollar is already in the 15% band — no 0% room is left.
Losses soften the bill
Capital losses offset gains dollar for dollar first. After netting, up to $3,000 of excess loss can be deducted against ordinary income each year ($1,500 married filing separately), and the remainder carries forward indefinitely. The calculator shows the deductible and carryover split when you enter a loss.
Worked example
A single filer with $80,000 of ordinary income sells stock held two years for a $25,000 gain.
The gain stacks on top: $80,000 of income leaves no room in the 0% band (which ends at $48,350).
So the whole gain lands in 15%: 25,000 × 15% = $3,750.
Held one year or less instead, the same gain would be taxed at 22–24% — about $5,533.
How to use it
Enter your realized gain for the tax year (or a loss, as a negative number).
Choose long-term if you held the asset more than one year.
Add your ordinary taxable income — it sets which band the gain lands in.
Review the bracket split, the NIIT row, and the total.
Frequently asked questions
What is the difference between short-term and long-term capital gains?
The holding period. Sell within a year of buying and the profit is short-term, taxed at your ordinary rates. Hold more than a year and it becomes long-term, taxed at 0%, 15%, or 20% — usually far less.
Do I qualify for the 0% long-term rate?
In 2025, the 0% band covers taxable income up to $48,350 for single filers and $96,700 for married couples filing jointly — counting the gain itself. A single filer with $40,000 of ordinary income can realize about $8,350 of long-term gains tax-free.
What is the Net Investment Income Tax?
A 3.8% surtax on investment income for high earners — single filers above $200,000 of modified AGI, married couples above $250,000. It applies to the lesser of your net investment income or the amount your income exceeds the threshold, on top of the regular capital gains tax.
How are capital losses treated?
Losses first offset gains of the same kind, then the other kind. Up to $3,000 of the remaining net loss ($1,500 married filing separately) can be deducted against ordinary income each year, and anything left carries forward to future years.
Do states tax capital gains?
Most states tax them as ordinary income at state rates, and a few give special treatment or levy no income tax at all. This calculator is federal-only, so add your state’s share separately.
How can I legally lower a capital gains bill?
Common levers: hold winners past the one-year mark, harvest losses to offset gains, time sales into low-income years to use the 0% band, and mind the wash-sale rule when repurchasing. Confirm specifics with a tax professional before acting.