📈 Capital Gains Tax Calculator

Selling an investment for a profit usually triggers tax on the gain. Enter your purchase and sale details plus your capital gains tax rate to see the gain, the tax, and what you keep.

What capital gains tax is

When you sell an investment — stocks, funds, property, crypto — for more than you paid, the profit is a capital gain, and most governments tax it. The tax applies only to the gain, not the whole sale amount: if you bought for $10,000 and sold for $18,000, only the $8,000 profit is taxed. Your original cost (including fees) is the "cost basis" that's subtracted first.

Short-term vs long-term matters a lot

Many tax systems reward patience. In the US, for example, assets held over a year qualify for lower "long-term" capital gains rates (often 0%, 15%, or 20% depending on income), while assets sold within a year are taxed as ordinary income at potentially much higher rates. That difference can be enormous — sometimes worth deliberately waiting past the one-year mark before selling. Because rates vary by country, holding period, and income, this calculator lets you enter your applicable rate.

Ways to legally reduce the tax

  • Hold longer where a lower long-term rate applies — patience is literally rewarded.
  • Use tax-advantaged accounts. Gains inside retirement accounts (401(k), IRA, ISA, and equivalents) are typically tax-deferred or tax-free — one of the biggest reasons to invest there first, per the order of operations.
  • Tax-loss harvesting. Selling a losing investment realizes a loss that can offset gains elsewhere, lowering your bill. This tool shows a loss when proceeds are below basis.
  • Spread sales across tax years to stay in a lower bracket, where applicable.

Important caveats

This is a simplified estimate. Real capital gains tax depends on your total income, filing status, holding period, local rules, allowances or exemptions, and sometimes a separate rate for different asset types. It doesn't account for tax-free allowances many countries provide. Treat the result as a planning guide, and consult a tax professional for a binding figure — but knowing the rough tax on a sale helps you decide whether and when to sell in the first place.

Frequently asked questions

How is capital gains tax calculated?

It's your tax rate applied to the gain — the sale proceeds minus your cost basis (what you paid including fees). Only the profit is taxed, not the entire sale amount.

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

Many systems tax assets held over a year at lower long-term rates and assets sold within a year at higher ordinary-income rates. Holding past the long-term threshold can significantly cut the tax.

How can I reduce capital gains tax?

Hold assets long enough to qualify for lower long-term rates, invest inside tax-advantaged accounts where gains are sheltered, offset gains with realized losses (tax-loss harvesting), and time sales across tax years where it keeps you in a lower bracket.

This calculator is for educational purposes only and does not constitute financial advice. Results are estimates based on the inputs and assumptions shown.