What is the capital gains tax calculator?
In short
Capital gains tax is owed when you sell an asset for more than you paid. Short-term gains (assets held one year or less) are taxed as ordinary income at rates up to 37%. Long-term gains (held more than one year) are taxed at 0%, 15%, or 20% depending on your taxable income. Most states also tax capital gains as regular income.
This calculator estimates your federal and state capital gains tax on the sale of stocks, real estate, or other investments. Enter your cost basis, sale price, and holding period to see the tax owed under short-term or long-term rates, plus your net after-tax proceeds.
How to use this calculator
- 1Enter the original purchase price (cost basis) of the asset.
- 2Enter the sale price you received or expect to receive.
- 3Select the holding period — short-term (≤1 year) or long-term (>1 year).
- 4Enter your filing status and estimated taxable income for the year.
- 5Select your state to include state capital gains tax in the estimate.
The formula
- Gain
- — Sale price minus cost basis
- Rate
- — Applicable capital gains tax rate
- Tax
- — Gain × Rate
- Net proceeds
- — Sale price − Tax owed
Worked example
The scenario
You bought stock for $20,000 and sold it two years later for $35,000. You're a single filer with $80,000 taxable income.
The result
Your long-term gain is $15,000. At the 15% federal long-term rate and a 5% state rate, you owe approximately $2,250 federal + $750 state = $3,000 total, netting $32,000 after tax.
Common use cases
- Estimating taxes before selling appreciated stock or ETFs
- Planning the timing of an asset sale to qualify for long-term rates
- Comparing the after-tax return of holding vs. selling now
- Evaluating tax-loss harvesting opportunities to offset gains
- Projecting net proceeds from the sale of investment real estate
Limitations & assumptions
- Does not account for the Net Investment Income Tax (3.8% surtax on high earners).
- Depreciation recapture on real estate is taxed at a flat 25% and is not included.
- State rates are approximate and may not reflect all local taxes or exemptions.
- Does not factor in carryover losses or other complex tax situations.
Frequently asked questions
Disclaimer: KalkWise calculators are provided for general informational and educational purposes only and do not constitute financial, investment, tax, or legal advice. Results are estimates based on the figures you enter and the assumptions described above. Actual outcomes will vary. Consult a qualified professional before making financial decisions.