How to calculate profits from selling stock
When you sell stock, you're responsible for paying taxes only on the profits -- not on the entire value of the sale.
To determine profits, take your total proceeds and subtract your cost basis (also known as your tax basis), which consists of the amount you paid to buy the stock in the first place plus any commissions or fees you paid to buy and sell the shares.
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.