Tax Gain and Loss Harvesting

Realize gains while they are taxed at 0%, or losses against gains and $3,000 of other income, and see what it is worth over a whole retirement once Social Security taxation, Medicare surcharges and competing Roth conversions are counted.

Harvesting plan

$
$

Household

Accounts today

$
$
$
%
%

Income and spending

$
$
$
$
$

Roth conversions

Assumptions

%
%
%
%

Gain you can realize at 0% this year

$46,100

Adds nothing to this year's tax

Gain that adds no tax at all

$46,100

Of $1,045,000 unrealized after this year's sales

Heirs keep, versus not harvesting

+$7,317

After-tax, today's dollars

Lifetime income tax

−$3,141

$448,975 against $452,115

Over the plan

Gains harvested, today's dollars$406,401
Basis at the end, share of the account34%
Basis at the end without harvesting30%
Medicare surcharges, today's dollars$0
Surcharges without harvesting$0

Harvesting against converting

PlanHarvestedConvertedLifetime taxHeirs keepVersus neither
Harvest only$406,401$0$448,975$4,344,433+$7,317
Neither$0$0$452,115$4,337,115

A Roth conversion and a harvested gain fill the same low bracket: the 0% gains band ends just under the top of the 12% bracket. Conversions are solved first each year, so they take the room. Choose a conversion strategy to see all four combinations.

Gains realized each year

The taxable account and its basis

Year by year

YearAgeHarvested gainSold for spendingConversionAGITaxable incomeTaxLoss carriedTaxable accountIts basis
202662$46,100$100,000$0$131,100$98,900$0$0$1,985,500$901,100
202763$48,085$103,468$0$134,377$101,372$0$0$1,966,724$902,227
202864$50,278$107,080$0$137,737$103,906$0$0$1,943,328$903,383
202965$54,489$110,846$0$142,957$106,504$0$0$1,914,943$906,343
203066$57,356$114,772$0$146,530$109,166$0$0$1,881,180$909,378
203167$62,438$118,865$0$152,061$111,896$0$0$1,841,618$914,355
203268$66,239$123,136$0$155,863$114,694$0$0$1,795,814$919,458
203369$60,230$99,063$0$159,759$117,561$0$0$1,773,104$928,967
203470$0$48,038$0$95,843$52,590$312$0$1,802,694$903,799
203571$0$49,631$0$101,032$56,697$491$0$1,831,951$878,916
203672$0$51,279$0$106,327$60,884$673$0$1,860,802$854,314
203773$0$52,984$0$111,732$65,153$858$0$1,889,171$829,989
203874$0$54,748$0$117,249$69,506$1,047$0$1,916,972$805,936
203975$0$0$0$213,650$164,712$19,888$0$2,033,355$834,759
204076$0$0$0$223,194$173,033$20,989$0$2,159,491$867,902
204177$0$0$0$232,730$181,316$22,305$0$2,295,476$905,038
204278$0$0$0$243,261$190,561$23,813$0$2,442,482$946,865
204379$0$0$0$254,337$200,320$25,578$0$2,601,192$993,563
204480$0$0$0$265,982$210,614$27,716$0$2,772,223$1,045,216
204581$0$0$0$277,483$220,731$29,787$0$2,955,930$1,101,634
204682$0$0$0$290,297$232,126$32,165$0$3,153,811$1,163,705
204783$0$0$0$302,864$243,239$34,236$0$3,366,444$1,231,372
204884$0$0$0$316,948$255,833$36,460$0$3,595,789$1,305,874
204985$0$0$0$330,649$268,005$38,573$0$3,842,183$1,386,815
205086$0$0$0$344,910$280,700$40,781$0$4,106,743$1,474,530
205187$0$0$0$359,734$293,919$43,084$0$4,390,640$1,569,356
205288$0$0$0$373,679$306,218$45,163$0$4,693,916$1,670,501
205389$0$0$0$389,569$320,422$47,640$0$5,018,916$1,779,376
205490$0$0$0$404,254$333,378$49,819$0$5,365,521$1,894,930
205591$0$0$0$419,234$346,586$52,031$0$5,734,826$2,017,281
205692$0$0$0$434,457$359,994$54,262$0$6,127,930$2,146,502
205793$0$0$0$449,857$373,532$56,497$0$6,545,923$2,282,614
205894$0$0$0$462,843$384,609$58,165$0$6,987,833$2,423,612
205995$0$0$0$475,612$395,423$59,749$0$7,454,428$2,569,203
How it works

Gain harvesting. Long-term gains and qualified dividends are taxed at 0% while taxable income stays under $49,450, or $98,900 on a joint return, in 2026. Each year the planner sells and rebuys enough appreciated stock to fill that band, after the gains that spending already realizes. The sale raises basis, so later sales realize less. There is no wash sale rule for gains.

What a 0% gain still costs. A harvested gain is income. It can make more Social Security taxable, phase out the senior deduction and add state tax, and the year is re-solved with the gain so all three are counted. The stricter setting realizes only the gains that leave the year's total tax unchanged. Gains that fit the 0% band can't reach the first IRMAA threshold, so they don't raise Medicare premiums by themselves.

Loss harvesting. Losses sold this year offset gains first, then up to $3,000 of other income a year, and the rest carries forward. Only as much of the $3,000 is used as taxable income can absorb, as on the IRS Capital Loss Carryover Worksheet. The replacement shares carry a lower basis, so the deduction is partly a deferral. Buying back the same security within 30 days disallows the loss; this assumes a similar, not identical, replacement.

When it pays. Heirs receive a stepped-up basis, so basis you raise and never use is worth nothing to them. Harvesting gains pays when you would otherwise sell the same shares later at 15% or more: after Social Security and RMDs have filled the low brackets, or as a surviving spouse on single brackets.

Each year. The same loop as the Roth Conversion Planner: RMD, conversion, spending, then harvesting, with 2026 federal brackets, the senior deduction through 2028, Social Security taxed per IRS Pub. 915, the net investment income tax and IRMAA. The taxable account is one pool with one average basis, not individual lots.