Stock Profit and Loss Calculator
Work out the net profit and ROI on a stock trade after broker commission fees.
This calculator runs entirely in your browser. Nothing you type is uploaded or stored.
How to use this tool
This stock profit calculator turns a few trade details into a clear net result. Enter the number of shares you bought, the price you paid per share, and the price you sold at per share. If your broker charged a commission, add the buy-side fee and the sell-side fee in the optional boxes. Then press Calculate profit. The tool shows your net profit or loss in dollars along with a full breakdown: total cost, total proceeds, total commissions, and your return on investment (ROI) as a percent. You can copy the summary or download it for your records.
The formula: how stock profit is calculated
Total proceeds = (shares x sell price) - sell commission
Net profit = total proceeds - total cost
ROI percent = (net profit / total cost) x 100
The idea behind this capital gains stock flip math is simple. Your total cost is everything you spent to get into the position, including the buy-side commission. Your net proceeds are everything you actually keep after selling, which means the sell price times your shares minus the sell-side commission. The difference between the two is your real profit. Expressing that profit as a percent of what you put in gives you ROI, which lets you compare trades of different sizes on equal footing.
A real example
Say you buy 100 shares at $50.00 each, with a $4.95 buy commission. Your total cost is (100 x $50.00) + $4.95 = $5,004.95. Later you sell all 100 shares at $62.50 each, paying another $4.95 commission. Your net proceeds are (100 x $62.50) - $4.95 = $6,245.05. Net profit is $6,245.05 - $5,004.95 = $1,240.10. Your ROI is ($1,240.10 / $5,004.95) x 100, which is about 24.78 percent. Without counting the two commissions you would have seen $1,250.00, so this broker commission fee tool shows that fees trimmed roughly $9.90 off the gain.
Common questions
Does this stock profit calculator include taxes?
No. It shows pre-tax net investment proceeds based only on price, shares, and commissions. Capital gains taxes vary by holding period and your tax bracket, so figure those separately or ask a tax professional.
What if I do not pay any commission?
Many brokers now offer commission-free trades. Just leave the buy and sell commission fields blank or enter 0, and the calculator treats them as zero.
Can it show a loss?
Yes. If your total proceeds are less than your total cost, the net result is negative and the ROI percent shows as a loss. The figure is highlighted so you can see it clearly.
What does ROI percent mean here?
ROI, or return on investment, is your net profit divided by your total cost, shown as a percent. It tells you how much you earned relative to what you invested, which makes it easy to compare a capital gains stock flip across different trade sizes.
Is this financial advice?
No. This is an educational estimate to help you understand a single trade. It is not investment, tax, or financial advice. Confirm exact figures with your brokerage statement before making decisions.