US Capital gains tax calculator

Short and long-term capital gains tax estimates by region.

By Mitch Duncan Last reviewed Methodology

Your gain

Est. tax owed
$3,750.00
Net gain
$21,250.00
Effective rate
15.0%

Estimates only

Capital gains tax depends on your full tax picture, allowable losses, deferrals, and local rules not modelled here. Consult a tax professional before filing.

Want the full picture? How to Reduce Capital Gains Tax: 9 Legal Strategies →

How US capital gains tax is calculated

A capital gain is profit from selling an asset for more than its cost basis:

Capital gain = sale price − cost basis − selling expenses

In the US, how long you held the asset is everything — it's a hard one-year cliff.

Worked example (long-term)

Buy 100 shares at $50 ($5,000 basis). Sell after 2 years at $90 ($9,000), $20 commission.

Sold at 6 months instead, the whole gain is taxed at your ordinary rate (22%) = $876 — nearly 50% more for selling early.

Short-term vs long-term

Wash-sale rule and basis

You can't claim a loss if you buy a substantially identical security within 30 days before or after the sale — the loss is disallowed and added to the new basis. Track cost basis carefully, including reinvested dividends, or you'll overpay tax on phantom gains.

Common mistakes

What this doesn't cover

Related calculators

Related guides

Key terms

Frequently asked questions

What's the difference between short-term and long-term capital gains?
Short-term gains (assets held one year or less in the US) are taxed as ordinary income at your marginal rate — up to 37%. Long-term gains (held over one year) get preferential rates of 0%, 15%, or 20% depending on income. The UK, Canada, and Australia have different rules — Australia gives a 50% discount on assets held over 12 months, for example.
How is capital gains tax calculated?
Gain = sale price − cost basis − selling expenses. The gain is then taxed at the applicable rate (short- or long-term in the US; ordinary income with a 50% inclusion in Canada; 50% discount in Australia; flat 10/18/20/24% bands in the UK after the annual exempt amount). The calculator above handles each market's rules.
Do I owe capital gains tax on my primary residence?
US: usually no, up to $250,000 of gain ($500,000 married filing jointly) if you've lived there 2 of the last 5 years. UK: principal residence is generally exempt under Private Residence Relief. Canada: principal residence is fully exempt. Australia: main residence is generally exempt with caveats around use and ownership period.
Can I offset capital gains with losses?
Yes — capital losses offset capital gains, and excess losses can offset some ordinary income ($3,000/year in the US; £0 — UK losses carry forward indefinitely against gains; Canada and Australia carry forward losses indefinitely). 'Tax-loss harvesting' — deliberately realising losses to offset gains — is a common end-of-year strategy.

Embed this calculator

Free to embed on your website, blog, or resource page — no signup, no fees, no API key. The calculator runs entirely in the visitor's browser.

<iframe
  src="https://financecalcapp.com/embed/capital-gains/us/"
  width="100%"
  height="680"
  frameborder="0"
  title="Capital Gains Tax Calculator"
  loading="lazy"
></iframe>
<p>Free <a href="https://financecalcapp.com/calculators/capital-gains/us/">Capital Gains Tax Calculator</a> by <a href="https://financecalcapp.com">Finance Calc App</a></p>