Definition
Cost basis is the purchase price plus any fees. When you sell, the difference between the sale price and the cost basis is your capital gain or loss. If you bought at different times, your broker tracks the average or specific lots depending on the method.