Free Capital Gains Tax Calculator
How it works
Enter what you paid per share, what you sold (or plan to sell) at, and how many shares. Pick whether the holding is short-term or long-term, set your tax rate, and see your gain or loss, the estimated tax owed, and what you actually keep after tax.
Capital Gains Tax Calculator
Estimate the tax on a stock or asset sale before you sell — gain, tax, and what you keep.
1 Your trade
2 Holding period and tax rate
3 See your tax estimate
📊 Your estimated capital gains tax
How the math works
The taxable gain is (sell price − buy price) × shares, and the tax is simply that gain multiplied by your rate — but only when the gain is positive: tax = max(gain, 0) × rate. Net proceeds are your sale proceeds (sell price × shares) minus the tax. A loss is never taxed; in the US it can instead offset other capital gains, plus up to $3,000 per year of ordinary income, with the rest carried forward — a strategy known as tax-loss harvesting. Just mind the wash-sale rule: buying back a substantially identical asset within 30 days can disallow the loss.
Everyday uses
- Before you sell: check the tax hit on a winning stock so the April bill never surprises you.
- Timing a sale: compare selling now at a short-term rate versus waiting until the holding turns long-term.
- Freelancers and active investors: size up quarterly estimated tax payments from your year-to-date trades.
Frequently asked questions
What counts as long-term? In the US, an asset held for more than one year before selling. Long-term gains get the lower preferential rates (0%, 15%, or 20% for most people); a year or less is short-term and taxed like regular income.
Do I owe tax if I sell at a loss? No. Losses owe no capital gains tax, and they can be used to offset gains elsewhere in your portfolio — and up to $3,000 a year of ordinary income — which is why investors harvest losses deliberately near year-end.
Does this include state tax or the 3.8% net investment income tax? Not automatically. High earners may also owe the 3.8% NIIT, and most states tax capital gains too. To approximate the full picture, add those percentages into the rate field before calculating.