To compute long-term capital gains tax on shares, pinpoint the sale price, purchase cost, and related charges. Calculate gains by deducting acquisition and sale expenses from the sale price.