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

Adds nothing to this year's tax

Gain that adds no tax at all

$46,785

Of $1,015,685 unrealized after this year's sales

Heirs keep, versus not harvesting

+$7,348

After-tax, today's dollars

Lifetime income tax

−$4,029

$316,908 against $320,937

Over the plan

Gains harvested, today's dollars$435,668
Basis at the end, share of the account38%
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$435,668$0$316,908$2,682,850+$7,348
Neither$0$0$320,937$2,675,502–

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,785$100,000$0$131,100$98,900$0$0$1,963,500$901,100
202763$49,488$103,798$0$134,377$101,372$0$0$1,921,763$902,227
202864$52,514$107,755$0$137,736$103,906$0$0$1,874,440$903,382
202965$57,702$111,879$0$142,957$106,504$0$0$1,821,167$906,343
203066$61,734$116,178$0$146,531$109,167$0$0$1,761,555$909,378
203167$68,215$120,660$0$152,061$111,896$0$0$1,695,195$914,355
203268$73,733$125,332$0$155,862$114,693$0$0$1,621,657$919,457
203369$68,036$101,676$0$159,759$117,561$0$0$1,570,439$928,967
203470$0$50,766$0$85,425$42,172$0$0$1,570,922$898,479
203571$0$52,617$0$89,636$45,301$0$0$1,569,479$867,927
203672$0$54,651$0$94,033$48,590$108$0$1,565,850$837,245
203773$0$56,803$0$98,571$51,992$254$0$1,559,837$806,410
203874$0$59,044$0$103,225$55,481$403$0$1,551,265$775,421
203975$0$0$0$196,102$147,164$15,808$0$1,620,519$790,775
204076$0$0$0$203,353$153,193$16,783$0$1,694,405$808,284
204177$0$0$0$210,460$159,045$17,688$0$1,772,895$827,766
204278$0$0$0$218,288$165,588$18,759$0$1,856,621$849,675
204379$0$0$0$226,432$172,414$19,882$0$1,945,922$874,163
204480$0$0$0$234,901$179,533$21,060$0$2,041,159$901,390
204581$0$0$0$243,092$186,339$22,129$0$2,142,237$931,075
204682$0$0$0$252,214$194,043$23,498$0$2,249,897$963,730
204783$0$0$0$260,959$201,334$24,756$0$2,363,959$998,971
204884$0$0$0$270,763$209,648$26,222$0$2,485,408$1,037,526
204985$0$0$0$280,063$217,419$27,702$0$2,613,819$1,078,751
205086$0$0$0$289,616$225,407$29,206$0$2,749,539$1,122,748
205187$0$0$0$299,416$233,601$30,465$0$2,893,193$1,169,874
205288$0$0$0$308,325$240,865$31,504$0$3,044,208$1,219,325
205389$0$0$0$318,552$249,405$32,808$0$3,203,796$1,272,014
205490$0$0$0$327,638$256,762$33,835$0$3,371,195$1,326,937
205591$0$0$0$336,750$264,102$34,842$0$3,546,567$1,383,992
205692$0$0$0$345,843$271,379$35,817$0$3,730,041$1,443,044
205793$0$0$0$354,861$278,536$36,749$0$3,921,701$1,503,908
205894$0$0$0$361,889$283,656$37,215$0$4,120,064$1,564,902
205995$0$0$0$368,584$288,395$37,689$0$4,324,830$1,625,525
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