To minimize a tax liability when selling shares, investors must identify which shares were bought at what price in order to determine his cost basis. If he has acquired shares over a long period of time, he will have many shares at many different prices. By identifying the shares with the highest cost basis, he will generally pay lower capital gains taxes than if he identified shares bought at a lower cost.