How to Calculate the Margin for a CFD Trade
CFD margin equals position value divided by leverage. Worked examples for a currency pair and a share CFD, and what changes the margin you need.
The CFD margin calculation is simple: required margin = position value ÷ leverage, which is the same as position value × margin rate. A position worth $110,000 at 30:1 needs about $3,667 in margin; a $15,000 share position at 5:1 needs $3,000. Margin is converted into your account currency if the market is priced in another one.
The formula
Position value = position size × current price
Required margin = position value ÷ leverage = position value × margin rate
Leverage of 30:1 equals a margin rate of 3.33%; 20:1 equals 5%; 5:1 equals 20%; 2:1 equals 50%.
Worked example 1: a currency pair
- EUR/USD at 1.1000
- Position: 1 standard lot (100,000 euros)
- Leverage: 30:1 (example value)

Figure: Position value vs required margin at 30:1 (example values).
Position value = 100,000 × 1.1000 = $110,000. Margin = $110,000 ÷ 30 = $3,666.67.
Worked example 2: a share CFD
- 100 shares at $150
- Leverage: 5:1 (example value)
Position value = $15,000. Margin = $15,000 ÷ 5 = $3,000.
Worked example 3: a different account currency
Your account is in euros, and you open the share position from example 2: $15,000 at 5:1, requiring $3,000 of margin. At EUR/USD 1.1000, that is about €2,727.27. If the dollar strengthens while the trade is open, the margin in euros rises even if the share price does not move, and any profit or loss is converted the same way.
Worked example 4: an index CFD
An index CFD on a US index trades at 5,000 points, and one contract moves $10 per point. (Example contract.) Position value = 5,000 × $10 = $50,000. At 20:1, margin = $2,500. A 50-point move changes the position’s value by $500, a fifth of the margin.
Worked example 5: gold
You buy 10 ounces of gold at $2,400. Position value = $24,000. At 20:1, margin = $1,200. Contract sizes for gold differ between providers, so check how many ounces one lot represents before calculating. See gold lot sizes and margin.
Worked example 6: a crypto CFD
You buy 0.5 BTC at $60,000. Position value = $30,000. At 2:1, margin = $15,000, half the position. Crypto’s lower leverage cap means far more capital is tied up per dollar of exposure than in currency trades.
How margin moves with price
Return to example 1: one lot of EUR/USD at 1.1000 needs $3,666.67. If the pair rises to 1.1200, the position is worth $112,000 and margin at 30:1 becomes about $3,733.33. On a winning long, margin rises along with the profit; on a losing long, it falls slightly as the loss grows. The changes are small compared with the profit or loss itself, but they matter in accounts close to their limits.
Things that change the number
- Price moves: margin is recalculated as the position’s value changes.
- Account currency: a euro account trading a dollar market converts at the current rate.
- Tiered margin: larger positions may need higher margin rates.
- Provider rules: some charge more than the regulatory minimum in volatile markets.
Why margin is not your risk limit
Margin sets how much you must deposit, not how much you can lose. On the currency example, a 1% move is $1,100, almost a third of the margin. Size positions by the loss you can accept. See how to size a CFD position using risk per trade, what margin is in CFD trading and what leverage is in CFD trading.
Leverage, margin and cost figures in this article are example values for illustration. Actual terms depend on the provider, the instrument and the rules in your country.
This article is educational content and does not constitute financial, investment, legal or tax advice. Digital assets are volatile and you may lose the amount you invest.
Tiered margin for larger positions
Many providers apply higher margin rates as a position grows, because large positions are harder to close quickly. For example, a provider might charge the standard rate on the first part of a position and a higher rate above a set size. (Illustrative.) Large traders should check the tier table for each instrument rather than assuming a single rate applies throughout.
Frequently asked questions
Does the platform calculate margin for me?
Yes. Trading platforms show the required margin before you confirm an order. Calculating it yourself helps you plan position sizes and understand why the number changes.
Is margin calculated on the bid, the ask or the mid price?
It depends on the provider. Differences are usually small, but they explain why your own calculation may not match the platform’s exactly.
Margin for a whole account
Most accounts hold more than one position, and margin adds up across them. Suppose an account of $20,000 holds the EUR/USD trade from example 1 ($3,666.67), the index trade from example 4 ($2,500) and the gold trade from example 5 ($1,200). Total used margin is about $7,366.67, roughly 37% of the account. The rest, about $12,633, is free margin available to absorb losses across all three positions. Watching total used margin as a share of equity is a simple way to keep the whole account within limits you set in advance.
Using margin to plan, not to maximize
The margin calculation tells you how many positions an account could hold; it does not tell you how many it should. A useful habit is to set a ceiling on total used margin, for example a third or a quarter of equity, and treat the calculation as a check against that ceiling. Positions that would push the account above it are a signal to reduce size or wait, regardless of how many the platform would accept. Combined with sizing each trade by risk, this keeps margin calls rare rather than routine.
A quick reference for common ratios
At 30:1, divide the position value by 30; at 20:1, by 20; at 10:1, by 10; at 5:1, by 5; at 2:1, by 2. Converting to a percentage gives the margin rate: 3.33%, 5%, 10%, 20% and 50%. Keeping these few numbers in mind makes it easy to sanity-check the platform’s figure before confirming any order. If the two figures differ by much, check the contract size and the account currency.