How to Calculate Capital Gains Tax

Capital gains tax applies to the profit from selling an investment or asset. Rates depend on how long you held the asset and your income level.

The Formula

Capital Gains Tax = (Selling Price - Purchase Price) x Tax Rate

Where:

TaxCapital Gains TaxTax owed on investment profit
SPSelling PricePrice at which asset was sold
PPPurchase PriceOriginal cost basis of asset
RateTax RateShort-term or long-term CG rate

Step-by-Step Example

Here's how to calculate capital gains tax step by step:

  1. 1Calculate gain: Subtract the purchase price (cost basis) from the selling price.
  2. 2Determine holding period: If held over one year it qualifies for lower long-term rates.
  3. 3Apply the rate: Multiply the gain by the applicable short-term or long-term tax rate.

Following these 3 steps gives you the final capital gains tax value.

Skip the Math

You buy stock for $10,000 and sell for $15,000 after two years. The $5,000 long-term gain at a 15% rate means $750 in capital gains tax.

Use the Free Calculator

Why You Need This Calculation

  • Understanding capital gains tax helps you time asset sales and minimize your tax liability.

Common Mistakes

Forgetting to include transaction fees in cost basis.

Add purchase commissions and fees to your cost basis.

Selling just before the one-year mark.

Holding an extra month can drop your rate from ordinary income to 0-20%.

Not using tax-loss harvesting.

Offset gains by selling losing investments in the same tax year.

Frequently Asked Questions