Over 700 finance terms, Shmooped to perfection.
It's a tax issue. You liked AT&T at $40 a share. You bought 500 shares. You liked it even more at $35 a share and bought 1,000 shares. You loved it at $30 a share and bought 2,000 shares. You adored it at $25 a share and bought 5,000 shares. Your average cost basis is $28.24 (forget commissions). The stock then went to $50 and you sold half or 4,250 shares. How much gain was there? Well, you take the average cost in for half of your shares - and you match it with the average cost out. In this case, you are realizing gains per share of $50 - $28.24 or $21.76 times 4,250 shares or $92,480.