Position size calculator

This position size calculator reverses the usual beginner's approach. Instead of picking a size and hoping, you decide first how much of your account you are prepared to lose if the trade fails, and where the stop-loss belongs. The calculator then tells you how many lots match that risk.
The formula
Units = money at risk ÷ (stop distance in pips × pip value per unit)
Lots = units ÷ 100,000 (or ÷ 100 for gold)
The pip value per unit is the pip size, converted into dollars where needed, exactly as in the pip calculator.
Worked examples
The numbers are illustrative.
EUR/USD. Balance $5,000, risk 2%, stop 40 pips away.
- Money at risk: $5,000 × 2% = $100.
- Pip value per unit: 0.0001 dollars.
- Units: $100 ÷ (40 × 0.0001) = 25,000 units, which is 0.25 lots.
USD/JPY at 150.00. Same balance, risk and stop.
- Pip value per unit: 0.01 yen ÷ 150 = about $0.0000667.
- Units: $100 ÷ (40 × 0.0000667) = about 37,500 units, or 0.375 lots.
The same $100 risk produces different sizes because a pip is worth a different amount on each pair.
How to read the result
The answer is the largest size that keeps your planned loss at the percentage you chose, assuming the stop fills at its level. In fast markets a stop can fill at a worse price, called slippage, so the real loss can be larger. Round the lot size down, not up, and check the margin it needs with the margin calculator.
A small, fixed percentage per trade means a run of losses shrinks the account gradually rather than all at once. What percentage suits you is a personal decision; the calculator only does the arithmetic.
Quick answers
Why size a trade from the stop-loss?
Because the stop distance and the position size together decide how much you lose if you are wrong. Fixing the loss first, then solving for size, keeps each trade's risk consistent.
Does the result include costs?
No. Spreads, commission and financing add to the loss. Allow for them by risking slightly less than your limit.