How margin is calculated
Required margin = position value ÷ leverage
Position value = lots × contract size × price, converted to your account currency.
Example
0.10 lots of EUR/USD at 1.0850 is worth $10,850. With 1:100 leverage the margin is about $108.50.
Margin is not your maximum loss
Margin is the deposit your broker holds while the trade is open. Your loss on the trade can be much larger than the margin. Use the position size calculator to control how much you can lose.