Long-term capital gains are taxed at 0% for single filers up to about $49,450 of taxable income and married filers up to about $98,900 in 2026. Gain harvesting deliberately realizes gains to fill that free bracket. Losers can be paired with loss harvesting — and losses also offset ordinary income up to $3,000 per year. Enter your numbers to see exactly how much gain you can take at 0%.
Scenario: A single retiree has $30,000 of taxable income from a pension and $120,000 of unrealized gains in a broad index fund held for 10 years. Standard deduction already applied.
0% ceiling: About $49,450 for single filers in 2026.
Room at 0%: $49,450 − $30,000 ordinary income = $19,450 of gains taxed at 0%.
Action: Sell $19,450 of the index fund, pay $0 federal tax, and immediately repurchase the same fund at the higher basis — the gain is erased permanently. Repeat every year to ratchet your basis up.
Takeaway: This is the single most valuable tax strategy available to retirees living on modest taxable income, and it is entirely legal. There is no wash sale rule for gains.
Scenario: A married couple has $70,000 ordinary income, $25,000 of realized long-term gains from selling a stock, and $15,000 of losses from a position that went bad.
Net gain: $25,000 − $15,000 = $10,000.
Married 0% ceiling: About $98,900. With $70,000 of ordinary income, they still have $28,900 of room.
Result: The entire $10,000 net gain falls inside the 0% bracket → $0 federal tax. The losses absorbed gains that would have been free anyway — worth noting the $15,000 of losses could have been saved.
Takeaway: Do not waste loss harvesting absorbing gains that would be taxed at 0% anyway. Save losses for years when you have gains taxed at 15% or 20%, or use them against ordinary income up to $3,000.
Scenario: A married couple with $280,000 of ordinary income harvests $40,000 of long-term gains.
0% room: Their ordinary income already exceeds the $98,900 ceiling → no 0% room at all.
Federal rate: Above the 15% threshold, still in the 15% band (the 20% rate starts around $600,050 for married couples in 2026). Tax = $6,000.
NIIT: Their income exceeds the $250,000 MAGI threshold for the 3.8% Net Investment Income Tax, so an additional $1,520 applies.
Takeaway: Above roughly $250,000 of MAGI, every realized gain also faces the 3.8% NIIT. For high earners, gain harvesting is rarely advantageous — the goal becomes deferring gains, not realizing them, because a step-up in basis at death erases them entirely.
This is the mechanic most people get wrong. Long-term capital gains are not taxed in a separate world — they stack on top of your ordinary taxable income. Your ordinary income fills the brackets first, and gains are then placed on top:
So the free space is not the full 0% bracket — it is the bracket minus your ordinary income. A single filer with $45,000 of ordinary income has almost no 0% room. A retiree with $20,000 of income has nearly the whole bracket available.
| Rate | Single | Married filing jointly | Head of household |
|---|---|---|---|
| 0% | Up to ~$49,450 | Up to ~$98,900 | Up to ~$66,200 |
| 15% | ~$49,450–$545,500 | ~$98,900–$613,700 | ~$66,200–$579,600 |
| 20% | Above ~$545,500 | Above ~$613,700 | Above ~$579,600 |
| +3.8% NIIT | MAGI above $200,000 | MAGI above $250,000 | MAGI above $200,000 |
These thresholds are indexed annually for inflation, so confirm the current year's figures before filing. Note that short-term gains — assets held one year or less — get no 0% bracket at all; they are taxed entirely at ordinary income rates. Holding period is everything.
| Feature | Gain harvesting | Loss harvesting |
|---|---|---|
| What you do | Sell winners and rebuy immediately | Sell losers and rebuy after 31 days |
| Wash sale rule | Does NOT apply — no restriction on rebuying | Applies — 30 days before and after, including in IRAs |
| Best suited to | Low-income years, retirees before RMDs, gap years | High-income years with realized gains, rebalancing |
| Ordinary income offset | N/A | Up to $3,000/year, unlimited carryforward |
| Main risk | Trimming the 0% bracket can pull other income into taxable range | Wash sale disallowance; permanently lowers basis |
The wash sale rule (IRC §1091) disallows a loss if you buy a substantially identical security within 30 days before or after the sale. It applies only to losses. There is no rule preventing you from selling a gain and immediately repurchasing the same fund — which is exactly why gain harvesting works so well. You ratchet your basis up at no tax cost.
One trap with losses: wash sales are triggered by purchases in any account, including your IRA or your spouse's IRA. Buying the same fund in a retirement account within the window disallows the loss permanently, and the disallowed amount does not even add to your IRA basis. Coordinate across every account in the household.
The tax on gains is only part of the equation. Realized gains increase your Adjusted Gross Income, which can affect:
For a retiree in a no-income-tax state with modest income, harvesting is nearly pure upside. For someone on ACA subsidies or approaching an IRMAA threshold, harvesting gains can easily cost more than it saves. Model both sides.
Gain harvesting pays best for: retirees in the gap years between retirement and Social Security or RMDs, people with a low-income year from a sabbatical or layoff, young investors in low brackets, and anyone planning to hold appreciated assets for decades. It pays worst for: high earners above the NIIT thresholds, anyone receiving ACA subsidies, and taxpayers in high-tax states with large existing unrealized gains.
Also weigh the alternative: holding until death gives your heirs a step-up in basis, erasing the gain entirely. Harvesting now is a bet that paying 0% now beats paying 0% later — a wash on taxes, but useful if you want to free up cash, rebalance a concentrated position, or reduce future risk without a tax bill.
⚠️ Important Disclaimer: This capital gains harvesting calculator provides planning estimates and is not tax advice. Capital gains brackets, standard deductions and phase-out thresholds are indexed for inflation and change annually — confirm the current year's figures against IRS Publication 550 and the Schedule D instructions before acting. State treatment of capital gains varies widely, with nine states imposing no income tax and others taxing gains at ordinary rates or with their own preferential rates. The second-order effects of raising your AGI — ACA premium tax credits, IRMAA Medicare surcharges, Social Security benefit taxation, Roth eligibility, college financial aid and the 3.8% Net Investment Income Tax — are not fully modeled here and can outweigh the tax saved. Consult a CPA or tax professional before executing a harvesting strategy.