Capital Gains Tax Calculator
See after-tax profit on a stock sale. Long-term vs short-term rates applied automatically based on your holding period.
How the capital gains tax calculator works
Capital gain is simply proceeds − cost basis. If it's negative, you have a capital loss and no tax is owed on the sale (but the loss may offset other gains).
For positive gains, the calculator picks the applied tax rate based on holding period: long-term (366 days or more) gets your long-term rate, otherwise short-term uses your ordinary income rate. Tax owed = gain × applied rate.
Net gain = gain − tax owed. Net proceeds = cost basis + net gain. Effective rate is tax owed divided by gross gain — it equals the applied rate on a pure gain.
Frequently asked questions
- What's the difference between short-term and long-term capital gains?
- Short-term capital gains apply when you sell a stock held for one year or less. They're taxed at your ordinary income rate (10%–37% in the US, depending on bracket). Long-term gains apply when you held the stock longer than a year — they're taxed at the preferential 0%, 15%, or 20% rate.
- How does the calculator decide which rate to apply?
- The IRS rule is that you must hold an asset for more than one year to get the long-term rate. So if your holding period is 366 days or more, the calculator applies the long-term rate; 365 days or fewer applies the short-term rate.
- What rates should I enter?
- For the 2026 US long-term rates, the 0% bracket applies to taxable income under $49,450 (single) or $98,900 (married filing jointly); the 20% rate kicks in above $545,500 (single) or $613,700 (married filing jointly); the 15% rate covers everything in between. Short-term gains are taxed at your marginal ordinary-income rate (10%–37%). If unsure, 15% long-term and 24% short-term are reasonable middle-bracket defaults. Thresholds are inflation-adjusted yearly, so verify the current figures with the IRS.
- What about state tax?
- This calculator only computes federal capital gains tax. Most US states also tax capital gains (often at the ordinary-income rate), so your actual after-tax figure will be lower if you're in a taxing state. Add your state rate to the federal rate for a combined estimate.
- Can I deduct a capital loss?
- In the US, capital losses offset capital gains dollar-for-dollar, and up to $3,000 of net losses can offset ordinary income per year (excess carries forward). This calculator only shows the loss amount — it doesn't model the tax benefit of harvesting it. Consult a tax professional.
- Is this tax advice?
- No. Educational purposes only. Tax law is complex and changes frequently. Consult a CPA or tax attorney before relying on these numbers for filing or planning.
Related calculators
Stock Profit Calculator
Pre-tax gain or loss on a single buy and sell.
Dividend Calculator
Project portfolio growth with reinvested dividends.
Compound Interest Calculator
Future value with regular contributions.
Dollar-Cost Averaging Calculator
Regular fixed-amount investing over time.
Dividend Tax Calculator
Tax on dividends — separate from capital-gains tax.
Dividend Income Calculator
Income an investment produces at a given yield.