Capital Gains Tax Calculator (USA)
Calculate your 2026 federal capital gains tax on stocks, crypto, or real estate. Compare short-term (ordinary rates) vs long-term (0%, 15%, 20%) plus the 3.8% NIIT, with your after-tax gain.
- Data verified · July 2026
- Edited by Martín Rodríguez
- Formula verified by automated tests
- Private — runs on your device
See step-by-step calculation
See this calculation step by step
See period-by-period detail
How to use this calculator
Follow this tool’s steps, then review its formula, assumptions, and limits below.
Hold an asset for one year or less and the gain is short-term, taxed at your ordinary income rate (the same 10%–37% brackets as your salary). Hold it for more than a year and it becomes long-term, taxed at the preferential 0%, 15%, or 20% rates. Which long-term rate applies depends on where the gain stacks on top of your other taxable income — so the calculator layers the gain across the brackets exactly the way the IRS does.
Enter your filing status, your other taxable income, the purchase and sale prices, and whether the holding was short or long-term. The tool also adds the 3.8% Net Investment Income Tax (NIIT) for higher earners, so the after-tax number is realistic — not just the headline rate.
When to use this calculator
- Estimate the tax on selling stock you have held more than a year.
- Compare selling now (short-term) vs waiting past one year (long-term).
- Calculate crypto capital gains tax on a profitable trade.
- See whether your long-term gain falls in the 0%, 15%, or 20% band.
- Estimate the 3.8% Net Investment Income Tax on a large gain.
- Figure your after-tax proceeds before selling an investment property.
- Check how a low-income year could let you realize gains at the 0% rate.
- See how a big gain can push part of itself into the 20% bracket.
- Understand how a capital loss offsets gains and up to $3,000 of income.
- Plan tax-loss harvesting by pairing gains and losses in the same year.
2026 long-term capital gains breakpoints (taxable income)
| Rate | Single | Married filing jointly | Head of household | Married filing separately |
|---|---|---|---|---|
| 0% | $0 – $49,450 | $0 – $98,900 | $0 – $66,200 | $0 – $49,450 |
| 15% | $49,450 – $545,500 | $98,900 – $613,700 | $66,200 – $579,600 | $49,450 – $306,850 |
| 20% | above $545,500 | above $613,700 | above $579,600 | above $306,850 |
Source: IRS Rev. Proc. 2025-32. Add the 3.8% Net Investment Income Tax once modified AGI exceeds $200,000 (single) / $250,000 (married filing jointly). Short-term gains are taxed at ordinary rates instead.
How it works
Short-term vs long-term
Gain = Sale price − Cost basis − commissions/improvements
Short-term (≤ 1 year) → taxed at your ordinary rate (10%–37%)
Long-term (> 1 year) → taxed at 0% / 15% / 20% (stacked on your income)
High earners → + 3.8% Net Investment Income Tax (NIIT)The holding period is the single biggest factor. The same $50,000 profit can be taxed at 24% if you sell too early, or 15% if you wait past the one-year mark — a difference of thousands of dollars.
2026 long-term capital gains brackets (taxable income)
| Rate | Single | Married filing jointly | Head of household |
|---|---|---|---|
| 0% | up to $49,450 | up to $98,900 | up to $66,200 |
| 15% | $49,450 – $545,500 | $98,900 – $613,700 | $66,200 – $579,600 |
| 20% | above $545,500 | above $613,700 | above $579,600 |
The gain is stacked on top of your ordinary taxable income, so a large gain can straddle two rate bands.
Worked example — sell now vs wait
You have a $30,000 profit and $90,000 of other taxable income (single).
The 3.8% Net Investment Income Tax
| Filing status | NIIT applies once income exceeds |
|---|---|
| Single / Head of household | $200,000 |
| Married filing jointly | $250,000 |
| Married filing separately | $125,000 |
The NIIT adds 3.8% on the smaller of your net investment income or the amount your income exceeds the threshold — on top of the regular capital gains rate.
Capital losses
If you sell for less than your basis, you have a capital loss. Losses first offset capital gains; if losses exceed gains, you can deduct up to $3,000 against ordinary income per year and carry the rest forward to future years.
What this does not cover
This calculator estimates federal tax only. It does not model state capital gains tax (many states tax gains as ordinary income), the Section 121 home-sale exclusion ($250,000 single / $500,000 married on a primary residence), depreciation recapture on rental property (taxed up to 25%), collectibles (up to 28%), or qualified small business stock. Your basis should reflect reinvested dividends and adjustments.
Disclaimer
Educational estimate of federal capital gains tax, not tax advice. 2026 thresholds are from IRS Rev. Proc. 2025-32. Consult a tax professional and the IRS before making investment or filing decisions.
Example: $50,000 long-term gain, $40,000 other income, single
Frequently asked questions
What is the difference between short-term and long-term capital gains?
What are the 2026 long-term capital gains rates?
How do I calculate my capital gain?
What is the Net Investment Income Tax (NIIT)?
Can I pay 0% on capital gains?
Are crypto gains taxed the same way?
What if I sell my house?
Does this include state taxes?
Sources & references
Methodology & trust
Finance calculator with its formula verified automatically against IRS — Topic no. 409, Capital gains and losses, per our editorial policy and methodology.
Updated: July 2026. Parameters are verified periodically against the cited sources.
Calculations run 100% in your browser. We do not store or transmit your data.
Indicative results. For critical decisions, consult a professional.
Rodríguez, M. (2026). Capital Gains Tax Calculator (USA). Hacé Cuentas. https://hacecuentas.com/en/capital-gains-tax-calculator-usa
Content licensed under CC-BY 4.0 — reuse it citing the source with a link to Hacé Cuentas.