Last May I had been with my company for a year so I got the first grant of restricted stock units (RSUs) that vest over 4 years. Based on this answer to a related question, I am thinking I should have sold them immediately. But now I have kept them for over half a year and the stock price has increased. As I understand, the RSUs are taxed as regular income, and my cost basis for the remaining shares (after some were sold to cover tax withholding) is their value at the time of the grant.
So although I'd like to sell them, at this point wouldn't I be better off holding on to them for a year so I get the long-term capital gains tax rate rather than short-term? However, after I have had the stock for a year I will get another grant of RSUs. How does the capital gains tax work when you have some shares that were just just granted and others that you have had for a year? Did I shoot myself in the foot by not selling immediately?
FOLLOW-UP: I am also thinking about participating in an employee stock purchase plan (ESPP) which offers a 15% discount, and selling those shares immediately as well. But I think I might have the same issue with newly acquired stock being grouped together with stock held for several months or longer that has gone up in value. How does this work with regard to short- or long-term capital gains taxes?