1. You can google "0% capital gains harvesting" and probably read plenty about it, but the basic idea starts with the idea that most people want to realize income up to the top of the 12% ordinary bracket *and* the top of the 0% LTCG bracket.
So lets say you have $60K of ordinary income this year and you have unrealized long term capital gains of $40K. (I'm assuming you're filing status is MFJ for this example. Even if you're not, the general approach still works.)
If you don't sell the stock, then you'll pay ordinary income taxes on your $60K. You get to subtract your $24.4K standard deduction for MFJ, which puts you at around $36K. The first ~$20K of that will be taxed at 10%, and the next $16K will be taxed at 12%. So roughly speaking, you'll have a federal income tax bill of around $3900.
If you do sell the stock and realize LTCG of $40K, then all of the previous paragraph will be the same, plus you'll have $40K in LTCG, but that LTCG will be taxed at 0%. That $40K in LTCG is federally income tax free.
Because the wash sale rule only applies to losses, you can sell and then immediately rebuy the stock at the same price. You pay nothing on the gain, as noted in the previous paragraph, but your basis is now $40K higher than it was before, so if you sell that stock later, your gains and thus taxes will be lower.
You probably want to be careful to avoid selling any shares of the stock at a loss within 30 days either side of the $40K gain sale, as that would trigger the wash sale rule on those shares.
You can do this every year and escape taxation on LTCG and raise your basis. Depending on how much unrealized gain you have, you might need to do this over several years. (So, you could eliminate taxes on $200K of unrealized capital gains over five years doing this.)
Note that many states treat LTCG as ordinary income, so you might have to pay state income taxes on the $40K gain in this scenario. Something to consider in your tax planning for the current year, but unless you're planning on moving to a lower income tax state later, this will be a wash - you'll owe those state taxes regardless of when you sell.
Even if you don't owe federal income taxes on the gain, it does add to your AGI, which in turn can affect other tax benefits. So if you're planning on ACA subsidies, or FAFSA benefits, or anything else, you'll have to consider the tradeoffs there.
...
The overarching thing to note is that Roth conversions create ordinary income, which can push some of those LTCG up into the 15% bracket (which starts at ~$80K of taxable income). So to optimize, you'd need to play with two variables: (1) how much Roth conversion to do, and (2) how much LTCG to realize. They're both good strategies, but which one is better for each individual situation varies. I think
@MDM has a spreadsheet to help evaluate this tradeoff, but honestly I tried it once and couldn't understand how to use it. Maybe he'll chime in with the spreadsheet and how to use it.
HTH.