Leverage is a feature offered by Forex brokers which helps traders to trade the larger amounts of currency pairs through having a smaller account balance.
In our example, the account leverage is 1:500, you can buy 500USD by paying 1USD.
Therefore, to buy 100,000USD (one lot), you should pay only 200USD (100 000/500).
Margin is the amount of the money that is used to open a position or trade and it is calculated based on the leverage. In other words, it is the amount of money that gets involved in a position as collateral.
This money is locked until the position is closed.
The formula is:
Margin = (Price symbol x Volume) / Leverage
Our example: Margin = (1.16620 x 100 000) / 500 = 233.28 USD