How can I calculate the margin?

Simply use the Trading Calculator tool, or calculate the margin by yourself according to the formula.

The formula to calculate the margin is:

<Margin> = <Contract size> / <Leverage>

Contract size - the order volume in the base currency of the trading asset (the first currency in the ticker). The order volume of 1 lot for all currency pairs is always equal to 100,000 units of the instrument base currency.
Leverage - the leverage value.

Calculation example:

You open a long position of 1 lot in EURUSD with the leverage value 1:20.

<Margin> = 100,000 / 20 = 5,000 EUR

If your account currency is USD, but not EUR, you have to convert the margin amount into your account currency. To do this, multiply it by the current rate of EURUSD (1.2345).

<Margin> = 5,000 * 1.2345 = 6,172.50 USD