Capital Gains Tax Calculator

Calculate capital gains and estimated taxes on your investments

Transaction Details

$
$
$

Hold for Lower Taxes

Assets held > 1 year qualify for long-term capital gains rates (0%, 15%, or 20%), much lower than short-term (ordinary income rates).

Tax-Loss Harvesting

Offset capital gains by selling losing investments. Losses can reduce your tax bill or carry forward to future years.

AI Financial Insights

Get personalized recommendations powered by AI

Embed this Calculator

Want to use this calculator on your own website? Copy and paste the code below.

<iframe src="https://allprocalculator.com/embed/capital-gains" width="100%" height="600" frameborder="0" style="border:1px solid #e2e8f0; border-radius:12px;"></iframe>
Mobile Responsive
AI Insights Not Included in Embed

Capital Gains Tax Calculator – Maximize Your Investment Returns

Capital gains are the profits you make when selling an investment for more than you paid. Understanding how capital gains taxes work can save you thousands and significantly impact your investment returns.

What Are Capital Gains?

Capital gains occur when you sell an asset (stock, real estate, cryptocurrency, etc.) for more than you originally paid. The difference between your purchase price (cost basis) and sale price is your capital gain.

Formula:

Capital Gain = Sale Price - (Purchase Price + Expenses)

Expenses include brokerage fees, commissions, improvement costs (for real estate), and other transaction costs that increase your cost basis.

Short-term vs Long-term Capital Gains

Short-term Capital Gains

  • Definition: Assets held for 1 year or less
  • Tax Rate: Taxed as ordinary income (10% to 37%)
  • Example: Buy stock in January 2024, sell in December 2024

Long-term Capital Gains

  • Definition: Assets held for more than 1 year
  • Tax Rate: 0%, 15%, or 20% depending on income
  • Example: Buy stock in January 2023, sell in March 2024

The Holding Period Matters!

Selling just a few days earlier or later can change your tax rate dramatically. Holding for 366 days instead of 364 days could save 15-20% in taxes!

2024 Long-term Capital Gains Tax Rates

Single Filers:

  • 0% rate: Income up to $44,625
  • 15% rate: Income $44,626 to $492,300
  • 20% rate: Income over $492,300

Married Filing Jointly:

  • 0% rate: Income up to $89,250
  • 15% rate: Income $89,251 to $553,850
  • 20% rate: Income over $553,850

Pro Tip: If your income is near a threshold, timing sales strategically can keep you in a lower bracket.

Capital Gains by Asset Type

Stocks & ETFs

Standard capital gains rules apply. Hold > 1 year for long-term rates. Qualified dividends also get favorable rates.

Real Estate

  • Primary residence: $250k exclusion ($500k married) if lived 2 of last 5 years
  • Investment property: Standard capital gains + recapture of depreciation at 25%
  • 1031 exchange: Defer taxes by reinvesting in similar property

Cryptocurrency

Treated like stocks. Every crypto-to-crypto trade is taxable. Holding > 1 year gets long-term rates.

Collectibles

Art, antiques, precious metals face 28% maximum long-term rate (higher than regular assets).

Tax-Loss Harvesting Strategy

What Is It?

Deliberately selling investments at a loss to offset capital gains and reduce tax liability.

How It Works:

  1. You have $20,000 in capital gains from stock A
  2. You sell losing stock B for $8,000 loss
  3. Net taxable gain: $20,000 - $8,000 = $12,000
  4. If you're in 15% bracket, you save $1,200 in taxes

Key Rules:

  • Wash Sale Rule: Can't buy substantially identical security within 30 days
  • $3,000 Limit: Excess losses can offset up to $3,000 of ordinary income yearly
  • Carry Forward: Remaining losses carry forward to future years

How to Minimize Capital Gains Tax

1. Hold Assets Over 1 Year

The single most effective strategy. Reduces tax rate from potentially 37% to maximum 20%.

2. Utilize Tax-Advantaged Accounts

  • 401(k) / IRA: No capital gains tax until withdrawal
  • Roth IRA: No capital gains tax ever (tax-free growth!)
  • HSA: Triple tax advantage including no capital gains tax

3. Harvest Tax Losses

Review portfolio annually and sell losers to offset winners.

4. Gift Appreciated Assets

Give to charity directly (avoid capital gains) or to family members in lower brackets.

5. Time Sales Strategically

  • Spread sales across tax years
  • Sell in years with lower income
  • Sell after retirement when income drops

Common Capital Gains Mistakes

1. Selling Too Soon

Selling at 11 months vs 13 months can double your tax bill. Be patient for long-term rates.

2. Not Tracking Cost Basis

Poor record-keeping leads to paying more tax. Track purchase price, dates, and all expenses.

3. Ignoring Wash Sale Rules

Selling for tax loss, then immediately rebuying disqualifies the loss. Wait 31 days.

4. Forgetting About State Taxes

Most states also tax capital gains. Factor this into planning.

5. Not Offsetting Gains with Losses

Many investors sit on losing positions. Selling strategically can save thousands in taxes.

Real Estate Capital Gains

Primary Residence Exclusion

If you've lived in your home 2 of the last 5 years:

  • Single: Exclude up to $250,000 in gains
  • Married: Exclude up to $500,000 in gains

Example:

Bought house for $300,000, sold for $650,000. Capital gain = $350,000. If married and qualify for exclusion, no tax on full $350,000!

Investment Property

  • Pay capital gains on appreciation
  • Pay 25% depreciation recapture tax on claimed depreciation
  • Consider 1031 exchange to defer taxes

Cryptocurrency Capital Gains

Taxable Events:

  • Selling crypto for cash
  • Trading one crypto for another (e.g., Bitcoin to Ethereum)
  • Using crypto to buy goods/services

Not Taxable:

  • Buying crypto with cash
  • Transferring between your own wallets
  • Receiving crypto as a gift (recipient pays no tax)

Record-Keeping Is Critical:

Track every transaction with date, amount, value in USD. Use crypto tax software to calculate gains accurately.

Frequently Asked Questions

Do I pay capital gains if I reinvest?

Yes, except in specific cases (1031 exchange for real estate, or sales within tax-advantaged accounts). Regular brokerage accounts are taxable even if you reinvest.

Can capital losses reduce my ordinary income?

Yes, but only up to $3,000 per year. Excess losses carry forward to future years.

What if I inherited stock?

You get “step-up in basis” to fair market value at date of death. This eliminates all previous capital gains.

Are there any zero-tax strategies?

Yes! If your income is low enough (under $44,625 single, $89,250 married), long-term capital gains are taxed at 0%.

Do I need to report every stock sale?

Yes. All sales must be reported on Form 8949 and Schedule D, even if no gain or if you have losses.

Can I deduct investment losses?

Yes, against capital gains first, then up to $3,000 against ordinary income. Remaining losses carry forward indefinitely.

Calculate Your Capital Gains Now

Use AllProCalculator's Capital Gains Calculator to estimate your tax liability before selling. Enter purchase price, sale price, dates, and expenses to see both short-term and long-term tax implications. Get AI-powered suggestions on timing and tax optimization strategies.

Smart investors plan for taxes before selling. Calculate, strategize, and keep more of your gains!