Capital Gains Tax Calculator

Capital gains tax is charged on the profit when you sell an asset, and the rate usually depends on how long you held it — long‑term gains are taxed lower than short‑term. Enter your purchase and sale details to estimate the tax owed.

Estimate the tax on your investment profit from stocks, crypto, funds or property — at short-term or long-term rates — plus your net gain after tax.

$
$
%

Short-term vs long-term capital gains

How long you owned the asset before selling decides which rate applies:

  • Short-term — you held it one year or less. The gain is taxed as ordinary income, at your normal federal rate of 10% to 37% — the same brackets the income tax calculator applies.
  • Long-term — you held it more than one year. The gain gets the lower long-term rates of 0%, 15% or 20%, based on your taxable income and filing status.

That single year is often worth thousands in tax. In the calculator, pick your holding period and enter the rate that matches your situation — the table below shows which one to use.

2026 long-term capital gains tax rates

Long-term gains use these 2026 taxable-income brackets (for returns filed in early 2027). Find the row for your filing status and total taxable income to get your rate:

RateSingleMarried filing jointlyHead of household
0%$0 – $49,450$0 – $98,900$0 – $66,200
15%$49,451 – $545,500$98,901 – $613,700$66,201 – $579,600
20%$545,501+$613,701+$579,601+

Married filing separately: 0% up to $49,450, 15% to $306,850, then 20%. Short-term gains instead follow the ordinary income brackets (10%–37%).

How capital gains tax is calculated — the formula

The maths is short: your gain is what you sold for minus what you paid (your cost basis), and the tax is that gain times your rate.

Capital gain = Sale price − Cost basis
Tax = Capital gain × your rate
Net gain after tax = Capital gain − Tax
Worked example — the default figures above. Buy at $10,000, sell at $16,000, held long-term, taxed at 15%:
Gain = 16,000 − 10,000 = $6,000
Tax = 6,000 × 15% = $900
Net gain after tax = 6,000 − 900 = $5,100

Your cost basis is more than the purchase price alone — it also includes commissions, fees and reinvested dividends, all of which lower your taxable gain, so keep those records.

How to lower your capital gains tax

Legitimate, widely-used ways to keep more of your profit:

  • Hold for more than a year — the jump from ordinary rates to 0/15/20% is the biggest single lever.
  • Use the 0% bracket — if your taxable income is low in a given year (a gap year or early retirement), long-term gains inside the 0% band are tax-free.
  • Harvest losses — selling losing investments in the same year offsets your gains dollar-for-dollar; up to $3,000 of net loss can offset ordinary income, and the rest carries forward.
  • Sell in tax-advantaged accounts — gains inside a 401(k), IRA or Roth are not taxed as you trade — see how they compound with the compound interest calculator.
  • Primary-home exclusion — selling your main home lets you exclude up to $250,000 of gain ($500,000 married filing jointly) if you owned and lived in it two of the last five years.
  • Inherited assets get a step-up — heirs' cost basis resets to the value at death, wiping out the earlier gain.

This is general information, not tax advice — confirm with a tax professional for your situation.

NIIT, collectibles and real estate

A few gains fall outside the standard 0/15/20%:

  • Net Investment Income Tax (NIIT) — an extra 3.8% on investment income, including capital gains, once your income tops $200,000 (single) or $250,000 (married filing jointly). Add it to your rate in the box above if it applies.
  • Collectibles — art, coins and precious metals are taxed at up to 28%.
  • Real-estate depreciation recapture — the part of a rental-property gain from depreciation you claimed is taxed at up to 25%.

How to use it & key terms

Enter your purchase price, sale price, holding period and rate, then press Calculate to see the gain, the tax and your net gain after tax.

TermWhat it means
Cost basisWhat you paid for the asset, plus commissions, fees and reinvested dividends.
Capital gainSale price minus cost basis — the profit that's taxed.
Short-termHeld one year or less; taxed as ordinary income (10–37%).
Long-termHeld more than a year; taxed at the lower 0%, 15% or 20% rates.
NIITAn extra 3.8% on investment income above $200k single / $250k joint.
Step-up in basisInherited assets reset to their value at death, erasing the earlier gain.

Short-term vs long-term — and ways to lower the bill

How long you hold an asset changes everything. Sell within a year and the gain is short-term, taxed as ordinary income at your regular rate. Hold longer than a year and it becomes a long-term gain, taxed at the preferential 0%, 15% or 20% rate that applies to your income band — often far less than ordinary rates. That single distinction is why patient investors watch the one-year mark before selling.

Several rules can soften a bill further. Tax-loss harvesting offsets gains with realized losses, and up to $3,000 of net loss can offset ordinary income each year, with the rest carried forward. Selling a main home may qualify for the $250,000 exclusion ($500,000 for a married couple filing jointly) if you meet the ownership-and-use test. High earners should also budget for the additional 3.8% net investment income tax, and everyone should watch the wash-sale rule, which disallows a loss if you rebuy the same security within 30 days.

