Tips cover: One formula, three markets
Tips

How to calculate margin for a CFD or perp trade: three worked examples

Updated November 2026

Updated November 2026

How to calculate margin, in trading, has nothing to do with a profit margin. Trading margin is the deposit that opens a leveraged position, and it comes from one formula. This page shows how to calculate margin in forex, how to calculate CFD margin on a stock index, and how the same sum works on a bitcoin perpetual, at three leverage levels, with the free margin left afterwards.

On Ouinex, forex and stock indices are traded as CFDs, and crypto derivatives as perpetual contracts, so you speculate on the price without owning the asset. Trading leveraged products carries a high risk of loss: leverage amplifies both gains and losses.

How do you calculate margin? The formula

Margin is the notional value of a trade divided by its leverage. A 0.1-lot EUR/USD position worth $11,200 needs $1,120 of margin at 1:10 and $560 at 1:20.

  • Notional value = position size × price (× the value of one point, for an index contract)
  • Margin = notional value ÷ leverage
  • Margin rate = 1 ÷ leverage, so 1:10 is 10% and 1:20 is 5%

Margin is a deposit, not a cost. It is set aside while the position is open and released when it closes, less any loss. The general idea is in the glossary entry on margin in trading; this page is the arithmetic. For the platform side, see how margin works on Ouinex.

Three worked examples at three leverage levels

The prices are round numbers close to early-November 2026 levels: EUR/USD at 1.1200 (the euro reference rate was 1.1165 on 6 November), the S&P 500 at 7,400 (it closed at 7,353.73 on 5 November) and bitcoin at $75,000 ($75,239.55 on 8 November). The index contract size of $1 per point is illustrative too.

Trade

Notional value

Margin at 1:5

Margin at 1:10

Margin at 1:20

A 1% move against you

Trading cost on the same notional

EUR/USD CFD, 0.1 lot (10,000 EUR) at 1.1200

$11,200

$2,240

$1,120

$560

$112: 5%, 10% or 20% of the margin

Spread only: each 0.0001 (one pip) of spread costs $1

S&P 500 index CFD, 2 contracts at 7,400, $1 per point

$14,800

$2,960

$1,480

$740

$148: 5%, 10% or 20% of the margin

Spread only: each index point of spread costs $2

BTC perpetual, 0.1 BTC at $75,000

$7,500

$1,500 (5x)

$750 (10x)

$375 (20x)

$75: 5%, 10% or 20% of the margin

0.045% fee: $3.38 on $7,500; in this example it is charged on opening and again on closing, $6.75 round trip

Read the last column first. It does not change across the three leverage columns, because spreads and fees are charged on the notional value, not on the margin. Leverage changes the deposit, not the cost of the trade. Zero commission on forex, stock indices and commodities: you pay the spread. Crypto perpetuals are 0.045%. See the fee charged on each Ouinex market.

Each row has one detail of its own:

  • Forex: EUR/USD is quoted in dollars per euro, so the notional value comes out in dollars. If your account is held in another currency, the margin is converted at the current rate.
  • Index CFD: the notional value is contracts × value per point × index level. The value per point differs between instruments, so read it from the instrument details before you calculate.
  • Perpetual: the position is valued at a mark price rather than the last traded price, so both the margin and the running gain or loss follow the mark price.

The 1% column is the risk side of the same table. At 1:20, a 5% move against the position uses up the whole margin before any fee is counted, and the position can be closed before that point. CFD and crypto perpetual trading involves risk of loss.

The three levels show the arithmetic only. They are illustrative, not the leverage available on every Ouinex market, and not a suggestion of which to use. Check the leverage and margin terms on Ouinex before you open a position.

How to calculate free margin and margin level

Two more lines turn used margin into a picture of the whole account. This is how to calculate free margin in forex and on any other leveraged market, and how to calculate margin level:

  • Free margin = equity − used margin
  • Margin level = equity ÷ used margin × 100

