Stock Calculator

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
Buy fee
Sell fee
Decimal places
Percent
Amounts
Shares
shares at each
shares at each

One trade per line — shares@price, a leading minus means sell. Example: 100@50 or -40@65.

$48.8$57.5$65.00#1 BUY 100 @ $50.00 · avg $50.00#2 BUY 100 @ $60.00 · avg $55.00#1 BUY 100 @ $50.00 · avg $50.00#2 BUY 100 @ $60.00 · avg $55.00#1#2
Total P/L
Open position (shares)
Average cost basis
Total invested
Realized P/L
Unrealized P/L
Return on investment
Break-even price
After-tax P/L (illustrative)
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:

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 →

Historical scenarios for exploring the math — not recommendations.

Articles

all →

Releases

all →