Let's say I bought 100k worth of a stock a long time ago. Over the years, I've received (and paid income tax on) 50k in dividends. The stock tanks, and my shares are now worth only $50k. I decide to sell all my shares in 2023, incurring a $50k capital loss. I've basically broken even on my investment ($50k dividends - $50k capital loss), but I've already paid taxes on the dividends, so I need to recoup the taxes on the capital loss.
In 2023, I sold no other stock other than the aforementioned one, so there are no capital gains to offset this year. I deduct the allowable $3k from ordinary income and have $47k in capital loss carryover.
At the end of 2023, I retire, so for 2024 I have no earned income. I think this is a great opportunity to do some tax gain harvesting while I'm in the 0% capital gains bracket. I sell some other stock, incurring $50k in capital gains. I'm married filing jointly, so that keeps me within the 0% capital gains bracket.
But wait... I also have this $47k capital loss carryover from 2023.
Will the IRS:
A) Use up my $47k capital loss carryover against my $50k capital gains, even though I wouldn't have had to pay tax on the capital gains anyway, effectively "wasting" my capital loss carryover?
or
B) Since the capital loss carryover is "of no use to me" this year, continue to carry it forward to future years?
If the latter, are there any strategies to take advantage of the 0% capital gains rate without wasting my capital loss carryover?