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.

  • Methods explained
  • Save scenarios
  • Compare saved scenarios
  • Chart
  • Household prefill
  • Printable report

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,099

After-tax, today's dollars

Lifetime income tax

−$3,898

$320,146 against $324,044

Over the plan

Gains harvested, today's dollars$426,045
Basis at the end, share of the account37%
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$426,045$0$320,146$2,756,782+$7,099
Neither$0$0$324,044$2,749,683–

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,966,500$901,100
202763$48,669$103,753$0$134,377$101,372$0$0$1,927,944$902,227
202864$51,538$107,662$0$137,736$103,906$0$0$1,883,991$903,382
202965$56,539$111,736$0$142,957$106,504$0$0$1,834,284$906,343
203066$60,343$115,981$0$146,531$109,167$0$0$1,778,444$909,378
203167$66,546$120,406$0$152,061$111,896$0$0$1,716,069$914,356
203268$71,715$125,019$0$155,862$114,693$0$0$1,646,736$919,459
203369$66,070$101,300$0$159,759$117,561$0$0$1,599,527$928,968
203470$0$50,330$0$87,750$44,497$0$0$1,603,419$899,737
203571$0$52,210$0$92,107$47,772$81$0$1,605,501$870,440
203672$0$54,230$0$96,624$51,181$227$0$1,605,566$841,039
203773$0$56,331$0$101,254$54,675$377$0$1,603,459$811,532
203874$0$58,517$0$106,001$58,258$531$0$1,599,015$781,916
203975$0$0$0$196,818$147,881$15,916$0$1,671,502$797,879
204076$0$0$0$204,118$153,957$16,897$0$1,748,799$816,037
204177$0$0$0$211,276$159,861$17,811$0$1,830,889$836,213
204278$0$0$0$219,158$166,458$18,889$0$1,918,411$858,861
204379$0$0$0$227,358$173,341$20,021$0$2,011,715$884,137
204480$0$0$0$235,888$180,520$21,208$0$2,111,174$912,203
204581$0$0$0$244,142$187,390$22,286$0$2,216,713$942,780
204682$0$0$0$253,331$195,160$23,708$0$2,329,034$976,343
204783$0$0$0$262,146$202,521$24,979$0$2,448,023$1,012,548
204884$0$0$0$272,024$210,909$26,459$0$2,574,668$1,052,127
204985$0$0$0$281,402$218,758$27,954$0$2,708,574$1,094,439
205086$0$0$0$291,038$226,828$29,473$0$2,850,106$1,139,590
205187$0$0$0$300,924$235,109$30,749$0$2,999,903$1,187,941
205288$0$0$0$309,926$242,465$31,805$0$3,157,426$1,238,692
205389$0$0$0$320,250$251,103$33,127$0$3,323,897$1,292,760
205490$0$0$0$329,439$258,564$34,174$0$3,498,592$1,349,145
205591$0$0$0$338,661$266,013$35,201$0$3,681,702$1,407,753
205692$0$0$0$347,870$273,406$36,198$0$3,873,383$1,468,450
205793$0$0$0$357,011$280,686$37,153$0$4,073,752$1,531,060
205894$0$0$0$364,170$285,936$37,644$0$4,281,380$1,593,906
205995$0$0$0$371,004$290,814$38,144$0$4,496,006$1,656,494
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.

Reference sources. These sources support the component rules. Model choices and exclusions are described in the notes above.IRS: capital gains