1nTest · strategy backtester and trading bot builder

Margin calculator

How much margin a position locks at your leverage — for forex, metals, indices, oil and crypto, in any account currency.

Find an instrument
Instrument
Account currency
Lots
Leverage
1:
Entry

XAUUSD now: 3724.39 / 3724.89 (bid / ask, IC Markets, November 18, 2026 at 09:44 PM UTC). 1 pip = 0.01. Profit currency: USD.

Margin required
3,724.64USD
Position value
372,464.00 USD
Does the strategy itself have an edge?

Build the entry conditions without code and test them on years of history: the result in R, losing streaks, drawdown — before you risk the account.

Run a backtest

How it is calculated

Margin = position value ÷ leverage. For a currency pair the position value is the contract in the base currency (1 lot EURUSD = €100,000), converted into your account currency; for gold, indices and oil it is contract size × price in the profit currency.

Brokers often set lower leverage for indices, metals and crypto than for major pairs, and some use their own margin tables. Set the leverage your broker gives for this instrument; the calculator then matches its margin mode for CFDs and forex.

Questions

What happens if free margin runs out?

At the broker's margin call level you cannot open new positions; at the stop-out level the platform starts closing positions, the largest loss first. Margin is not the risk of the trade — the stop-loss is.

Does higher leverage increase the risk?

Not by itself: the risk of a trade is the distance to the stop times the position size. Higher leverage only lets you open a larger position with the same deposit, which is where the danger is.

Why is margin in a JPY pair counted in dollars?

Margin is held in your account currency. The base currency of the pair (USD in USDJPY) is converted into it at the current rate.

Put this calculator on your site

Free, no registration. Copy the code into your page:

<iframe src="https://1ntest.com/en/embed/margin" width="100%" height="760" style="border:0;max-width:960px" loading="lazy" title="1nTest"></iframe>

For education. The figures are measured for one commission-charging broker at the reference date and are not a quote; your broker's conditions may differ.

← All calculators