Investing
Tax-Gain Harvesting Calculator
The 0% long-term capital-gains bracket is one of the tax code's quiet gifts. In a low-income year — early retirement, a gap year, a sabbatical — you can realize gains that fall inside it, pay nothing, and immediately rebuy to reset your cost basis higher for free.
After deductions — wages, interest, and other ordinary income, before capital gains.
2026 figure — about $49,450 single, $98,900 married filing jointly. Confirm the current amount.
Gains you can harvest tax-free
$9,450
This much fits in the 0% bracket; the rest would be taxed.
The gains stack on top of your ordinary income, so realizing them can push part above the threshold — only the portion that stays under the top of the 0% bracket is tax-free. Also check that realizing gains does not raise ACA subsidy or IRMAA thresholds, which key off total income.
- Room in the 0% bracket
- $9,450
- Gains that would be taxed
- $10,550
- Tax saved versus selling later
- $1,418
At the rate you would otherwise pay.
How this calculator works
The room in the 0% bracket is its top minus your ordinary taxable income. Long-term gains stack on top of that income, so the amount that fits inside the room is harvested tax-free and the rest is taxed. The saving is the tax-free amount times the rate you would otherwise pay when eventually selling.
The 0% bracket top is an input because it changes yearly and doubles for joint filers — enter the current figure. Ordinary taxable income should already be net of deductions. State capital-gains tax, and the secondary effects on ACA subsidies, Social Security taxation, and Medicare IRMAA, are not modelled and can matter more than the federal gain tax itself.
Try an example
Frequently asked questions
What is tax-gain harvesting?
Deliberately selling appreciated investments held over a year while your income is low enough that the gains fall in the 0% long-term capital-gains bracket. You pay no tax, then rebuy immediately to reset your cost basis higher — so a future sale has a smaller taxable gain. It is the mirror image of loss harvesting.
Who is the 0% capital-gains bracket for?
Anyone with low taxable income in a given year: early retirees before pensions and Social Security start, people between jobs, students, or those taking a sabbatical. Long-term gains that keep total taxable income under the threshold are taxed at 0% federally — a genuine zero, not a deferral.
Is there a wash-sale problem like with losses?
No. The wash-sale rule only disallows losses, so you can sell for a gain and rebuy the same security immediately with no waiting period. That is what makes gain harvesting so clean — you never have to leave the market or change your holdings.
How do gains interact with my ordinary income?
Long-term gains stack on top of ordinary income when deciding which bracket they fall in. If your ordinary income is $40,000 and the 0% bracket tops out at $49,450, only about $9,450 of gains fit tax-free; gains beyond that are taxed at 15%. The room shrinks as your other income rises.
What should I watch out for?
Realizing gains raises your total income, which can reduce ACA health-insurance subsidies, increase the taxable portion of Social Security, or trigger Medicare IRMAA surcharges two years later. The federal tax on the gain may be zero while these secondary effects cost real money — check them before harvesting.
Related calculators
Capital Gains Tax Calculator
Estimate the tax on an investment sale and what you keep — and compare the long-term rate against the far higher one that applies if you sell too soon.
Tax-Loss Harvesting Calculator
See how selling investments at a loss can offset gains and up to $3,000 of ordinary income, with the tax saved this year and any loss carried forward.
Roth Conversion Calculator
Pay tax now to make an IRA tax-free later? Compare converting to a Roth against leaving the money traditional, including where the tax bill comes from.
FIRE Calculator
Find your FIRE number — the nest egg for financial independence — using the 4% rule, and see how many years of saving stand between you and early retirement.
Disclaimer: DayCents provides this calculator for educational purposes only. Results are estimates based on your inputs and the stated assumptions — they are not financial advice, a quote, or an offer of credit. Consult a qualified financial professional before making major money decisions.