Sign in
FINANCE · TAX

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.

THE READ

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.

Long-term capital gains taxed at 0% federally in 2026, by filing status and wages
Filing statusWages entered in the calculator2026 standard deductionTaxable ordinary incomeLong-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
Illustration using the calculator's default assumptions, not a forecast. Wages means the calculator's W-2 wages input, entered before the standard deduction; the calculator subtracts the 2026 standard deduction ($16,100 single, $32,200 married filing jointly) to get taxable income. The 0% bracket ends at $49,450 of taxable income for single filers and $98,900 for joint filers, so the 0% room is that figure minus taxable ordinary income. Assumes wages are the only income (the calculator's sample interest and dividend amounts set to $0), the standard deduction, filers under 65 and no Social Security. On those assumptions the 0% room runs out at $65,550 of wages for single filers and $131,100 for joint filers. Federal only: the calculator also adds Virginia state tax, which taxes the whole gain as ordinary income and is left out of this table. Educational only, not tax advice.

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?▼
Long-term capital gains apply to assets held more than one year and are taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income. Short-term gains (assets held one year or less) are taxed as ordinary income at rates up to 37%, making them far less efficient.
How does the 0% capital gains bracket work?▼
Long-term gains stack on top of your ordinary income. If your total taxable income (ordinary income plus gains) stays under the 0% breakpoint — $49,450 for single filers and $98,900 for married-filing-jointly in 2026 — those gains are taxed at 0% federally. The calculator shows exactly how much room you have left in that bracket.
What tax cliffs should I watch when selling stock?▼
Beyond the 0→15→20% bracket steps, a large gain can trigger the 3.8% Net Investment Income Tax (above $200k/$250k MAGI), bump your Medicare IRMAA tier (raising premiums two years later), or push you over the 400% federal-poverty ACA subsidy cliff — which forfeits the entire premium tax credit. The Pro modules flag the headroom before each one.
How are capital gains taxed in Virginia?▼
Virginia has no preferential capital-gains rate — all gains are taxed as ordinary income at rates up to 5.75%. So even a gain that is federally tax-free in the 0% bracket still owes Virginia tax. The calculator includes Virginia state tax in every total.
What does “next-dollar marginal rate” mean on the results?▼
It is the tax rate that would apply to one more dollar of long-term gain beyond what you have already set on the slider. When it jumps — say from 0% to 15%, or when it turns orange — you have just crossed a bracket edge. Backing the slider off to that edge is how you find the most efficient sale size.
Where do qualified dividends fit in?▼
Qualified dividends are taxed at the same 0/15/20% rates as long-term gains and stack in the same place. The calculator asks for total ordinary dividends and then the portion that is qualified, so it can tax each piece correctly. Your brokerage’s year-end tax form splits them out for you.
How do I use the tool for tax-gain harvesting?▼
Enter your income for the year, then look at the “gains at 0% federal” headroom figure. Realizing exactly that much gain resets your cost basis higher at no federal cost. Click the headroom figure to set the slider there, and note that state tax may still apply.
Does it account for capital losses or carryforwards?▼
Not as a separate field. Net your losses against gains yourself and enter the result: a $30,000 gain with $10,000 of realized losses is a $20,000 gain on the slider. Remember that up to $3,000 of net loss per year can also offset ordinary income, which would lower the wages figure.
Why do I need to enter Social Security benefits?▼
Because the taxable share of Social Security depends on your other income, including capital gains. A large sale can make more of your benefit taxable, which raises the real cost of the gain. The calculator computes that interaction and shows the taxable portion in the full breakdown.

Related Financial Tools

NOT ADVICE

Educational model · not personalized advice · projected outcomes are uncertain.

Money Guy Mutants is an independent, fan-made project and is not affiliated with, endorsed by, or sponsored by The Money Guy Show or Abound Wealth Management, LLC. How we make money.