Your cost basis in a stock or any other security is the price you paid for it, plus any qualified expenses you incurred such as a transaction fee. For example, if you exercised a stock option to purchase 1,000 shares of your company stock for $2/share, your basis would be $2,000. If a broker charged you $15 to place the trade, your basis would be $2,000 + $15 = $2,015.