calculator capital gains

Capital Gains Tax Calculator

Estimate capital gains, federal tax, state tax, and after-tax proceeds for stocks, crypto, real estate, or other assets.

For long-term gains, this tool uses bracket stacking logic with common federal thresholds. Results are estimates, not tax advice.

How to use this capital gains calculator

This calculator helps you estimate the tax impact when you sell an investment. Enter your original purchase amount, any improvement or transaction costs, and your sale details. The tool then calculates your cost basis, gain or loss, and estimated taxes.

  • Cost basis = purchase price + purchase fees + capital improvements
  • Net proceeds = sale price - selling fees
  • Capital gain/loss = net proceeds - cost basis

Short-term vs. long-term capital gains

The holding period changes your federal tax rate:

Short-term gains (1 year or less)

Short-term gains are generally taxed at your ordinary income tax rate. In this calculator, you can enter your own estimated marginal rate.

Long-term gains (more than 1 year)

Long-term gains typically receive preferential federal rates (0%, 15%, or 20%). The calculator estimates this by stacking your gain on top of your other taxable income.

What counts toward basis and selling costs?

Many people overpay tax because they forget to include valid adjustments:

  • Broker commissions and transaction fees
  • Closing costs that are basis-adjusting (for real estate)
  • Qualified capital improvements that increase value or extend useful life
  • Selling expenses, including commissions and transfer fees

Good records matter. Keeping receipts and statements can significantly reduce taxable gain.

Example scenario

Suppose you bought an asset for $50,000, spent $2,000 in fees and improvements, and later sold it for $85,000 with $1,500 in selling costs. Your economic gain is not simply $35,000; costs change the taxable number. This calculator automatically adjusts for that so you can compare before-tax and after-tax outcomes.

How to lower capital gains tax legally

  • Hold longer: qualifying for long-term rates can reduce federal tax substantially.
  • Tax-loss harvesting: offset gains with realized losses where appropriate.
  • Time your sale: selling in lower-income years can reduce your effective rate.
  • Use tax-advantaged accounts: retirement accounts may defer or avoid immediate gain taxation.
  • Track basis carefully: every valid basis adjustment may reduce taxable gain.

Frequently asked questions

Does this include depreciation recapture or special real estate rules?

No. This calculator is a general estimator and does not include every special rule such as Section 1250 recapture, primary home exclusion details, or wash sale interactions.

Does it include state tax?

Yes. You can enter an estimated state capital gains tax rate manually, which is applied to positive gains.

Can I use this for crypto and stocks?

Yes. The math is useful for most assets where you have a purchase basis and a sale value.

Disclaimer: This page is educational and for quick estimates only. Tax law is complex and changes over time. Consult a qualified tax professional for filing decisions.

🔗 Related Calculators

🔗 Related Calculators