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.
For educational purposes only. Federal tax only — state tax not modeled. Consult a CPA before filing or planning with these numbers.
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?
- If your holding period is 366 days or more, the calculator applies the long-term rate. Less than that, it applies the short-term rate. The exact 365-day boundary is a strict reading of the IRS "more than one year" rule (the purchase date doesn't count toward the holding period, so 365 days held = exactly one year = short-term).
- What rates should I enter?
- For 2026 US long-term rates: 0% (under $48,350 single / $96,700 married filing jointly), 15% (middle bracket), or 20% (over $533,400 single / $600,050 married). Short-term equals your marginal ordinary-income rate. If unsure, 15% long-term and 24% short-term are reasonable defaults.
- 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.