Stock Calculator (Profit/Loss)
This stock calculator estimates the profit or loss on a single share trade after commissions. It is deliberately about the trade ticket: how much cash went out when shares were bought, how much came back when they were sold, and what return those cash flows produced. That makes it different from the dividend calculator, which projects income payouts, the dividend yield calculator, which compares annual dividend per share with price, and the market capitalization calculator, which measures company size from price and shares outstanding.
Use it for a completed sale, a planned exit, or a what-if price target. Enter the number of shares, the buy price per share, the buy commission, the sell price per share, and the sell commission. The form returns net buying cost, net selling proceeds, profit or loss, ROI, and the selling price that would break even after fees. The output is informational, not investment advice; it checks arithmetic but does not tell you whether to buy, hold, or sell a security.
Formula and what it means
The calculator treats commissions as real cash flows. Buying commission increases the amount invested in the position. Selling commission reduces the cash received when the position closes.
Profit is positive when net proceeds exceed total cost and negative when they do not. ROI expresses that dollar gain or loss as a percentage of the money required to enter the trade. Break-even price reverses the same math so you can see the exact per-share exit price that would recover the purchase and both commissions.
Worked example matching the calculator
Assume the default trade: 100 shares, a $25.00 buy price, a $9.99 buying commission, a $32.00 sell price, and a $9.99 selling commission.
| Step | Calculation | Result |
|---|---|---|
| Gross buying cost | 100 shares × $25.00 | $2,500.00 |
| Total cost | $2,500.00 + $9.99 | $2,509.99 |
| Gross sale value | 100 shares × $32.00 | $3,200.00 |
| Net proceeds | $3,200.00 - $9.99 | $3,190.01 |
| Profit | $3,190.01 - $2,509.99 | $680.02 |
| ROI | $680.02 ÷ $2,509.99 × 100 | 27.09% |
| Break-even sell price | ($2,509.99 + $9.99) ÷ 100 | $25.20 |
Those values match the form output: estimated stock profit of $680.02, net buying cost of $2,509.99, net selling proceeds of $3,190.01, return on investment of 27.09%, and a break-even selling price of $25.20 per share. If the same shares were sold at $24.00 with the same commissions, the calculator would show a loss because net proceeds would be below total cost.
How investors use the result
The first use is trade review. Comparing profit with ROI prevents a large dollar gain from looking impressive when the required capital was even larger. A $1,000 gain on a $100,000 position is a 1% return; a $200 gain on a $1,000 position is a 20% return. The calculator shows both dollar and percentage perspectives.
The second use is planning. Break-even price is helpful before placing an order because fees raise the price needed to avoid a loss. That matters most for small trades, frequent trades, and low-priced shares where a flat commission is large relative to the position. Even if your broker charges $0 commission, the bid-ask spread and execution price can still matter.
The third use is comparison with other stock metrics. A profitable trade does not necessarily mean the company was cheap; valuation belongs on pages such as the price-to-earnings calculator and EPS calculator. A losing trade does not necessarily mean the business is bad; it may reflect timing, market-wide movement, taxes, position sizing, or a change in risk appetite. For non-stock business math, the profit calculator is a better fit.
Benchmarks and interpretation
There is no universal good ROI for a stock trade. Short holding periods usually need to be compared with similar time horizons, while long holding periods should be compared with broad market returns, cash alternatives, and the risk taken. A positive result after commissions means the trade made money before taxes. A negative result means the exit returned less cash than the entry cost.
For scenario work, test several sell prices rather than one target. A table of downside, base, and upside prices can show how quickly profit changes when the share price moves. If the break-even price is close to your expected sale price, the trade has little margin for fees, price slippage, or taxes.
Limitations and practical tips
This calculator does not include dividends, tax lots, wash-sale rules, margin interest, short-sale borrowing costs, foreign exchange, or option exercises. It also assumes the entered buy and sell prices represent actual average execution prices. If you filled an order in several pieces, use the weighted average price from your broker statement.
Keep separate notes for cash dividends and reinvested dividends. The dividend calculator can model income, and the dividend yield calculator can translate annual dividend per share into a yield. For valuation context, pair the trade result with P/E, EPS, and market capitalization rather than relying on price movement alone.
Before relying on the output, confirm the share count, commissions, and currency. Round only at the end, because rounding each intermediate step can make cents differ from the form. Treat the result as a clean transaction estimate and combine it with broader research, diversification rules, and personal financial goals.
Sources
- SEC Investor.gov, Stocks — overview of common stock ownership and risks.
- FINRA, Stocks — investor education on stock features, risks, and trading considerations.
- FINRA, Investment Products — context for comparing stocks with other investment types.