All tools

Capital Gains Tax Calculator

Free capital gains tax calculator for stocks. Estimate short-term and long-term tax on profits using cost basis, sale proceeds, and federal brackets. Educational estimate only.

Estimate short-term vs long-term capital gains tax on a stock sale using purchase price, sale price, holding period, and your tax bracket. Plan exits with tax drag in mind — not after the fact.

Sale details (USD)

What you paid (including commissions).

Most middle-income filers land in 15%. Confirm with current IRS brackets for your filing status.

Optional flat estimate (0 if no state income tax). Not a full state return.

Tax estimate

Estimated tax on gain

$750.00

Federal + state estimate

Capital gain / (loss)
$5,000.00
Federal tax
$750.00
Eff. federal rate
15%
State tax
$0.00
After-tax profit
$4,250.00
After-tax return
42.5%

Educational estimate only — not tax advice. NIIT, AMT, wash sales, and filing status can change the real bill.

What is a capital gains tax calculator?

A capital gains tax calculator estimates the tax hit when you sell stocks (or similar assets) for more than you paid. People search for it before year-end selling, before taking a large profit, or when comparing “sell now” vs “wait for long-term rates.” This tool gives a clear educational estimate of federal + optional state tax and your after-tax profit.

Short-term vs long-term capital gains

Short-term (typically held ≤ 1 year): taxed like ordinary income in the US — your marginal bracket matters. Long-term(typically held > 1 year): usually taxed at preferential 0% / 15% / 20% federal rates depending on taxable income and filing status.

Waiting a few weeks for long-term status can be worth thousands on a large gain — which is why holding-period math belongs next to price targets.

Capital gain formula

Gain = Sale proceeds − Cost basis

Cost basis is generally what you paid including commissions (adjusted for splits, reinvested dividends in some accounts, etc.). Sale proceeds are what you receive after sell-side fees. Tax ≈ gain × applicable rate(s) when the gain is positive. Example: $10,000 basis → $15,000 sale = $5,000 gain; at 15% LTCG ≈ $750 federal estimate before state/NIIT.

How to use this free capital gains calculator

  1. Enter cost basis and sale proceeds in USD.
  2. Choose short-term or long-term holding period.
  3. Short-term: enter other taxable income so the gain stacks into illustrative brackets. Long-term: pick 0%, 15%, or 20%.
  4. Add a flat state % if your state taxes capital gains.
  5. Compare after-tax profit to your pre-tax P&L from the stock profit calculator.

Planning tips (not advice)

  • Harvest losses carefully: Tax-loss harvesting can offset gains, but wash-sale rules exist.
  • Don't let the tax tail wag the dog: Holding a broken thesis just for a lower rate can cost more than the tax saved.
  • Know your lot method: FIFO vs specific identification changes which lots — and which gains — you realize. Reconstruct lots with the average cost calculator.

More detail: capital gains tax on stocks guide.

Frequently asked questions

Related free trading tools

Explore more free calculators and simulators on Swift Penguin: stock market simulator, live stock lookup, position size calculator, risk reward calculator, compound growth projector, dividend & DRIP calculator, options profit calculator, portfolio tracker, dollar cost averaging calculator, average cost calculator, stock profit calculator, and investment return calculator. Browse all free stock trading tools.

Not tax, legal, or investment advice. Brackets and rules change. Confirm with IRS publications, your brokerage 1099-B, and a qualified tax professional before filing or trading on tax assumptions.

Get a free share up to £100 — just sign up and deposit

Ready to put this into practice?

Trading 212 — Commission-free stocks & ETFs with fractional shares. Just sign up and deposit. Bonus shares are chosen at random and vary by region and campaign (UK/EU promos often land around £8–£25, with a max up to £100).

  • Zero-commission stock & ETF investing
  • Fractional shares from $1
  • Free share up to £100 after signup + deposit (random value; T&Cs apply)
Get your free share

Just sign up and deposit · random bonus up to £100 · capital at risk · T&Cs apply