Educational guide
How position size relates to risk
For a fixed amount of money at risk, a wider stop means a smaller position. The calculator does that division. It does not choose the stop.
Lot size feels like the decision. In a risk-based approach it is the output. The inputs are the cash amount a single idea is allowed to lose, the distance from entry to stop in pips, and the money value of one pip. Leave any of those out and the lot size is a guess about the loss.
One relationship
Cash at risk equals the account balance times the fraction you set aside for the idea. The loss if the stop is dealt is the number of pips times the pip value of the whole position. Set those equal to each other and rearrange. Lots equal cash at risk divided by stop pips times the pip value of one lot.
Hold the cash still and move the stop further away. The position has to shrink, or the same pip value would lose more than the cash you named. Hold the stop still and double the pip value, which is what happens if you double the contract, and the loss doubles too. The position-size tool runs this with the pip rules used everywhere else on the site: 100,000, 10,000, and 1,000 unit lots, a pip of 0.0001, and 0.01 for yen quotes. If the account currency is not the quote currency, you type the conversion. The tool marks that rate as yours.
A hypothetical, then a limit
An account of 10,000, one percent at risk, a stop 20 pips away, and a pip worth 10 in the account currency, puts 100 at risk and points at 0.5 lots. Those inputs are round numbers for the arithmetic. They are not a suggested account, a suggested stop, or a live pip value from a dealing ticket. Change the stop to 50 pips and the same cash points at 0.2 lots. The only thing that changed is the distance.
The formula assumes the stop is filled at the price you used. Slippage, a gap, and any financing charge sit outside it. Margin is a different question: it asks how much collateral the notional requires, not how much you decided you could lose. A position can be small on the risk worksheet and still large as a notional if the leverage is high. The margin lesson keeps that distinction, and it does not recommend a leverage.