Margin is the amount of funds required to open and maintain a trade. The calculation depends on the instrument, position size, leverage, and account currency. Different instruments have different formulas:
Forex:
Margin = (Trade Size (Lots) × Contract Size) / Leverage
Example: 1 standard lot of EURUSD with 1:100 leverage requires 1,000 USD.
Commodities / Metals: Margin is usually calculated based on the contract size of the product, its current market price, and the leverage applied.
Indices / Futures CFDs: Margin depends on the contract value, which may be fixed per point, multiplied by position size, then divided by leverage.
Shares / Stock CFDs: Margin is typically a percentage of the trade value, depending on the required margin rate for that stock.
Most trading platforms, like MT4/MT5, calculate the required margin automatically before you place a trade, so you can see the exact amount needed for your position.