You can often select specific “lots” (groups of shares) to sell. To maximize tax efficiency, you may want to prioritize shares that meet the requirements for long-term capital gains or those with the highest “cost basis” to minimize the taxable gain.