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 RateWhere:
TaxCapital Gains Tax — Tax owed on investment profitSPSelling Price — Price at which asset was soldPPPurchase Price — Original cost basis of assetRateTax Rate — Short-term or long-term CG rateStep-by-Step Example
Here's how to calculate capital gains tax step by step:
- 1Calculate gain: Subtract the purchase price (cost basis) from the selling price.
- 2Determine holding period: If held over one year it qualifies for lower long-term rates.
- 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 CalculatorWhy 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.