Tax100% FreeNo Sign-UpNo Tracking

Capital Gains Tax Calculator

Estimate tax on the sale of an investment.

Capital Gains Tax Calculator Runs locally
Enter your values and press Calculate.

All calculations happen locally in your browser — nothing is uploaded, stored or tracked.

STEP 01

Enter cost basis and sale price

What you paid and what you sold for.

STEP 02

Choose short or long term

Determines the rate class you select.

STEP 03

Enter the rate

And any capital loss carryover.

What Is Capital Gains Tax?

Capital gains tax applies to the profit when you sell an asset — stocks, property, crypto — for more than you paid. The gain is the sale price minus your cost basis (what you paid, plus certain adjustments).

Holding period matters: in the US, assets held over a year qualify for long-term rates (typically 0/15/20%), while short-term gains are taxed at ordinary income rates. Because rates change and vary by jurisdiction, you enter the applicable rate.

The Formulas

Gain = sale price − cost basis
Tax = taxable gain × rate
Net proceeds = sale price − tax

A capital loss can offset gains (and up to $3,000 of ordinary income per year in the US) — an optional loss field is included.

Your data never leaves your device.

Every calculation on this site runs in your browser using vanilla JavaScript. Nothing is uploaded, stored or tracked.

  • 100% local, client-side calculations
  • No data stored on any server
  • No tracking, no analytics, no ads scripts
  • Works offline once loaded

Frequently Asked Questions

How is capital gains tax calculated?

Gain = sale price − cost basis. Tax = gain × your applicable rate. The calculator applies it and shows net proceeds.

What is the difference between short- and long-term gains?

In the US, holding over one year qualifies for lower long-term rates (0/15/20%); under one year is taxed as ordinary income.

What tax rate should I enter?

Your applicable rate for the asset and holding period — it varies by jurisdiction, income and year.

Can losses reduce my tax?

Yes — capital losses offset gains first, then up to $3,000 of ordinary income per year in the US. The calculator includes a loss field.

Does this include property-specific rules?

No — real estate has extra rules (primary residence exclusion, depreciation recapture). This is a general estimate.