How this calculator works
This calculator computes the profit or loss on a stock round trip — buying shares and later selling them — including flat-dollar commissions charged on the purchase and the sale. It reports the dollar profit, the percentage return on the actual amount invested, and the breakeven sell price: the exact price at which the trade would net zero after both commissions.
Commissions matter more than they seem for smaller trades or narrow price moves. A stock can rise in price and still produce a loss once both commissions are subtracted, which is why the breakeven price accounts for fees rather than just the buy price.
The formula
Total cost = (Buy price × shares) + buy commissionTotal proceeds = (Sell price × shares) − sell commissionProfit = Total proceeds − Total costReturn % = Profit ÷ Total cost × 100Breakeven sell price = (Total cost + sell commission) ÷ sharesWorked example: 100 shares, $50 buy, $65 sell, $5 commissions
- Total cost = (50 × 100) + 5 = $5,005.
- Total proceeds = (65 × 100) − 5 = $6,495.
- Profit = 6,495 − 5,005 = $1,490, a return of 1,490 ÷ 5,005 × 100 ≈ 29.77%.
- Breakeven sell price = (5,005 + 5) ÷ 100 = $50.10 — any sell price above that, after commissions, is a profit.
Frequently asked questions
Why is the breakeven price higher than the buy price?
Because both commissions have to be recovered, not just the share cost. The breakeven price covers the buy price plus a per-share share of both the buy and sell commissions.
Can a stock go up in price and still be a loss?
Yes, if the gain is smaller than the combined buy and sell commissions. This is more common with small trade sizes or brokers charging flat per-trade fees rather than percentage-based fees.
Does this account for taxes on capital gains?
No. This calculator shows the pre-tax trading result. Capital gains tax treatment varies by country, holding period, and account type, and is not included here.
What if I don't pay a commission on my trades?
Enter 0 for buy and sell commission and the calculator reduces to a simple price-times-shares profit calculation, with breakeven equal to the buy price.
Can I use this calculator if I'm only selling part of my shares?
Yes — enter just the number of shares you're actually selling, along with the buy and sell price and commissions for that portion of the trade. The calculator computes profit, return percentage, and breakeven price for whatever share count you enter, so if you bought 100 shares and are only selling 40, run the calculation with 40 shares rather than your full position.