How the lot size is calculated
First decide how much money you accept to lose on the trade: a percentage of the balance (usually 0.5โ2%) or a fixed amount.
Then measure the distance between the entry and the stop loss. Multiply it by the contract size and convert it to your account currency: that is what one full lot would lose at the stop.
Divide your risk by that loss per lot. The calculator rounds down to the 0.01 step, so you never risk more than planned.
Lots = Risk amount รท (|Entry โ Stop| ร Contract size ร Conversion rate)
Example: gold (XAUUSD)
USD account of $10,000, risk 1% = $100. Buy gold at 2,400 with the stop at 2,390: a $10 distance. One lot is 100 oz, so the stop would cost $1,000 per lot. $100 รท $1,000 = 0.10 lots.
Questions
How much should I risk per trade?
Most professional traders risk 0.5โ2% of the account per trade. At 1% a run of 10 losses costs about 10%, which you can recover from. At 5% the same run costs about 40%.
Why is the result rounded down?
Brokers accept sizes in steps of 0.01 lots. Rounding down means the real loss at the stop is never more than the risk you planned.
What contract size does my broker use?
Gold is usually 100 oz and forex 100,000 units per lot, but indices vary a lot. Open the symbol specification in MT5 and copy the contract size into the calculator.
Does it include spread and commission?
No. Spread, commission and slippage add to the real loss. Leave a small margin, for example by risking 0.9% instead of 1%.