Skip to content
CalculatorFly

Capital Gains Tax Calculator

Enter your sale price, what you paid and your other income. See the tax if you held it a year or less versus more than a year, worked out on your device with the 2026 IRS brackets.

Your sale and income

How long you held it

Investment income and state tax

Other investment income only affects the 3.8% Net Investment Income Tax; it should already be included in your other income above. Most states tax capital gains as ordinary income: enter your top state rate, or 0 for states with no income tax such as Florida and Texas.

Estimated tax on your gain
-

Held 1 year or less

Federal income tax
-
Net investment income tax
-
State tax
-
Total tax
-
Effective rate on the gain
-
You keep from the sale
-

Held more than 1 year

Federal income tax
-
Net investment income tax
-
State tax
-
Total tax
-
Effective rate on the gain
-
You keep from the sale
-

How the long-term gain is taxed

RateTaxable income rangeYour gain in it
Gain
-
Deduction used
-
Taxable ordinary income
-
Taxable income incl. gain
-
Tax bracket before the gain
-
MAGI (for the 3.8% tax)
-

2026 federal brackets (IRS Rev. Proc. 2025-32). An estimate for a single sale, not tax advice: it leaves out collectibles (28%), depreciation recapture on property (25%), AMT, credits and loss carryovers, and treats state tax as a flat rate.

How to use the capital gains tax calculator

Enter what you sold the asset for after fees and its cost basis, usually what you paid plus any purchase fees. Choose your filing status and enter your other income for the year (adjusted gross income without this sale, for example wages, interest and retirement income). The calculator applies the 2026 standard deduction unless you enter your own deduction total, then shows the tax both ways: held for one year or less (short term) and held for more than one year (long term), so you can see what waiting would save.

How capital gains are taxed in 2026

Short-term gains are added to your ordinary income and taxed at the regular rates of 10% to 37%. Long-term gains are taxed at 0%, 15% or 20%, and which rate applies depends on your total taxable income with the gain stacked on top of your other income:

RateSingleMarried jointlyHead of householdMarried separately
0%up to $49,450up to $98,900up to $66,200up to $49,450
15%to $545,500to $613,700to $579,600to $306,850
20%aboveaboveaboveabove

On top of that, the 3.8% Net Investment Income Tax applies to the smaller of your investment income or the amount your modified AGI exceeds $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). These thresholds are not adjusted for inflation.

Worked example

A single filer earns $50,000 and sells shares for $50,000 that cost $20,000, a $30,000 gain. After the $16,100 standard deduction, ordinary taxable income is $33,900. Held more than a year, the gain fills the 0% band up to $49,450, so $15,550 is tax-free and the other $14,450 is taxed at 15%: $2,167.50 of federal tax, 7.2% of the gain. Sold within a year, the whole gain is taxed as ordinary income, $16,500 at 12% and $13,500 at 22%: $4,950. Waiting past one year saves $2,782.50. Her income is far below $200,000, so no Net Investment Income Tax applies.

FAQ

How do I know if a gain is long term?

You must hold the asset for more than one year: count from the day after you bought it through the day you sold it. Shares received from a gift generally keep the giver's holding period, and inherited assets are always treated as long term.

Are qualified dividends taxed the same way?

Yes. Qualified dividends use the same 0%, 15% and 20% rates and stack on top of ordinary income together with long-term gains. Ordinary (non-qualified) dividends and interest are taxed like wages.

What if I sold at a loss?

Capital losses first offset capital gains for the year. If losses are larger, up to $3,000 ($1,500 if married filing separately) can reduce other income, and the rest carries forward to future years.

Is my information sent anywhere?

No. CalculatorFly runs every calculation on your device with WebAssembly. Nothing you enter is uploaded or stored. Results are estimates, not tax advice; check with a tax professional for your situation.