When you are completing your tax return, you need to know the capital gain or loss of your investments. This is calculated starting with the stock's cost basis.
Barring any complicated situations, the cost basis of the stock is the amount you invested into the stock to purchase it, plus any commissions you paid, divided by the number of shares you purchased. For instance, if you invested $5,000 in a stock and this gave you 500 company shares, your cost basis per share would be $10. This can be found by dividing the amount you invested in the stock by the shares purchased – in this example, $5,000/500 yields the amount of $10.
If you paid any commissions, you have to add it to the investment amount before dividing. If you paid $100 in commissions, you would instead calculate $5,100/500 and arrive at a cost basis of $10.20 per share.
The price of the stock at the time you sold it minus the cost basis will result in the gain on the sale. Using the same example, if the price of the stock rose to $14 per share, you would subtract the original $10.20 from $14. This yields a gain of $3.80 per share, multiplied by your 500 shares to equal a $1,900 capital gain. You would be responsible for paying taxes on the $1,900 capital gain after you sell your stock.
If you received the shares as an inheritance, the current market price of the shares on the date the original share owner died becomes your cost basis.