Gross Proceeds - Cost Basis - Brokerage Fees = Cap
Post# of 41413
Gross Proceeds--Total amount you receive after selling the stock
Cost Basis--what you paid for the stock initially
Brokerage Fees--any commissions or broker fees to complete buy or sale transaction
Hope this helps.