Position size calculator

The position size calculator reverses the usual question. Instead of asking how much you could make, it asks how much you are willing to lose if your stop-loss is hit, and then tells you how large the position can be. Enter the account balance, the percentage you will risk, the pair and the stop distance in pips.
What formula sits behind it?
Position size (units) = money at risk ÷ (stop distance in pips × pip value per unit)
Lots = units ÷ 100,000 (or ÷ 100 oz for gold)
Pip value per unit is 0.0001 dollars on a USD-quoted pair, 0.01 ÷ price on a yen pair with the dollar as base, and needs a conversion rate for crosses. The calculator fills these in from the pair you choose.
Worked examples
All three use an illustrative $8,000 balance and 1.5% risk, so the money at risk is $8,000 × 0.015 = $120.
- EUR/USD with a 40-pip stop: pip value is $10 per lot, so 120 ÷ (40 × 10) = 0.30 lots.
- USD/JPY at 150.00 with a 40-pip stop: one pip on a lot is ¥1,000, or 1,000 ÷ 150 = $6.67. So 120 ÷ (40 × 6.67) ≈ 0.45 lots.
- XAU/USD with a $6.00 stop: that is 600 pips of $0.01, worth $6 per ounce. So 120 ÷ 6 = 20 oz, or 0.20 lots.
Same risk, same stop in pips, three different sizes: the pip value decides it.
How do I use the answer?
Round the result down to the nearest size your provider accepts; rounding up quietly raises the risk above what you chose. Place the stop where the trade idea would be proven wrong, then let the calculator set the size, rather than squeezing the stop to fit a size you had in mind.
The risk figure is before costs. Spread and slippage on the stop can make the actual loss larger, especially around news, and a stop is not guaranteed unless your provider sells a guaranteed stop. Many traders keep risk per trade to a small percentage of the account so that a run of losses does not end their ability to continue, but the right figure is a personal decision.
After sizing, check the collateral in the margin calculator. A position can fit your risk limit and still need more margin than you want to commit. The pip calculator shows the pip value on its own, and trading fees explained covers the costs to add.