FrançaisEnglish

Methodology: formulas, assumptions and limits

Formulas, conventions, assumptions and limits of the TrueLedger calculators: net P&L, break-even, position size, commissions, conversions and rounding.

Last updated: 25 October 2026 (v2: stocks, forex, futures and crypto modes; commission structures; per-order minimum; currency conversion).

Principles

Conventions by market

MarketSizeValue of a 1.0 price moveCommission options
Stocks / ETFshares1 × conversion rateper share per order (with minimum), %, flat
Forexlots entered, converted to units (1 standard lot = 100,000)1 × quote-to-account rateper lot round turn (÷ 2 per order), %, flat
Futurescontractstick value ÷ tick sizeper contract round turn (÷ 2 per order), flat
Cryptocoins1 × 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

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.

Free tools