Finance tools

Capital gains tax calculator

Use this free capital gains tax calculator to estimate 2026 federal tax when you sell stocks, ETFs, crypto, or other investments. Enter cost basis, sale price, how long you held the asset, filing status, and other taxable income (after deductions—not gross salary). You’ll see tax on the profit from the sale, a short-term vs long-term comparison, and after-tax proceeds. State tax and NIIT (3.8%) are available under Advanced options. Export CSV or PDF with no sign-up. Estimating annual wages or a refund? Try the income tax calculator. Need average cost across several buys? Use the stock average calculator first, then enter that basis here.

What this capital gains tax calculator does

What are capital gains?

Capital gains formula (basis, sale price, and gain)

Gain on a single sale

Short-term vs long-term capital gains

Short-termLong-term
Holding period1 year or lessMore than 1 year
Federal rate structureOrdinary income (10%–37%)0%, 15%, or 20% on most investments
What income mattersTaxable income + gain stacks in ordinary bracketsLTCG bands stack on taxable income
In this toolSelect Short-termSelect Long-term (default)

How to calculate capital gains tax

  1. Find your realized gain

    Subtract cost basis from sale price. Add selling costs in advanced options if commissions reduce your gain.

  2. Choose holding period

    Use the Short-term or Long-term toggle at the top of the form. If you held the asset one year or less, it’s short-term; more than a year is long-term for most securities.

  3. Enter other taxable income

    Use annual taxable income after the standard or itemized deduction and pre-tax deferrals — not gross W-2 wages — so brackets and LTCG bands stack correctly.

  4. Read federal tax on the gain

    Read the main tax-on-gain estimate, then check the breakdown, effective rate, after-tax proceeds, and the short-term vs long-term comparison.

  5. Optional: state and NIIT

    Expand advanced options to model selling costs, pick a state for a simplified incremental state tax estimate, or include NIIT when MAGI is above IRS thresholds.

2026 long-term capital gains tax rates

LTCG rateSingleMarried filing jointlyMarried filing separatelyHead of household
0%Up to $49,450Up to $98,900Up to $49,450Up to $66,200
15%$49,451 – $545,500$98,901 – $613,700$49,451 – $306,850$66,201 – $579,600
20%Over $545,500Over $613,700Over $306,850Over $579,600

How short-term gains use ordinary tax brackets

Worked example: $15,000 gain with $50,000 taxable income (single, 2026)

Holding periodFederal tax on $15k gain (approx.)Why
Long-term$2,25015% LTCG rate on gain stacked above $50k ordinary income
Short-term$3,260Marginal ordinary brackets on income + gain vs income alone

State capital gains and income tax

Net investment income tax (NIIT)

Filing statusMAGI threshold (2026 planning)
Single$200,000
Married filing jointly$250,000
Married filing separately$125,000
Head of household$200,000

Home sales, rentals, and inherited property

Capital losses and tax-loss harvesting

Limitations of this calculator

Discover more calculators for time tracking, payroll, and HR.

Frequently asked questions about this capital gains tax calculator

What is capital gains tax?

Capital gains tax is federal tax on profit when you sell a capital asset for more than your cost basis (what you paid, plus eligible adjustments).

The rate depends on how long you held the asset and your taxable income. The calculator above turns your sale details into a 2026 federal estimate on the gain—not on the full sale price.

How do I calculate my capital gains tax?

Start with gain: sale price minus cost basis (minus selling costs if any).

Tax the gain as short-term (ordinary federal brackets on the marginal amount) or long-term (0%, 15%, or 20% bands stacked on your other taxable income).

Enter filing status and other taxable income so brackets stack correctly, then read federal tax on the gain, optional state/NIIT, and after-tax proceeds.

How do I use a capital gains tax calculator for stock sales?

Enter cost basis (what you paid, including buy fees), sale proceeds, and whether the sale is short-term or long-term.

Multiple purchases? Get a weighted average with the stock average calculator, then use that as basis here. Broker CSV import and automatic FIFO are not included—enter the basis your records support.

How much capital gains tax will I pay on $100,000?

There is no single percentage for a $100,000 gain—it depends on holding period, filing status, and other taxable income.

A $100k long-term gain may span 0%, 15%, or 20% federal bands; a short-term $100k gain is taxed like ordinary income. Run your numbers with the same gain under both terms to compare.

How much capital gains tax will I pay on $300,000?

A $300,000 gain rarely has one flat tax rate. Large gains often cross several federal bands in a single year.

Long-term portions may hit 15% and 20% LTCG rates; short-term portions follow ordinary brackets (24%, 32%, 35%, and up). Model filing status, taxable income, and holding period; turn on state tax if you need a combined planning view.

Is capital gains tax 20% or 24%?

20% is the top federal long-term rate on most investments—not 24%.