Worked example. An account has $3,000 of equity and one open position: the 0.1 BTC perpetual above at 10x, so used margin is $750. Free margin is $2,250 and the margin level is 400%.

Bitcoin then falls 5%. The position loses $375, so equity drops to $2,625. The notional value is now $7,125, and margin at 10x on that is $712.50. Free margin is $1,912.50 and the margin level is about 368%. Platforms differ on whether used margin follows the current price or stays at its opening value; with used margin held at $750, free margin would be $1,875 and the margin level 350%. Check which method your account uses before relying on either figure.

When the margin level falls far enough, a margin call and then a stop-out follow. Check the margin-call and stop-out levels on Ouinex before you trade. The mechanics are covered in free margin and margin calls.

Isolated or cross margin. The formula is the same in both modes. What changes is which funds back the position: in isolated mode only the margin assigned to that position, in cross mode the whole available balance. The mode changes what is at risk, not the arithmetic.

What changes the margin on an open trade

  • Price: the notional value moves with the price, and the margin required moves with it.
  • The leverage setting: higher leverage lowers the margin required, and a smaller move then uses it up.
  • Position size: adding to a position raises the margin; closing part of it lowers it.
  • Currency conversion: when the instrument and the account use different currencies, the margin changes as the exchange rate does.
  • Margin mode: isolated or cross, as above.
  • Mark price: for perpetuals, both the margin and the running gain or loss follow the mark price.

Dated futures add one more step: gains and losses are settled each day as variation margin, so a futures variation margin calculation is the day's price change × position size. That is covered in how to trade futures.

FAQ: margin calculation questions

How do you calculate margin in forex?

Multiply the position size by the exchange rate to get the notional value in the quote currency, then divide by the leverage. 10,000 EUR of EUR/USD at 1.1200 is $11,200 of notional value; at 1:20 the margin is $560. If your account is in another currency, convert the result at the current rate.

Is margin the same as the cost of a trade?

No. Margin is a deposit set aside while the position is open, and it comes back when the position closes, less any loss. The cost is the spread or fee, charged on the full notional value. In the table above, the cost is the same at 1:5 and at 1:20; only the deposit changes.

How is margin calculated on a CFD?

Work out the notional value first: number of contracts × value per point × price. Then divide by the leverage. Two S&P 500 contracts at 7,400 with $1 per point are $14,800 of notional value, so margin is $1,480 at 1:10. The value per point is set per instrument, so check it before you calculate.

What is the difference between margin and leverage?

Leverage is the ratio between the position and the deposit; margin is the deposit itself. They are two views of one number: 1:20 leverage means a 5% margin rate, so $560 of margin controls $11,200 of EUR/USD. Higher leverage means a smaller deposit and less room before a move uses it up.

How do I find my liquidation price?

Read it from the platform, not from a hand calculation. The liquidation price depends on the margin mode, the mark price, the fees and the account's other positions, so the platform's own estimate is the figure to use. The 1% column in the table shows the scale: at 1:20, a 5% move uses up the margin.

Conclusion

Margin is notional value divided by leverage, and that one line covers a forex pair, an index CFD and a crypto perpetual alike. The worked examples show the part that is easy to miss: leverage changes the deposit, not the cost. The spread or fee is charged on the full notional value whichever leverage you choose, while a 5% move at 1:20 uses up the whole deposit.

Before you add a position, check the free margin it leaves and the margin level after it. Trading leveraged products carries a high risk of loss. To see what each market costs on the same notional value, check the rate for your market on the Ouinex fees page.

Sources

  1. European Central Bank: euro reference exchange rate, US dollar (1.1165 on 6 November 2026)
  2. Federal Reserve Bank of St. Louis (FRED): S&P 500, daily close, source S&P Dow Jones Indices (7,353.73 on 5 November 2026)
  3. Federal Reserve Bank of St. Louis (FRED): bitcoin in US dollars, daily, series CBBTCUSD (75,239.55 on 8 November 2026)
‹ Back to Ouinex Blog