Yes, commissions should be included in the cost of purchase for your trades in the cost basis and subtracted from your sales proceeds. For example, if you bought one share for $100 and sold for $150 and paid $10 commission for each leg, then your cost basis would be $110 and your sales proceeds would be $140 for a total net profit of $30.
Often your broker does this calculation for you already on your Form 1099B. But, if you need to manually enter it, then you can adjust your amount for cost basis and sales proceeds (or use the additional info button for each sale and the next screen will have an option to enter sales commissions).