24% is an ordinary income bracket that often applies to short-term gains taxed like wages. Income, holding period, and gain size together set the effective rate in your results.

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

Short-term gains are taxed like wages (ordinary federal brackets). Long-term gains on most investments use preferential 0%, 15%, or 20% rates when you held the asset more than one year.

The holding period clock usually starts the day after you buy. Use the short-term vs long-term comparison on the same sale to see the federal difference—especially near the one-year mark.

What are the long-term capital gains tax rates for 2026?

For 2026, federal long-term rates on most investments remain 0%, 15%, and 20%.

Which rate applies depends on total taxable income (including the gain) and filing status—see the rate table on this page. Collectibles and certain other assets can use different rates; this tool uses standard LTCG bands.

Why does my capital gains tax estimate look so high?

Short-term gains use ordinary income brackets—if you already have substantial taxable income, the sale can push part of the gain into 22%, 24%, or higher federal bands.

Using gross salary instead of taxable income, or treating the full sale price as taxable instead of only the gain, also inflates estimates.

Compare long-term vs short-term in the results panel; enable NIIT in advanced settings when MAGI may exceed IRS thresholds.

Should I enter gross salary or taxable income?

Enter taxable income—the amount on your return after deductions and before this sale’s gain.

Gross W-2 wages are usually too high. Estimate taxable income with the income tax calculator first if needed, then use that figure here.

What is the Net Investment Income Tax (NIIT)?

NIIT is an extra 3.8% federal tax on net investment income when MAGI is above IRS thresholds ($200k single, $250k MFJ, $125k MFS, $200k HOH for planning).

It stacks on top of ordinary or LTCG tax on the gain. Turn on NIIT in advanced options for a simplified estimate—not a full Form 8960 calculation.

Does this calculator include state capital gains tax?

Yes—optionally. Enable state tax in advanced settings and choose your state for a simplified incremental estimate on income including the gain.

No-income-tax states add little or nothing; high-tax states can add a large bill on top of federal results. This is planning math, not a state return, and may not reflect every state’s preferential CG rule.

Does California tax capital gains differently?

California generally taxes capital gains as ordinary income for individuals—there is no separate state long-term rate like the federal 0%/15%/20% structure.

Select California under state tax in advanced options for a simplified estimate. Combined federal + state totals can be much higher than federal-only results.

Does this work for crypto?

Yes for a straightforward sale: enter USD cost basis, sale proceeds, and short- or long-term holding period.

Exchange CSV import, wallet tracking, and specific lot IDs are not supported. Staking, airdrops, and token swaps need specialist tax software.

How do I calculate capital gains tax on rental property?

Start with adjusted basis: purchase price plus capital improvements minus depreciation you claimed while renting.

Use that as cost basis and your net sale price as sale price, then pick short- or long-term holding. To estimate a depreciation schedule while you own the property, try our depreciation calculator. Depreciation recapture is not broken out here—a CPA can model a full rental sale.

Does this calculator handle home sale exclusions?

Not automatically. On a primary home you may exclude up to $250,000 of gain (single) or $500,000 (married filing jointly) when you meet IRS ownership and use tests.

Enter only the taxable portion of gain after any exclusion, or use this tool for investments and second homes. Rules: IRS Topic 701.

How can I avoid capital gains tax on a home sale?

Many homeowners owe no federal gain tax on a primary residence when they qualify for the IRS exclusion—up to $250,000 (single) or $500,000 (married filing jointly).

Ownership and use tests apply. This calculator does not apply the exclusion—it estimates tax on the taxable part of a gain or on other assets. See IRS Topic 701 — Sale of your home.

Do I pay capital gains tax on inherited property?

Inheritance itself is not a sale, but when you later sell inherited property, tax is usually based on gain above stepped-up basis—often fair market value at the date of death.

That step-up can greatly reduce taxable gain versus the decedent’s original purchase price. Enter stepped-up basis from estate or broker records. Community property, joint tenancy, and alternate valuation dates can change basis—this tool does not compute them.

How does this relate to average stock price?

Cost basis for tax is often your average purchase price when you bought the same stock multiple times.

Use the stock average calculator for the weighted average, then enter that total or per-share basis when you sell.

Can I offset gains with losses?

Yes. Capital losses offset capital gains first, then up to $3,000 of other income per year ($1,500 MFS), with excess carried forward.

The wash-sale rule may disallow a loss if you rebuy a substantially identical security within 30 days. Enter a net gain here if you have already netted other sales.

Can I export my capital gains tax results?

Yes—free, no sign-up. After you calculate, download a CSV or PDF with inputs, tax breakdown, and disclaimer.

Files are generated in your browser; we do not store your numbers on a server.

Is this capital gains tax calculator tax advice?

No. Ordio provides educational calculators, not personalized tax, legal, or investment advice.

Use results for planning, then confirm with a CPA, enrolled agent, or tax software before you file or make large financial decisions.