You must know the basis of stock or mutual fund shares you sold so you can accurately figure your capital gain or loss. To figure your gain or loss on the sale of the shares, subtract your basis from the amount you received for the shares.
When figuring the basis of stock or mutual fund shares you sell:
Make sure the amount you're starting with is correct. To learn more about your starting basis, see the Original Basis and the Shares Purchased Through Reinvestment tax tips.
Look at events that have happened since you bought the shares. Some might have changed the shares’ basis (Ex: nontaxable distributions). To learn more, see the Adjusted Basis tax tip.
You can use these methods to figure the basis of mutual funds:
Specific identification method
First-in, first-out method
However, you can't use these methods to figure the basis for stocks.