Last updated: 25 October 2026 (v2: stocks, forex, futures and crypto modes; commission structures; per-order minimum; currency conversion).
Principles
- Calculations run in your browser, using only the numbers you enter. Nothing is sent to or stored on a server (your last inputs are only kept in your browser).
- No live prices are used: you enter your prices.
- A cost is positive; a credit (swap or funding received, rebate) is entered as a negative number.
- Amounts are in the account currency; the display currency converts nothing, it only sets the symbol.
Conventions by market
| Market | Size | Value of a 1.0 price move | Commission options |
|---|---|---|---|
| Stocks / ETF | shares | 1 × conversion rate | per share per order (with minimum), %, flat |
| Forex | lots entered, converted to units (1 standard lot = 100,000) | 1 × quote-to-account rate | per lot round turn (÷ 2 per order), %, flat |
| Futures | contracts | tick value ÷ tick size | per contract round turn (÷ 2 per order), flat |
| Crypto | coins | 1 × conversion rate | % per order (maker/taker), flat |
Commission per order
commission = max(minimum, rate % × executed price × size × m + amount per unit × size) + flat amount per order
It applies to the entry and to the exit. m is the value of a 1.0 price move for one unit, in the account currency.
Net P&L calculator
With d = +1 for long and −1 for short:
Executed prices : entry_exec = entry + d × entry_slippage ; exit_exec = exit − d × exit_slippage Target gross P&L : d × (exit − entry) × size × m Slippage : (entry_slippage + exit_slippage) × size × m Spread : spread × size × m (if the spread isn't already in the prices entered) Net P&L : gross − slippage − spread − commission(entry) − commission(exit) − funding − other fees Net return : net P&L / (entry × size × m) Fee share : total fees / gross P&L (shown when gross is positive) In R : P&L / (|entry − stop| × size × m)
Break-even: the target exit price at which net P&L is zero, all other inputs unchanged. Net P&L always moves in the same direction as the exit price, so it is found by bisection (precision far below display). Without a minimum commission it equals:
X = (d × entry × Q − c × d × exit_slippage × Q + K) / (Q × (d − c)) with Q = size × m, c = exit rate, K = other costs
Verifiable examples: 0.5 BTC 60,000 → 60,600 at 0.1% per order and 10 slippage each side: net 229.70, break-even 60,140.14. 300 shares $52.40 → $53.00 at $0.005 per share ($1 minimum) and $0.02 slippage: net $165.00, break-even $52.45.
Position size calculator
Budget : account × risk % (or amount entered) Exit at stop : stop − slippage (long) or stop + slippage (short) Total loss(q) : q × (|entry − stop| + spread + slippage) × m + commission(entry, q) + commission(exit at stop, q) Size : largest multiple of the step with total loss ≤ budget (rounded DOWN)
Total loss increases with size, even with a minimum commission: the size is found by bisection, then adjusted to the step. Verifiable examples: $25,000, 0.75% risk, $52.40 → $51.80, $0.005 per share ($1 minimum), $0.02 slippage: 297 shares, loss $187.11 (simple division: 312 shares, $196.56). Forex 10,000, 1%, 1.10000 → 1.09800, $7 per lot round turn, 1-pip spread, 0.5-pip slippage: 45,000 units, 99.90 (simple division: 50,000, 111.00). ES futures, 10-point stop, 1 tick of slippage, $4.50 round turn: $517 per contract.
Rounding and precision
Calculations use the browser's standard decimal precision; display is rounded (2 decimals for amounts, up to 6 for prices and sizes). Size is always rounded down.
Limits
- The slippage entered is an estimate: real execution can differ. A stop does not guarantee the exact price: in a gap or fast market, the loss can exceed the calculation.
- The conversion rate is the one you enter; it is not updated.
- The result excludes taxes, and borrow fees or margin interest unless entered under "Other fees".
- Past performance does not guarantee future results.
- Educational and analytical tools: they calculate the consequences of the inputs you choose and are not personalised investment advice.
How these tools are checked
Each formula is covered by hand-calculated numeric tests (including every example above) and by property tests on hundreds of random cases: net P&L is zero at the break-even price, the loss never exceeds the budget, and one more step would exceed it. Any reported error is fixed, documented on this page and turned into a permanent test.