Long-term gains stack on top of your other taxable income. Whatever room is left below the zero-rate maximum for your filing status is gain you can realize at 0% federal income tax. This tool sizes that room, checks the separate wash-sale risk from other loss lots, then shows what still applies: NIIT, the MAGI-driven programs, and your state.
0% is a federal income-tax rate, not "free."
The harvested gain still raises MAGI, and MAGI drives four other tests on this site.
Updated ·Reviewed for 2026 tax year·IRS-sourced
How much capital gain can I realize at 0%?
For 2026, long-term gains are taxed at 0% while taxable income stays at or below $49,450 (single or married filing separately), $98,900 (married filing jointly or qualifying surviving spouse), or $66,200 (head of household). Long-term gains and qualified dividends stack on top of ordinary taxable income, so the 0% room equals that maximum minus ordinary taxable income minus long-term gains and qualified dividends already present. The gain is still net investment income for the 3.8% NIIT above $200,000 / $250,000 of MAGI, still counts toward ACA subsidies, IRMAA, and Social Security taxation, and is still taxed by most states.
2026 zero-rate maximum for married filing jointly: $98,900 of taxable income.
$
$
$
$
What else reads your MAGI
A 0% gain is still income to these programs.
What applies to a 0% gain, rule by rule
The income-tax rate is one line. Each card names the rule that still runs and the action it requires.
0% long-term rate
Available
$38,900
The 2026 zero-rate maximum for your status is $98,900 of taxable income. Ordinary taxable income of $60,000 and $0 of long-term gain and qualified dividends already present leave $38,900 of room. Long-term gain realized inside that room is taxed at 0% federal income tax; the dollar after it is taxed at 15%.
Action
Sell up to $38,900 of long-term gain before December 31, 2026. Specify the highest-basis lots last; the goal is to use the band, not to maximise the sale.
The wash-sale rule disallows LOSSES when substantially identical shares are bought within 30 days before or after a loss sale; it does not disallow this harvested gain. But a same-day repurchase can wash a separate loss on substantially identical shares sold in that 61-day window.
Action
Before rebuying, review every substantially identical loss lot sold from 30 days before through 30 days after the purchase. The new shares also restart their own one-year holding period.
The 0% band is a FEDERAL income-tax rate. Many states tax long-term gains without the federal preferential band, so confirm the treatment and rate in your state.
Taxable income, not AGI. Qualifying surviving spouse uses the joint amounts.
Filing status
2026: 0% up to
15% up to
20% above
Single
$49,450
$545,500
$545,500
Married filing jointly / QSS
$98,900
$613,700
$613,700
Married filing separately
$49,450
$306,850
$306,850
Head of household
$66,200
$579,600
$579,600
Why the answer is a MAGI number, not just a rate
A retired couple filing jointly with $30,000 of taxable income and $60,000 of appreciated stock has room for all of it in the 2026 0% band; a single filer with the same numbers has room for $19,450. The same sale raises MAGI by $60,000, which can end an ACA premium subsidy under the 400% FPL cliff (2026 and later), increase Medicare premiums two years later, and pull more Social Security into taxable income, which both shrinks the room and adds ordinary income tax. Run those three calculators with the post-harvest MAGI before you sell.
Common capital gain harvesting questions
What is capital gain harvesting?
Selling appreciated investments held more than one year on purpose, in a year when your taxable income leaves room in the 0% long-term capital gains band, so the gain is taxed at 0% federal income tax. The harvested gain itself is not a wash sale, but a repurchase can wash a separate loss on substantially identical shares sold within the 61-day window. Review loss lots before buying back.
How much gain can I realize at 0% in 2026?
The 2026 zero-rate maximum is $49,450 of taxable income for single and married filing separately, $98,900 for married filing jointly and qualifying surviving spouse, and $66,200 for head of household. Long-term gains and qualified dividends stack on top of your other taxable income, so the room in the band is the maximum minus your ordinary taxable income minus long-term gains and qualified dividends already present this year.
Is the 0% rate measured against AGI?
No — against taxable income, after the standard or itemized deduction. A married couple with $130,000 of wages and the $32,200 standard deduction has $97,800 of taxable income, which is under the $98,900 joint maximum, leaving $1,100 of 0% room, not none.
Is a 0% capital gain really tax-free?
The gain itself owes no federal income tax. If you receive Social Security, though, the gain can still raise your federal income tax: each $1 of gain can make up to 85 cents more of your benefits taxable, and that is taxed as ordinary income. It is not free of the 3.8% net investment income tax if your MAGI crosses $200,000 (single) or $250,000 (joint), and it raises MAGI for the ACA premium subsidy and Medicare IRMAA. Most states also tax the gain as ordinary income. The 0% is one line on the return, not the whole bill.
Do I have to wait 30 days to buy the stock back?
Not for the harvested gain itself: the wash-sale rule disallows a loss when you buy substantially identical securities within 30 days before or after a loss sale. But a same-day repurchase can wash a separate loss on substantially identical shares sold in that window, so review every loss lot before buying back.
Does harvesting a 0% gain affect my ACA subsidy or Medicare premiums?
Yes, because both use MAGI and the gain is in MAGI. For 2026 the ACA subsidy cliff at 400% of the federal poverty level is back, so a harvest that pushes household income over it can require repaying the year's subsidy. SSA generally uses MAGI from two years earlier for Medicare IRMAA, so a 2026 harvest can affect 2028 Part B and D premiums.
Disclaimer: This calculator provides estimates for educational purposes only. Not tax, legal, or financial advice. Results may vary based on your specific circumstances. Consult a qualified CPA or tax professional for personalized guidance.