Margin calculator

Margin calculator formula
This margin calculator converts your position into its value in dollars and divides by the leverage ratio.
Margin level = equity ÷ used margin × 100%
For pairs where the dollar is the base currency, such as USD/JPY, the position value in dollars is simply the number of units: 1 lot is $100,000, so at 30:1 the margin is about $3,333.33 whatever the rate.
Worked example: from margin to close-out
Illustrative figures. You buy 0.5 lots of EUR/USD at 1.1700 with 30:1 leverage.
- Position value: 50,000 × 1.1700 = $58,500.
- Required margin: 58,500 ÷ 30 = $1,950.
- With $2,600 of equity, margin level is 2,600 ÷ 1,950 × 100 ≈ 133%.
- UK and EU providers must begin closing positions for retail clients at a 50% margin level, which here is equity of $975.
- The loss that takes you there is 2,600 − 975 = $1,625. At $5 per pip on 0.5 lots, that is 325 pips.
Gold works the same way with a 100-ounce lot: 0.2 lots at an illustrative $3,000 is $60,000 of exposure and, at the 20:1 cap, $3,000 of margin.
Reading the result
Required margin is collateral, not a cost and not a measure of risk. The risk is set by position size and stop distance, which you can check in the position size calculator. What the margin figure tells you is how much of your balance is tied up and how far the price can move against you before a close-out. Lower leverage means more margin per position and a larger buffer before that point.
Retail caps in the UK and EU are 30:1 on major pairs, 20:1 on minor pairs, gold and major indices, 10:1 on other commodities, 5:1 on shares and 2:1 on crypto. Our forex guide explains how those limits shape position sizes.
Sources
- European Securities and Markets Authority, CFD product intervention measures
- UK Financial Conduct Authority, CFD rules for retail clients