Learn more
Enter what you paid, what you sold for, how long you held it and your other income to estimate the 2026 federal tax on your gain — and see how much holding for over a year can save.
Long-term tax = (gain in 0% zone × 0) + (gain in 15% zone × 15%) + (gain in 20% zone × 20%)
Short-term tax = Tax(other income + gain) − Tax(other income)
How to use the capital gains tax calculator
When you sell a stock, fund, cryptocurrency, rental property or other investment for more than you paid, the profit is a capital gain and is taxable. Enter your cost basis (the price you paid plus buying fees), the sale price after selling fees, and whether you owned it for more than one year. Then choose your filing status and enter your other taxable income for 2026 — that is your income after the standard or itemized deduction, not your gross salary.
The calculator shows the estimated federal tax on the gain, the effective rate, how much you keep, and what the tax would be under the other holding period so you can see the value of waiting.
2026 long-term capital gains rates
Gains on assets held more than one year get special rates of 0%, 15% or 20%, based on your total taxable income including the gain. The 2026 thresholds from IRS Revenue Procedure 2025-32 are:
| Filing status | 0% up to | 15% up to | 20% above |
|---|---|---|---|
| Single | $49,450 | $545,500 | $545,500 |
| Married filing jointly | $98,900 | $613,700 | $613,700 |
| Married filing separately | $49,450 | $306,850 | $306,850 |
| Head of household | $66,200 | $579,600 | $579,600 |
Gains on assets held one year or less are short-term and taxed at your ordinary income rates, from 10% up to 37% — the same as wages. You can see those brackets in our federal income tax calculator.
The 3.8% net investment income tax
Higher earners may also owe the 3.8% net investment income tax (NIIT) on the smaller of their investment income or the amount by which modified adjusted gross income (MAGI) exceeds $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). These thresholds are set by law and are not adjusted for inflation.
The formula
Long-term tax = (gain in 0% zone × 0) + (gain in 15% zone × 15%) + (gain in 20% zone × 20%)
Short-term tax = Tax(other income + gain) − Tax(other income)
Long-term gains are "stacked" on top of your ordinary taxable income. Your wages fill up the 0% zone first, so only the room left in that zone is available to your gain at 0%.
Worked example
A single filer has $40,000 of other taxable income and sells shares bought for $10,000 for $25,000, a gain of $15,000.
- Held more than a year: total taxable income becomes $55,000. The first $9,450 of the gain fills the 0% zone up to $49,450 and pays nothing; the remaining $5,550 is taxed at 15%, so the tax is $832.50 — an effective rate of 5.55% on the gain.
- Held a year or less: the first $10,400 of the gain is taxed at 12% ($1,248) and the remaining $4,600 at 22% ($1,012), for $2,260.
Waiting until the shares were held for more than one year would save $1,427.50. MAGI is roughly $71,100, well under $200,000, so no NIIT applies.
Ways to reduce capital gains tax
- Hold for more than a year. The holding period starts the day after you buy and includes the day you sell.
- Harvest losses. Losses offset gains, and up to $3,000 of net loss a year ($1,500 if married filing separately) can reduce ordinary income, with the rest carried forward. Avoid buying the same security within 30 days, or the wash-sale rule disallows the loss.
- Use the 0% bracket. In a low-income year, such as early retirement, you may be able to realise gains tax-free.
- Use tax-advantaged accounts. Trades inside a 401(k) or IRA are not taxed each year; see the Roth IRA calculator.
Common mistakes
Entering gross salary instead of taxable income overstates your bracket. Forgetting fees or reinvested dividends understates your basis, so you would pay tax twice on the same money. And the sale of your main home has its own exclusion of up to $250,000 ($500,000 joint) that this tool does not apply. To measure the investment's performance rather than its tax, try the ROI calculator.
This is a federal estimate only and not tax advice. Most states tax capital gains as ordinary income. Sources: IRS Revenue Procedure 2025-32; IRS Topic No. 409 (Capital gains and losses); IRS Topic No. 559 (Net investment income tax).
Cite or link to this page
Using this capital gains tax calculator in an article, report or homework? Copy a citation or a ready-made link:
Calcivia. (2026). Capital Gains Tax Calculator. Retrieved November 11, 2026, from https://www.calcivia.com/capital-gains-tax-calculator/"Capital Gains Tax Calculator." Calcivia, 2026, https://www.calcivia.com/capital-gains-tax-calculator/. Accessed 11 Nov. 2026.<a href="https://www.calcivia.com/capital-gains-tax-calculator/">Capital Gains Tax Calculator</a> by Calcivia