Stock Calculator
Stack up buys and sells with commissions, and read profit, average cost, and break-even live as you type — exact to the cent. Dark by default, like Bloomberg Terminal — to protect your eyes.
Enter your trades to see live results:
Settings
One trade per line — shares@price, a leading minus means sell. Example: 100@50 or -40@65.
Keyboard shortcuts
| b / s | Set the focused trade to buy / sell |
| Tab / Shift+Tab | Next / previous field |
| ↑ / ↓ | Step a value by 1 (Shift: 10, Alt: 0.1) |
| Enter | Copy the primary result |
| [ / ] | Fewer / more decimal places (percent) |
| Esc | Clear the field |
How to calculate stock profit, average cost, and break-even
Every position question reduces to three numbers, and the calculator above keeps all three live as your trade list grows:
- Average cost basis — total cost divided by shares held. Buy 100 shares at $50 and another 100 at $60 and you hold 200 shares at an average of $55. Commissions belong in the cost: a $5 fee per buy nudges the true average to $55.05. Sells remove shares at the running average (the average-cost method), so partial exits leave your average unchanged.
- Profit and loss — realized P/L accumulates from your sells (proceeds minus average cost minus the sell fee); unrealized P/L is what the open shares would add at the price you enter in Share price now. In the example above, a price of $65 puts the position +$2,000 ahead — an ROI of +18.18% on the $11,000 invested.
- Break-even — the sell price where everything nets to zero, fees included. It always sits above the average cost, because exiting costs money too. The gap is small per trade and brutal in aggregate; the research on what commissions do to returns is worth two minutes.
The landers go deeper on each intent: a two-row
profit calculator, an
averaging tool with a target-average solver,
risk-based position sizing,
risk/reward ratios, a
dividend-reinvestment projector,
CAGR, and the
break-even and loss-recovery tables. Keyboard users:
b/s flip a trade's direction, arrows step values, Enter copies
the result — the full map sits under the calculator.
Stock math FAQ
How do I calculate profit on a stock trade?
Profit = (sell price − buy price) × shares, minus commissions on both sides. Buying 100 shares at $50 and selling at $65 with $5 commissions each way makes (65 − 50) × 100 − 10 = $1,490. The stock profit calculator does exactly this; the calculator above handles any number of buys and sells in sequence.
How does this calculator work out average cost basis?
It uses the average-cost method, applied trade by trade: every buy adds its cost (including the buy fee) to the position, and every sell removes shares at the running average. Selling 5 of 10 shares bought at $100 leaves 5 shares still averaging $100. FIFO and LIFO lot accounting are out of scope — brokers and tax authorities differ, and the average-cost article explains the trade-offs.
What does the break-even price include?
Everything you have paid: share cost plus buy commissions, plus the sell commission you would pay to exit. With a flat sell fee it is (total cost + fee) ÷ shares; with a percentage fee the divisor shrinks instead. That is why break-even always sits above your average cost — the break-even calculator shows how far.
Why does a 50% loss need a 100% gain to recover?
Because the gain acts on a smaller base. A $200 position that loses 50% is worth $100; doubling $100 only gets back to $200. The required gain is loss ÷ (1 − loss), which grows viciously: −20% needs +25%, −50% needs +100%, −95% needs +1,900%. The recovery table lists the whole curve.
Does the currency selector convert my numbers?
No — it only formats the display ($, HK$, €, ¥, CN¥, £, ₿), with each currency's own decimal convention. Converting between currencies would need live exchange rates, and this site deliberately fetches no market data: your numbers never leave the browser.
Is this investment advice?
No. These are educational calculators: they do arithmetic on numbers you type, fetch no market data, and recommend nothing. The tax field applies a single illustrative rate — real capital-gains rules vary by country and holding period. The about page spells out the full methodology and posture.
Worked examples
all examples + sources →- Berkshire buys Apple, 2016–2020 Four buy lots, two partial sells, $0.16 commissions and a 12% illustrative tax — at a mid-2021 price.
- GameStop, January 2021 From a $17.25 close to $347.51 in 23 days — the squeeze the SEC wrote a report about.
- Enron, 2000–2001 From a $90.75 peak to 61 cents — the far end of the loss-recovery curve.
- $5,000 into Tesla every year, 2011–2023 Thirteen annual buys of about $5,000 each, split-adjusted, with 1% commissions each side.
- 10 BTC bought in 2017, sold near the 2021 top A fully closed position: buy 10 at $999, sell 10 at $64,440 — the whole result is realized P/L.
- The 1% rule on a $10,000 account Entry $50, stop $48: risk $100 ÷ $2 per share = 50 shares, $2,500 of exposure.
Historical scenarios for exploring the math — not recommendations.
Articles
all →- Average Cost Basis: What It Is and Why It Moves 2026-08-31
- Averaging Down: The Math, and When It's Just the Disposition Effect 2026-08-31
- The Disposition Effect: Why You Sell Winners Too Early and Ride Losers Down 2026-08-31
- Trading International Stocks: Fees, Currencies, and Hidden Costs 2026-08-31