CALCIDA

Capital Gains Tax Calculator

Written by Calcida Team
Reviewed by Financial Review Process
Last updated: April 2026

Calculations are rooted in standard financial formulas and are provided as educational estimates only. They do not constitute professional financial advice. Results may vary based on actual interest rates and fees. You should verify all numbers with a certified financial professional prior to making significant financial commitments. Read our editorial commitment

Estimate capital gains and potential tax owed when selling an investment at a profit.

Built specifically for investors estimating gains and taxes before selling, this engine analyzes Buy price, Sell price, Shares, Tax rate to output capital gain and estimated tax owed.

Estimated Capital Gains Tax

$375
Capital Gain$2,500
After-Tax Proceeds$7,125
Advertisement
Financial Insight Placement Zone

How This Calculator Works

This calculator estimates the federal capital gains tax on the sale of an investment asset. Enter your purchase price, sale price, how long you held the asset, and your income to see whether short-term or long-term rates apply and how much you may owe.

How Capital Gains Tax Is Calculated

  1. Gain = Sale Price − Cost Basis. Cost basis is what you paid, including commissions and improvements (for real estate).
  2. Holding period determines the rate. Over 1 year = long-term preferential rate. One year or less = short-term = ordinary income rate.
  3. Your income determines which long-term bracket applies (0%, 15%, or 20%).
  4. NIIT may apply if your MAGI exceeds the threshold, adding 3.8% to investment income.
  5. State capital gains taxes vary and are not included here (some states tax gains as ordinary income; a few have no capital gains tax at all).
Advertisement
Financial Insight Placement Zone

Formula

Gain = (Sell Price − Buy Price) × Shares; Tax = Gain × Tax Rate
Tax Rate
your estimated capital gains tax rate Description

Example Calculation

Example: Selling Stock with $50,000 Gain (2026)

Short-Term (held < 1 year)

  • Gain: $50,000
  • Income: $80,000
  • Rate: 22% (ordinary income)
  • Tax owed: ~$11,000
  • After-tax gain: ~$39,000

Long-Term (held > 1 year)

  • Gain: $50,000
  • Income: $80,000
  • Rate: 15% (long-term)
  • Tax owed: ~$7,500
  • After-tax gain: ~$42,500

*Waiting one extra year to qualify for long-term rates saves $3,500 on a $50,000 gain.

Advertisement
Financial Insight Placement Zone

Tax-Loss Harvesting: Your Most Powerful Tool

Tax-loss harvesting is the practice of selling investments at a loss to offset capital gains. It can reduce your 2026 tax bill with no change in your overall investment exposure (using similar but not identical replacement assets to avoid wash-sale rules).

  • Match losses to gains: Short-term losses offset short-term gains first (where rates are highest), then long-term gains.
  • Carry forward excess losses. After offsetting up to $3,000 in ordinary income, remaining losses carry forward indefinitely.
  • Avoid the wash-sale rule: You cannot repurchase the same or substantially identical security within 30 days before or after the sale.

Related Tax & Investment Tools

Advertisement
Financial Insight Placement Zone

Continue Your Analysis