Capital Gains Tax Calculator

Estimate your federal capital gains tax based on your taxable income, filing status, and how long you held the asset.

Formulas Used

Capital Gain = Sale Price − (Purchase Price + Additional Cost Basis)

Short-Term Tax = Tax(Ordinary Income + Capital Gain) − Tax(Ordinary Income)
using 2024 federal marginal income tax brackets (10%–37%).

Long-Term Tax = Capital gain stacked on top of ordinary income and taxed at:
0% — up to the 0% threshold
15% — between the 0% and 15% thresholds
20% — above the 15% threshold

Net Proceeds = Sale Price − Total Cost Basis − Tax Owed

Assumptions & References

  • Uses 2024 IRS tax brackets and long-term capital gains thresholds (Rev. Proc. 2023-34).
  • Long-term rates apply to assets held more than one year; short-term rates apply to assets held one year or less.
  • The calculator estimates federal tax only; state capital gains taxes are not included.
  • The Net Investment Income Tax (NIIT) of 3.8% (for high earners above $200K single / $250K MFJ) is not included.
  • Capital losses can offset capital gains dollar-for-dollar; up to $3,000 of net capital loss may be deducted against ordinary income per year, with the remainder carried forward.
  • Does not account for depreciation recapture, AMT, or state/local taxes.
  • References: IRS Topic No. 409 – Capital Gains and Losses.

In the network