Capital Gains Tax Calculator
Show the math
What Your Result Means
- Capital Gain / Loss: The difference between your sale price and purchase price. A positive number is a gain you may owe tax on; a negative number is a loss that can generally offset other gains.
- Tax Rate: The federal rate applied to your gain. Long-term gains (held one year or more) are taxed at 0%, 15%, or 20% depending on taxable income and filing status. Short-term gains are taxed at ordinary income rates — this calculator uses a 24% placeholder.
- Estimated Tax: The approximate federal tax on your gain. State taxes and the 3.8% Net Investment Income Tax are not included.
- Net Profit: Your gain minus the estimated federal tax — the amount you'd keep after the IRS takes its share, before state taxes.
How This Calculator Works
You enter the purchase price (cost basis), sale price (proceeds), holding period, and filing status. The tool subtracts cost basis from proceeds to get the capital gain, applies the appropriate federal tax rate based on holding period and filing status, and returns the estimated tax and net profit. It uses approximate 2026 long-term brackets and a flat 24% placeholder for short-term gains. The 3.8% NIIT surtax, state taxes, and basis adjustments are not modeled.
Quick Questions
What counts as long-term vs. short-term?
If you held the asset for more than one year (at least one year and one day), the gain is long-term and qualifies for lower rates. Anything held one year or less is short-term and taxed at your ordinary income rate.
Why does this show 24% for short-term gains?
Short-term gains are taxed at your ordinary income rate, which depends on your total taxable income. This calculator uses 24% as a mid-range placeholder — your actual rate could be higher or lower depending on your bracket.
What about the 3.8% Net Investment Income Tax?
High earners (above $200,000 single / $250,000 married) may owe an additional 3.8% NIIT on investment income. This calculator does not include it — add 3.8% to the shown rate if you're above those thresholds.
Can I offset gains with losses?
Yes. Capital losses offset capital gains dollar for dollar. If losses exceed gains, you can deduct up to $3,000 of net losses against ordinary income per year, carrying the rest forward to future years.
Does this include state capital gains tax?
No. Most states tax capital gains as ordinary income. California, for example, can add 9–13% on top. Check your state's rules and add that to the federal estimate shown here.
Sources
- IRS Topic No. 409 — Capital Gains and Losses (holding period rules, rate overview)
- IRS — Net Investment Income Tax (3.8% surtax thresholds)
- Investopedia — Capital Gains Tax (bracket tables and strategies)
Method & review
Estimate only. Results reflect your inputs and standard formulas — they are not financial, tax, legal, health, or investment advice. Verify important decisions with a qualified professional.