Capital gains tax calculator (2026).
If you sell this much stock, what actually happens? Models the 0/15/20% long-term brackets and NIIT for tax year 2026, with Virginia state tax. QBI, ACA and IRMAA cliffs are in Pro.
Most of a gain can be tax-free if it fits under the 0% bracket. You just saw exactly how much room you have — and where the next cliff sits.
About the Capital Gains Tax Calculator
The Capital Gains Tax Calculator answers a single question: if you sell this much stock, what actually happens? The free version applies the 2026 0%, 15% and 20% long-term capital gains brackets, includes the 3.8% Net Investment Income Tax and Virginia state tax in every total, and shows how much gain still fits in the 0% bracket. Long-term gains stack on top of your ordinary income, so that room depends on everything else you earn. Pro adds the QBI deduction, ACA premium-tax-credit cliff and Medicare IRMAA modules.
How this capital gains tax calculator figures the bill.
A capital gains tax calculator has to stack income in the right order. Ordinary income — wages, business profit, interest, short-term gains — fills the ordinary brackets first. Long-term gains and qualified dividends then sit on top of that stack and are taxed at 0%, 15% or 20% depending on where the total lands. The calculator uses current-year thresholds for each step, so you never have to look them up, and it recomputes every layer from adjusted gross income down to the final bill each time you move the slider.
That stacking is why the same $20,000 gain can cost nothing for one household and $3,000 for another with higher wages. It also produces the most useful number on the page: headroom, the amount of gain you can still realize before the next dollar is taxed at a higher rate. The 0% headroom is the slice worth harvesting in a low-income year, such as a gap between jobs or early retirement, because it resets your cost basis upward without a federal bill. The tool lets you set the slider to that exact figure.
Long-term gains you can take at 0% in 2026.
Long-term gains stack on top of your other taxable income, and only the part that lands below the top of the 0% bracket is free of federal tax. The table shows that room at a few wage levels, using the calculator's 2026 federal figures.
| Filing status | Wages entered in the calculator | 2026 standard deduction | Taxable ordinary income | Long-term gain taxed at 0% |
|---|---|---|---|---|
| Single | $30,000 | $16,100 | $13,900 | $35,550 |
| Single | $50,000 | $16,100 | $33,900 | $15,550 |
| Single | $75,000 | $16,100 | $58,900 | $0 |
| Married filing jointly | $60,000 | $32,200 | $27,800 | $71,100 |
| Married filing jointly | $90,000 | $32,200 | $57,800 | $41,100 |
| Married filing jointly | $120,000 | $32,200 | $87,800 | $11,100 |
Short term vs long term capital gains.
The holding period is a bright line. Sell an asset you have held one year or less and the gain is short-term, taxed as ordinary income at your regular bracket. Hold it more than a year and it becomes long-term, eligible for the lower 0/15/20% rates. On a $20,000 gain, that can be the difference between $4,800 at a 24% ordinary rate and $3,000 at 15% — or between $6,400 at 32% and $3,000. The rate on the long-term side depends on your total taxable income, not on the size of the gain alone.
The calculator keeps the two separate: short-term gains go in with your ordinary income, and the slider is for long-term gains only. That lets you see both effects at once — short-term gains raise the base your long-term gains stack on, pushing them toward the 15% and 20% steps. If you are a few weeks short of the one-year mark, the tool makes the cost of selling early explicit, and waiting is often the highest-return move available, provided the position is not so concentrated that the risk of holding outweighs the tax.
The other layers: NIIT and state tax.
Above an income threshold, the 3.8% net investment income tax applies on top of the capital gains rate, turning the 15% bracket into 18.8% and the 20% bracket into 23.8%. On the same $20,000 gain that is another $760. The threshold is not indexed for inflation, so more households cross it each year. The free calculator includes NIIT in every total; the NIIT headroom view, the qualified business income deduction and the ACA and Medicare premium cliffs are in the Pro tier.
State tax is the other layer people forget. Most states tax capital gains as ordinary income with no preferential rate, so a gain that is federally tax-free in the 0% bracket can still owe state tax on the full amount. The calculator currently models Virginia in every total and shows it as its own line in the breakdown; if you live elsewhere, treat that line as a placeholder and substitute your own state’s rate. A handful of states have no income tax at all, and the difference on a large gain is not small.
- Ordinary income fills the brackets first; long-term gains stack on top
- Long-term rate steps: 0%, then 15%, then 20%, by total taxable income
- 3.8% NIIT above a fixed income threshold (in every total; headroom view is Pro)
- State tax, usually at ordinary rates, on the full gain
Frequently Asked Questions
What is the difference between long-term and short-term capital gains?▼
How does the 0% capital gains bracket work?▼
What tax cliffs should I watch when selling stock?▼
How are capital gains taxed in Virginia?▼
What does “next-dollar marginal rate” mean on the results?▼
Where do qualified dividends fit in?▼
How do I use the tool for tax-gain harvesting?▼
Does it account for capital losses or carryforwards?▼
Why do I need to enter Social Security benefits?▼
Related Financial Tools
S-Corp Tax Savings Calculator
Calculate S-Corp tax savings and find your ideal salary/distribution split to minimize self-employment tax.
Try it freeRoth Conversion and Withdrawal Calculator
Models retirement withdrawals from taxable, traditional and Roth accounts with RMDs, a year-by-year Roth conversion plan and a crash stress test; bracket-filling auto conversions are Pro.
Try it freeNet Worth Calculator
Track your net worth, assets, and liabilities with liquidity analysis and momentum tracking.
Try it free