How to Calculate Margin
The margin formula, worked examples at different leverage levels and instruments, and how used margin, free margin and margin level interact.
- Author
- JDGlobalFX Research
- Published
- Updated
- Updated
- Reading time
- 5 min read
Margin is the portion of your account balance that the broker sets aside as collateral when you open a leveraged position. It is calculated as (lots × contract size × price) ÷ leverage, and the result determines how much of your equity is locked while the position is open. Understanding the calculation, and the related figures of free margin and margin level, tells you how much exposure your account can support and how far the market can move against you before a margin call or stop-out. This guide works through the arithmetic with examples.
The margin formula
Required margin = (lots × contract size × price) ÷ leverage
- Lots is the trade volume.
- Contract size is the number of units in one lot: 100,000 for a standard forex lot, but different for metals, indices and commodities, so check the symbol specification.
- Price is the current market price of the instrument.
- Leverage is the ratio applied to the account or instrument, such as 1:30, 1:100 or 1:500.
The product of the first three terms is the notional value of the position, expressed in the quote currency. Dividing by leverage gives the margin in that same currency. If your account is in a different currency, the platform converts it at the current rate. Leverage and margin requirements are set by the broker within regulatory limits and can vary by instrument and account type; check JDGlobalFX's published trading conditions on the trading accounts page for the figures that apply to you.
Worked examples
One lot of EUR/USD at different leverage levels
EUR/USD at 1.1000, 1.00 lot, contract size 100,000.
- Notional value = 1.00 × 100,000 × 1.1000 = 110,000 USD
The margin required depends entirely on leverage:
| Leverage | Calculation | Required margin |
|---|---|---|
| 1:30 | 110,000 ÷ 30 | 3,666.67 USD |
| 1:50 | 110,000 ÷ 50 | 2,200.00 USD |
| 1:100 | 110,000 ÷ 100 | 1,100.00 USD |
| 1:200 | 110,000 ÷ 200 | 550.00 USD |
| 1:500 | 110,000 ÷ 500 | 220.00 USD |
The position's exposure to price movement is 110,000 USD in every row. Only the collateral changes. Higher leverage means a smaller margin requirement and a larger share of the account left as free margin, which is precisely why it can lead to overexposure if position size is not controlled separately. See what is leverage.
Smaller sizes
Margin scales linearly with volume. At 1:100 on EUR/USD at 1.1000:
- 0.10 lot: (0.10 × 100,000 × 1.1000) ÷ 100 = 110 USD
- 0.01 lot: (0.01 × 100,000 × 1.1000) ÷ 100 = 11 USD
- 2.50 lots: (2.50 × 100,000 × 1.1000) ÷ 100 = 2,750 USD
A pair where USD is the base currency
For USD/JPY at 147.00, 1.00 lot, 1:100 leverage:
- Notional = 1.00 × 100,000 × 147.00 = 14,700,000 JPY
- Margin = 14,700,000 ÷ 100 = 147,000 JPY
- Converted to USD at 147.00 = 1,000 USD
A shortcut for pairs where USD is the base currency on a USD account: margin = (lots × 100,000) ÷ leverage, because the notional in USD is simply the number of base units. The full formula gives the same answer after conversion.
A non-forex instrument
Gold is commonly quoted per troy ounce with a contract size of 100 ounces per lot, though this varies by broker. At a price of 2,400 USD, 1.00 lot, 1:100 leverage:
- Notional = 1.00 × 100 × 2,400 = 240,000 USD
- Margin = 240,000 ÷ 100 = 2,400 USD
Indices, oil and other CFDs each have their own contract sizes and often their own leverage limits. Always read the specification before assuming the forex figures apply.
Used margin, free margin and margin level
Once positions are open, the platform reports three related figures.
Used margin is the sum of the required margin for all open positions. Some brokers apply a reduced requirement for hedged positions in hedging mode; the specification states the treatment.
Free margin = equity − used margin, where equity = balance + floating profit or loss. Free margin is what remains available to open new positions or to absorb losses on existing ones.
Margin level = (equity ÷ used margin) × 100, expressed as a percentage. It is the figure brokers use to trigger margin calls and stop-outs.
Consider an account with a 5,000 USD balance that opens 1.00 lot of EUR/USD at 1.1000 with 1:100 leverage:
| Stage | Floating P/L | Equity | Used margin | Free margin | Margin level |
|---|---|---|---|---|---|
| Position opened | 0 | 5,000 | 1,100 | 3,900 | 454.5% |
| Price falls 100 pips | −1,000 | 4,000 | 1,100 | 2,900 | 363.6% |
| Price falls 200 pips | −2,000 | 3,000 | 1,100 | 1,900 | 272.7% |
| Price falls 400 pips | −4,000 | 1,000 | 1,100 | −100 | 90.9% |
Note that used margin stays constant while the position is open; it is equity that moves. When free margin turns negative, no new positions can be opened, and if the margin level falls below the broker's stop-out threshold, the platform begins closing positions automatically, typically starting with the largest loss. The thresholds are published in the account specifications and the risk disclosure.
Margin call and stop-out
A margin call is a warning that margin level has fallen below a published level, for example 100%. A stop-out is the level, for example 50%, at which the broker closes positions to prevent further losses. In the example above, a 50% margin level corresponds to equity of 550 USD, which would require a loss of 4,450 USD, or 445 pips on one lot.
The important insight is that the stop-out is a function of position size relative to account size. A trader holding 0.10 lot on the same account would need a 4,450-pip move to reach the same point. Managing margin is therefore mostly a matter of managing size, which is why how to calculate position size should be read alongside this guide.
Margin is a constraint, not a sizing tool
The margin requirement tells you the minimum equity needed to hold a position. It says nothing about whether that position is an appropriate size for your risk tolerance. A 5,000 USD account at 1:500 could technically hold several lots of EUR/USD, but a 50-pip adverse move on 5 lots is 2,500 USD, half the account. Size positions from your risk per trade, then confirm the margin is comfortably available. If used margin is consuming more than a modest fraction of equity, the account is overexposed regardless of what leverage permits.
The margin calculator returns the requirement for any instrument, volume and leverage in your account currency, and it is worth checking before every trade until the figures are intuitive.
Key takeaways
- Required margin = (lots × contract size × price) ÷ leverage, in the quote currency, converted to your account currency.
- Higher leverage lowers the margin requirement but does not change the position's exposure to price movement.
- Contract size varies by instrument; check the specification before calculating for metals, indices or commodities.
- Free margin = equity − used margin; margin level = (equity ÷ used margin) × 100.
- Margin calls and stop-outs are triggered by margin level falling below the broker's published thresholds.
- Use margin as a constraint to check after sizing by risk, never as the basis for choosing size.
Frequently asked questions
Educational content — not financial advice
This article is provided for general educational purposes only and does not constitute investment advice, a recommendation or an offer to trade any financial instrument. It does not take into account your objectives, financial situation or needs. Trading leveraged products involves significant risk of loss. Consider seeking independent advice before making any trading decision.
- #margin
- #leverage
- #forex basics
- #calculators