Cost basis = Price paid for stock + Commission and fees
Profits = Proceeds from sale - Cost basis
Example of how to calculate profits from a stock sale
Let's say you bought 10 shares of stock in Company X for $10 each and paid $5 in transaction fees for the purchase. If you later sold all the stock for $150 total, paying another $5 in transaction fees for the sale, here's how you'd calculate your profits:
Cost basis = $100 (10 shares @ $10 each) + $10 (purchase and sale fees @ $5 each) = $110
Profits = $150 - $110 = $40
So, in this example, you'd pay taxes on the $40 in profits, not the entire $150 total sale price.
Now that you've determined your profits, you can calculate the tax you'll have to pay. The taxes you owe depend on your total income for the year and the length of time you held the shares.