Sources & methodology

Your capital gain is the sale proceeds minus your cost basis. The tool applies the relevant rate — higher short-term rates for assets held a year or less, lower long-term rates for those held longer — to estimate the tax due.

Sources: 2026 long-term capital-gains brackets (0/15/20%) and holding-period rules as published by the IRS and summarised by the Tax Foundation and Kiplinger; NIIT and home-sale exclusion per IRS. Rates vary by country and income.

Paper gains, realised gains, and the timing you control

An investment can climb in value for years without triggering a single dollar of tax. That is the gap between an unrealised gain — a paper gain that exists only on your statement while you still hold the asset — and a realised gain, which happens the moment you sell. Capital gains tax attaches only to realised gains, so watching a stock, fund or property rise creates no bill by itself. It is why patient investors can let a position compound untouched: nothing is owed until they decide to sell, and the choice of when to sell stays firmly in their hands.

Because the taxable event is the sale, you hold unusual control over when it lands. Selling in a year when your other income dips can pull the same profit into a gentler band; spreading a large disposal across two calendar years can keep part of it out of the top band; and simply waiting past the one-year mark turns a short-term gain into a long-term one. Retirees and those between jobs often find a low-income year is the cheapest time to realise a long-held position. None of that is about hiding income — it is about choosing the moment, a lever employees rarely have over their wages.

It also helps to picture a long-term gain as sitting on top of your ordinary income rather than beside it. Your wages and other earnings fill the lower bands first, and the gain stacks above them — so one large sale can begin in a lower rate band and spill into a higher one, with part taxed gently and part taxed more. That stacking is exactly why the box above asks for the rate that fits your circumstances: the right figure depends on how much room is left in your band before the gain is added.

One habit underpins all of it: keep clean records of what you paid, including commissions and reinvested distributions, for as long as you own the asset. That figure — your cost basis — decides how much of the sale is genuinely a gain, and rebuilding it years later is far harder than noting it as you go. Losses deserve the same care, since a realised loss can offset a realised gain in the same year. Treat every result here as an estimate to confirm against current official guidance before you act.

Frequently asked questions

What is capital gains tax?

Capital gains tax is the tax on the profit when you sell an asset — a stock, fund, cryptocurrency or property — for more than you paid. You're taxed on the gain, not the whole sale amount.

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

Short-term gains (assets held one year or less) are taxed as ordinary income at 10–37%. Long-term gains (held more than a year) get the lower 0%, 15% or 20% rates based on your taxable income and filing status.

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

For 2026, 0% applies up to $49,450 taxable income single ($98,900 married filing jointly), 15% up to $545,500 single ($613,700 joint), and 20% above that.

How is the capital gain calculated?

Gain = sale price − cost basis (what you paid plus commissions, fees and reinvested dividends). Tax = gain × your rate, and your net gain is the gain minus the tax.

How do I know which rate to use?

Add the gain to your other taxable income, then find your filing status and income in the 2026 long-term brackets above. If you held the asset a year or less, use your ordinary income tax rate instead.

How can I reduce capital gains tax?

Hold assets more than a year, use the 0% bracket in low-income years, harvest losses to offset gains, sell inside tax-advantaged accounts, and use the home-sale exclusion (up to $250,000, or $500,000 married filing jointly).

Do I pay capital gains tax on stocks, crypto and property?

Yes — stocks, funds, cryptocurrency, real estate and other investments are all taxed on the profit when sold. Your main home has a large exclusion.

Is selling my home taxed?

Often not. If you owned and lived in your main home for two of the last five years, you can exclude up to $250,000 of gain ($500,000 married filing jointly); gain above that is taxed at long-term rates.

What is the Net Investment Income Tax (NIIT)?

An extra 3.8% on investment income, including capital gains, once your income tops $200,000 single or $250,000 married filing jointly. Add it to your rate if it applies.

Do I need to make an estimated tax payment on capital gains?

Often, yes. A large gain from selling an investment can create an estimated tax payment due that quarter, so you avoid an underpayment penalty rather than waiting until you file. A simple approach is to set aside the estimated capital-gains tax as soon as you sell. This calculator shows the tax so you can plan the payment.

If I sell stock and reinvest, do I still pay capital gains?

Yes. Selling a stock at a profit is a taxable event even if you immediately reinvest in another stock — tax is due on the gain you realized. Reinvesting only defers tax inside a tax-advantaged account like an IRA or 401(k), not an ordinary brokerage account. To lower the bill, offset the gain by selling other investments at a loss the same year (netting gains and losses).

Is this tax advice?

No. It's an educational estimate using the rate you enter. Capital gains rules vary by income, asset and country, so confirm your figure with a tax professional.