How the calculator works
Enter three things — your buy price per share, your sell price per share, and the number of shares — and the result updates live as you type. A toggle at the top switches between a Long position (buy first, sell later) and a Short position (sell first, buy back later), and an optional fees section adds your broker's buy and sell commissions. The headline result is your net profit or loss, with the equation that produced it written out underneath. Two cards add the ROI and the breakeven price, and a breakdown table separates the gross result, the fees and your cost basis. Copy Result puts a one-line summary on your clipboard for a journal or spreadsheet.
The maths, in plain words
Worked example: you buy 100 shares at $50.00 and sell at $65.00, with a $5 commission on each trade. Gross profit is 100 × ($65 − $50) = $1,500.00. Subtract the $10 of fees and the net profit is $1,490.00. Your cost basis is $5,000 + $5 = $5,005.00, so the ROI is $1,490 ÷ $5,005 = +29.77%. The breakeven price is $50 + ($10 ÷ 100) = $50.10 — any sale above that was a genuine profit after costs. On small trades the fee effect grows: the same $10 on a $500 position is 2% gone before the price moves. Our article on what your broker's P&L screen leaves out digs into exactly these gaps.
Long vs short: what changes
Only the direction of the price difference. Long: (exit − entry) × shares. Short: (entry − exit) × shares, because a short seller profits when the price falls. Short 50 shares at $80.00 and buy back at $60.00 with no fees, and the gross and net result is (80 − 60) × 50 = $1,000.00, a +25.00% ROI on the $4,000 entry value, with a breakeven of $80.00. In Short mode the form relabels the fields to Short (Sell) Price and Buy-Back Price, and the breakeven sits below your entry instead of above it.
When to use it
Use it before you close a trade, to see the net figure — not the flattering gross one — while there is still time to decide. Use it after a trade to record an accurate result in a journal; the one number day traders keep forgetting is usually the fee-adjusted one. And use the breakeven price before you enter: on a small position, it quickly shows whether the trade can survive its own costs. For a return figure on money invested more generally — property, a business, a portfolio — the ROI Calculator covers that broader case.
Common mistakes
- Quoting the gross figure. (Sell − buy) × shares is not your profit until commissions come off. On frequent small trades, fees are often the difference between a winning and a losing month.
- Entering a per-share fee. The fee fields expect the flat amount per transaction. Entering a per-share rate understates or overstates your costs depending on size.
- Forgetting the position toggle. A short trade calculated in Long mode gives the mirror-image answer — a "profit" that was really a loss. Check the toggle before you trust the sign.
- Judging by dollars alone. A $1,490 gain on $5,005 (+29.77%) and the same dollars on $50,000 (+2.98%) are very different trades. Read the ROI next to the headline number.
Honest limits, privacy — and an important note
The calculator handles a single entry and a single exit. It does not average multiple buys, split partial sells, include dividends, convert currencies, or calculate tax — and the result is only as accurate as the prices and fees you type. Everything runs in your browser: your trade details are never uploaded, stored or shared. Finally, be clear about what this tool is: it does arithmetic on your own figures. It does not know the stock, your finances or what the price does next, and nothing it shows is investment advice or a recommendation to buy, sell or hold anything.