Skip to content
Calcerra
Financial

Capital Gains Tax Calculator

Calculate 2025 federal capital gains tax on stocks, crypto, real estate. Short-term vs long-term rates, NIIT surcharge, optional state tax — see exactly what you'll owe.

What you paid for the asset, including reinvested gains

Sale price minus transaction costs

More than 12 = long-term (preferential rate)

Wages and other income — drives which LTCG bracket applies

Filing status
Tax year

Most states tax gains as ordinary income (CA ~9.3%, NY ~6.85%, TX/FL 0%)

Your capital gains tax

Total tax owed

$4,500

On a $30,000 long-term gain · 15.0% effective rate

Federal tax

$4,500

LTCG bracket: 15%

NIIT surcharge

$0

Not applicable at this income

Net after tax

$45,500

Sale proceeds minus all tax

🧾

Capital gains stack on top of regular income. The figures above are JUST the capital gains tax. Your total federal tax bill is this plus your ordinary income tax. To model the combined picture, run your ordinary income through the Income Tax Calculator and add the federal tax above.

How to use this calculator

  1. Enter cost basis — what you paid for the asset, including commissions and reinvested distributions.
  2. Enter sale proceeds — what you sold it for, minus transaction costs.
  3. Enter months held — more than 12 months qualifies for long-term treatment.
  4. Enter other taxable income — your wages and other income; this determines which LTCG bracket applies.
  5. Pick filing status and tax year — drives the bracket thresholds.
  6. (Optional) Enter your state tax rate — flat-rate approximation. CA ~9.3%, NY ~6.85%, TX/FL/NV 0%.
  7. (Optional) Toggle NIIT — on by default. The 3.8% surcharge auto-applies when your MAGI exceeds the threshold.

The result shows your total gain, gains type, federal tax (with the bracket applied), NIIT surcharge, state tax, and net after tax. A separate callout flags how much you’d save by waiting until the holding period exceeds 12 months (if the gain is currently short-term).

How it works

The two regimes

Holding periodRegimeFederal rate
≤ 12 monthsShort-termOrdinary income brackets (10%–37%)
> 12 monthsLong-termLTCG brackets (0% / 15% / 20%)

Short-term gains are added to your other income and taxed at your marginal ordinary rate. Long-term gains use a separate, lower set of brackets based on TOTAL taxable income (other income + the gain).

Worked example

You bought $20,000 of stock 18 months ago and sold it for $50,000. You’re single, with $85,000 of other income, 2025 tax year:

ComponentAmount
Cost basis$20,000
Sale proceeds$50,000
Total gain$30,000
Gains typeLong-term (held > 12 months)
Other income$85,000
Other + gain$115,000
LTCG bracket applied15% (income falls in 15% bracket)
Federal tax on gain$30,000 × 15% = $4,500
NIIT?No — total AGI under $200k
Net after federal tax$45,500

If you’d sold at 11 months instead (short-term), the $30,000 gain would have been taxed at your ordinary 22% bracket, costing roughly $6,600 — about $2,100 more. The 12-month boundary is worth real money.

NIIT mechanics

If your MAGI exceeds $200,000 (single) or $250,000 (married), an additional 3.8% applies to the lesser of:

  • Your net investment income (including capital gains)
  • The amount your MAGI exceeds the threshold

At the top bracket, this stacks: 20% LTCG + 3.8% NIIT = 23.8% effective federal rate.

Frequently Asked Questions

What's the difference between short-term and long-term capital gains?

Holding period determines the regime. If you sell an asset 12 months or less after buying it, the gain is SHORT-TERM and taxed as ordinary income at your regular federal bracket (10% to 37%). If you hold it more than 12 months (12 months and a day or longer), it's LONG-TERM and taxed at the preferential federal LTCG rates of 0%, 15%, or 20% — substantially lower than ordinary income rates at most income levels. The 12-month boundary is the single most expensive day in investment tax law for short-term holders.

What income triggers each long-term capital gains bracket?

For 2025: Single filers pay 0% on LTCG when total taxable income is up to $48,350, 15% from $48,351 to $533,400, and 20% above $533,400. Married filing jointly pays 0% up to $96,700, 15% up to $600,050, and 20% above. The 0% bracket is a major planning opportunity for retirees and people in low-income years — selling appreciated stock at a 0% federal rate is one of the cleanest tax moves in the code.

What is the Net Investment Income Tax (NIIT)?

An additional 3.8% federal tax on investment income (including capital gains) for taxpayers with modified AGI above $200,000 single or $250,000 married. It applies to the lesser of (a) your net investment income or (b) the amount your MAGI exceeds the threshold. The NIIT was introduced in 2013 to help fund the Affordable Care Act and surprises many high-earner sellers. It stacks on top of the LTCG bracket rate — so a 20% LTCG + 3.8% NIIT = 23.8% effective federal rate at the top.

How are state taxes on capital gains different?

Most US states tax capital gains as ordinary income at their regular bracket rates — no preferential long-term treatment. So a California resident in the 9.3% state bracket pays 9.3% on the gain regardless of holding period. A few states have separate rules: Washington has a 7% tax specifically on long-term gains above $250,000 (2022 law), New Hampshire taxes only dividends and interest, and the nine states with no income tax (TX, FL, NV, TN, WA wages only, SD, WY, AK, NH wages only) impose no tax on gains at all.

Can I offset capital gains with capital losses?

Yes — and aggressively if you plan it. Capital losses first offset capital gains of the same character (short-term losses against short-term gains, long-term against long-term). Any net loss after that offsets up to $3,000 of ordinary income per year ($1,500 if married filing separately). Anything beyond $3,000 carries forward indefinitely until used. This is what 'tax-loss harvesting' refers to — deliberately selling losing positions to bank deductible losses while staying invested via similar-but-not-identical replacements (avoiding the IRS wash-sale rule).

Does this calculator handle inherited assets or gifted assets differently?

No — those have special rules this calculator doesn't model. Inherited assets get a 'stepped-up basis' to fair market value on the date of death, which usually eliminates capital gains tax on appreciation during the deceased's lifetime. Gifted assets carry over the giver's original cost basis and holding period. Real estate sales of a primary residence have a $250,000/$500,000 exclusion that this calculator also doesn't apply. For inheritance, gift, or home-sale scenarios, the calculator gives a baseline but you should consult IRS Publication 550 or a tax professional for the exact mechanics.

Related Calculators