How is Margin calculated on MT4?

The formula is as follows:

Lots x Contract Size x Margin%,

or, (Lots x Contract Size) / Leverage


You can find all Contract Sizes, by right-clicking on any Symbol through MT4's market watch and then 'Specification'


Important Note: Margin is always denominated in the Base Currency

Symbol
Base Currency
Quote Currency
EURUSD
EUR
USD
USDJPY
USD
JPY
GBPUSD
GBP
USD


Examples:

If you wish to Buy 1 lot on EURUSD with a margin percentage of 0.2%, then:


Margin Requirement = 1 (Lot) x 100,000 (Contract Size) x 0.2% =200 EUR


If you wish to Buy 1 lot on USDJPY with a leverage of 1:500, then:


Margin Requirement = 1 (Lot) x 100,000 (Contract Size) / 500 =200 USD


The final amount depends on your account's currency.

If your account is in a different currency than the base currency of your traded instrument, then a conversion will happen to reflect the appropriate margin.