How tax-gain harvesting works
Long-term capital gains and qualified dividends are taxed on a separate 0%, 15% and 20% schedule, but they share one income stack with everything else. Ordinary income such as wages, pensions and IRA withdrawals fills the stack first, after deductions, and gains sit on top. Gains that land below the 0% ceiling are taxed at 0%; only the part above it moves up to 15%.
Gain harvesting uses that empty room on purpose. You sell shares held more than a year, which makes the gain long-term, and usually buy the same shares back right away, which the wash sale rule allows because it blocks only losses. The portfolio looks the same afterward, but the new shares carry a cost basis equal to what you just paid, so a later sale has less gain left to tax. They also start a fresh holding period. If you own several lots, identifying the specific ones you sell, as IRS Publication 550 allows, controls exactly how much gain each sale realizes.
How much gain fits in the 0% bracket in 2026
For 2026 the 0% rate applies to long-term gains while taxable income is at or below $49,450 for single filers and married people filing separately, $66,200 for heads of household, and $98,900 for married couples filing jointly. Because the ceilings are measured after deductions, the income you can have is higher. The table below adds the 2026 deductions to each ceiling: a married couple under 65 living only on long-term gains and qualified dividends could realize $131,100 with no federal income tax. At 65 or older, the extra standard deduction and the 2025–2028 senior deduction add room, though the senior deduction shrinks by 6% of MAGI above $75,000, or $150,000 for joint filers.
Above the 0% ceiling the rate is 15% up to $545,500 of taxable income for single filers or $613,700 for joint filers, then 20%. The 3.8% net investment income tax starts once MAGI passes $200,000 single or $250,000 joint, thresholds not indexed for inflation. That gap is why some investors harvest inside the 15% band when they expect to face 20% plus 3.8% later.
Gain harvesting vs. Roth conversions and loss harvesting
Gain harvesting competes with a Roth conversion for the same low-income years. Converted dollars are ordinary income, and ordinary income sits beneath capital gains in the stack, so every dollar converted removes a dollar of 0% gains room. In the example below, a $30,000 conversion would cut the couple’s 0% harvest from $61,100 to $31,100. Which to favor depends on the rates involved: a conversion avoids tax on decades of future growth and shrinks later required distributions, while a harvest saves only the capital gains tax a later sale would have owed.
Tax-loss harvesting is the mirror image for high-income years. Doing both in the same year rarely makes sense, because a harvested loss would cancel the harvested gain. The same goes for a capital loss carryover from earlier years: it must be used against this year’s gains, so a household with a large carryover gets little from harvesting at 0% until the carryover is gone.
Who it suits, and when to skip it
Gain harvesting fits people who hold appreciated investments in a taxable account and face a stretch of low taxable income: early retirees living on savings before Social Security and required distributions begin, people between jobs or on a career break, and retirees whose income stays modest. It is also a clean way to rebalance, or to diversify out of one large holding, without a federal tax bill.
It adds little in three cases. If you expect to hold the shares until death, a step-up in basis erases the gain for your heirs anyway. If you plan to give the shares to charity, donating them directly avoids the gain. And if you will stay in the 0% band for life, later sales would be tax-free too, so harvesting saves nothing federally and may only pay state tax sooner.
Illustrative numbers
Filling the 0% band in 2026: a married couple, both age 60
- 0% ceiling
- Top of the 0% long-term gains band for 2026: $49,450 single or separate, $66,200 head of household, $98,900 joint
- Taxable income before the harvest
- Taxable income after deductions, including ordinary income, qualified dividends and gains already realized this year
Gains above the room are taxed at 15% only on the excess, but the added income can still change credits, benefits and state tax.
Pension and IRA withdrawals (no Social Security yet)$70,000
Minus the 2026 joint standard deduction$32,200
Ordinary taxable income$37,800
0% ceiling for joint filers in 2026$98,900
Long-term gain harvested at 0%$61,100
Federal income tax on the harvest$0
The couple sells fund shares carrying $61,100 of long-term gain and buys them straight back, raising their basis by $61,100 at no federal income tax. Realized later in the 15% band, that gain would have cost $9,165. The catch: their AGI rises to $131,100, which would end any 2026 marketplace premium credit, since 400% of the poverty level for two is $84,600 in the 48 contiguous states.
At a glance
Gains you can realize with $0 federal income tax in 2026 when gains and qualified dividends are your only income
| Filing status and age | 0% ceiling (taxable income) | 2026 deductions assumed | Gains with $0 federal income tax |
|---|---|---|---|
| Single, under 65 | $49,450 | $16,100 standard | $65,550 |
| Single, 65 or older | $49,450 | $16,100 + $2,050 age 65 + $6,000 senior | $73,600 |
| Married filing jointly, both under 65 | $98,900 | $32,200 standard | $131,100 |
| Married filing jointly, both 65 or older | $98,900 | $32,200 + $3,300 age 65 + $12,000 senior | $146,400 |
| Head of household, under 65 | $66,200 | $24,150 standard | $90,350 |
| Married filing separately, under 65 | $49,450 | $16,100 standard | $65,550 |
Put it in your plan
Tax-Gain Harvesting in MoneyWhatIf
Step 2 of Tax Planning models gain harvesting: it sells and immediately repurchases appreciated holdings in the brokerage accounts you select, so the money stays invested while cost basis rises. It compares 0%, 15% and 20% federal gains targets under the same date window, annual gain cap and optional net investment income tax guardrail, and it normally runs after any applied Roth conversion schedule. A year-by-year chart shows the income stack and what stopped each harvest. Retirement, cash, HSA and education accounts are not eligible, and basis is proportional rather than lot by lot.
Common questions
Tax-Gain Harvesting FAQs
Can you do tax-gain harvesting every year?
Yes. There is no limit beyond the room in your bracket, and that room resets each January. Each harvest restarts the holding period on the shares you buy back, though, so selling those same shares again within a year would produce a short-term gain taxed as ordinary income. Harvesting late in the year, once the year’s other income is known, makes the remaining room easier to measure.
Is the 0% capital gains rate based on gross income or taxable income?
Taxable income, after the standard or itemized deduction, and it includes the gains themselves. For 2026, a single filer can have up to $49,450 of taxable income with the long-term gains inside it taxed at 0%. For a single filer under 65 taking the $16,100 standard deduction, that corresponds to $65,550 of income before deductions.
Does the 0% rate apply to short-term gains?
No. Short-term gains, from assets held one year or less, are taxed as ordinary income at your regular bracket, which starts at 10%. They also count in taxable income, so they fill part of the room that long-term gains could otherwise use. Only long-term gains and qualified dividends can be taxed at 0%, so check each lot’s purchase date before you sell.
Do qualified dividends count toward the 0% limit?
Yes. Qualified dividends are taxed on the same 0%, 15% and 20% schedule as long-term gains and share the same room, so every dollar of them leaves a dollar less for harvested gains. A portfolio paying $6,000 of qualified dividends a year leaves $6,000 less room to harvest. Ordinary dividends and interest shrink the room too, because ordinary income fills the stack first.
Does harvesting gains affect my Social Security or Medicare?
It can. Capital gains count in provisional income, which decides how much of your Social Security benefit is taxable, up to 85%. They also count in the MAGI that Medicare uses for IRMAA surcharges, which look back two years, so a large 2026 harvest can raise Part B and Part D premiums in 2028. Those costs can outweigh the benefit of a 0% rate on the gain.