Skip to content
AlgoVerdict
Menu

Free calculator · As of 8 Nov 2026

Margin calculator for forex and CFDs

How much capital does a position tie up, and how far can price move against you before the broker closes it? The calculator shows margin, free margin, margin level and the largest position that fits your buffer.

Sets contract size (forex 100,000, gold 100 oz, index CFD 1), an example price and leverage. Everything stays editable; your broker’s symbol specification is what counts.

In MetaTrader: right-click the symbol, Specification, “Contract size”. Index CFDs: often 1, sometimes 10 or 0.1.

Current price of the symbol. Preset prices are examples, not live quotes.

30 = 1:30. What counts is the leverage for this symbol, not the account leverage.

Account & broker

Labelling only.

1 if the symbol is quoted in your account currency (EUR/USD, gold in USD on a USD account). EUR/USD on an EUR account: 1 / EUR/USD price.

Balance plus open profit/loss. Leave empty if you only need the margin.

For “max lots”: the minimum buffer you want to keep.

EU retail clients: 50% (margin close-out rule). Otherwise as your broker states.

Result

Required margin
3,666.67 USD

Notional 110,000.00 USD · effective leverage on the account 11.0 : 1

Margin per 1.00 lot
3,666.67 USD
Free margin
6,333.33 USD
Margin level
272.7%
Max lots at target level
0.90

so the margin level is at least 300% when the position opens

Adverse move to stop-out
0.08167

Equity at stop-out: 1,833.33 USD · ≈ 7.4% of the price

All results are pure formulas from your inputs, calculated in your browser. Nothing is stored or sent. The calculators are for guidance only and are not investment advice; trading involves significant risk of loss.

How the calculator works

Margin is the collateral your broker blocks for an open position. For forex and linear CFDs it is the notional value of the position divided by the leverage: lots × contract size × price, converted into your account currency, divided by the leverage. 1 lot of EUR/USD is 100,000 euros notional, so at 1:30 it takes about a thirtieth of that.

With your equity (balance plus open profit and loss) the calculator goes further: free margin is what is left after the position, the margin level is equity divided by margin in percent, as in MetaTrader. When the margin level falls to the stop-out value, the broker closes positions by force. The calculator shows which adverse price move gets you there and how many lots you can open at most without falling below your target margin level.

Formulas

Notional
N = lots × contract size × price × conversion rate
Required margin
M = N / leverage
Free margin
equity − M
Margin level
equity / M × 100%
Max lots at target level
equity / (target % / 100) / margin per lot (rounded down)
Adverse move to stop-out
(equity − M × stop-out %) / (lots × contract size × conversion rate)

Assumptions and limits

  • One leverage per symbol and one position. Many brokers tier margin by position size or raise it before weekends and news. Add the margin of other open positions on the account yourself.
  • Hedging accounts: for opposite positions on the same symbol some brokers apply a reduced margin (shown as “Hedged margin” in the MT5 symbol specification). The calculator counts one direction only.
  • EU retail clients: since ESMA’s 2018 product intervention, in Germany without an end date since BaFin’s general ruling of 23 July 2019, maximum leverage is 30:1 for major currency pairs, 20:1 for other currency pairs, gold and major indices, 10:1 for other commodities and indices, 5:1 for shares and 2:1 for cryptocurrencies, plus a margin close-out at 50% of the margin. Professional clients and accounts with entities outside the EU can have other values. A general rule, not legal advice; your contract is what counts.
  • The move to stop-out ignores spread, commission, swap and slippage and keeps the margin constant. On gaps price jumps past the stop-out.
  • Presets for forex (100,000), gold (100 oz) and index CFDs (1 per point) are typical example values with example prices. Contract size and leverage are listed in your broker’s symbol specification.

Sources (As of 8 Nov 2026)

Worked example

  1. Worked example with example values: 1 lot of EUR/USD at 1.10 on a USD account, leverage 1:30, equity 10,000 USD, target margin level 300%, stop-out 50%.
  2. Notional: 1 × 100,000 × 1.10 = 110,000 USD. Margin: 110,000 / 30 = 3,666.67 USD. Free margin: 6,333.33 USD. Margin level: 10,000 / 3,666.67 = 272.7%. The effective leverage on the account is 11 : 1.
  3. Largest position for a 300% margin level: 10,000 / 3 / 3,666.67 = 0.909, rounded down to 0.90 lots. With the full lot you are already below your target when the trade opens.
  4. Stop-out at 50% is reached at 1,833.33 USD equity. Until then price can move 8,166.67 / 100,000 = 0.0817 against you, about 817 pips or 7.4%. For comparison gold, 0.5 lot at 2,500 and 1:20: 6,250 USD margin, margin level 160%, stop-out after a 137.50 USD adverse move (5.5%).

Frequently asked questions

How is margin calculated in forex trading?

Margin = lots × contract size × price / leverage, converted into your account currency. 1 lot of EUR/USD at 1.10 and 1:30 needs 110,000 / 30 = 3,666.67 USD on a USD account. The contract size is in your broker’s symbol specification, for forex usually 100,000 units.

What is the margin level?

The ratio of equity to used margin in percent. 10,000 USD equity and 3,666.67 USD margin give 272.7%. The lower the value, the smaller the buffer. MetaTrader shows it in the Toolbox window, Trade tab.

What happens at a margin call and at stop-out?

At the margin call level the broker warns you; at the stop-out level it closes positions by force, usually the one with the largest loss first. For EU retail clients the margin close-out is at 50% of the margin. The calculator shows how far price can move before that.

What leverage applies to retail clients in the EU?

At most 30:1 for major currency pairs, 20:1 for other pairs, gold and major indices, 10:1 for other commodities and indices, 5:1 for shares and 2:1 for cryptocurrencies. This goes back to ESMA’s 2018 measures; in Germany it has applied without an end date since 2019 under a BaFin general ruling. Sources are listed on this page.

Does more leverage mean more risk?

Not directly. Leverage only decides how much margin is tied up. The risk comes from position size and the distance to the stop-loss. High leverage does allow larger positions on the same equity and shrinks the distance to stop-out. Size your lots by risk per trade instead.

Why does MetaTrader show a different margin than the calculator?

Because the broker may use margin tiers, a hedged margin, its own leverage per symbol or a different calculation mode (for futures or shares, for example). Compare contract size and leverage with the symbol specification and use the actual conversion rate of your account currency.