How to use the margin and leverage calculator
- Choose the market. Pick Forex for currency pairs, or Other markets for stocks, crypto and futures.
- Enter your account currency and balance. Every result is in the account currency.
- Describe the position. For forex, pick the pair, enter the lots and the leverage. For other markets, enter the price, the units, the contract multiplier and the leverage. Enter leverage as the X in 1:X, so 30 means 1:30.
- Check the price of the base currency (forex only). Forex margin is charged on the base currency of the pair. If your account is not in that currency, the calculator needs to know what one unit of it is worth in your account currency. For EUR/USD on a dollar account that is the EUR/USD price itself. Leave the field empty to use the latest ECB reference rate, or type your broker's price for an exact figure.
- Enter your broker's margin call and stop-out levels. The defaults, 100% and 50%, are placeholders. Replace them with the levels in your account terms.
You get the margin required, the free margin, the margin level, the effective leverage, and the loss at which each of your two levels is reached. Three pictures show the same thing: how the balance splits into margin and free margin, how far equity can fall, and how the margin changes with leverage.
The margin formula
Margin is the position's value divided by the leverage. Everything else follows from it:
position value = lots × contract size × price of the base currency forex
position value = price × units × multiplier other markets
margin required = position value ÷ leverage
free margin = balance − margin required
margin level = equity ÷ margin required × 100
effective leverage = position value ÷ balance
loss to a level = balance − margin required × level ÷ 100
The contract size of a standard forex lot is 100,000 units of the base currency. Equity is your balance plus the floating profit or loss of open trades. At the moment you open the position nothing has moved yet, so equity equals the balance. The level in the last line is your margin call level or your stop-out level, as a percentage.
The last line is the heart of the calculator. Equity can fall until the margin level reaches the broker's threshold, and the loss that gets it there is the balance minus the equity the threshold allows.
Worked example
You have a $10,000 account and open 1 lot of EUR/USD with leverage of 1:30. One euro is worth $1.0850. Your margin call level is 100% and your stop-out level is 50%. Those are the defaults in the calculator above.
For a long position that move is a fall from 1.0850 to about 1.0031, roughly 819 pips. A trader with a sensible stop loss would have been stopped out long before the price got there, and the broker would have closed the position first, which is the point of the next sections.
Margin level, margin call and stop-out
The margin level is equity divided by the margin in use, as a percentage. MetaTrader reports it the same way. A level of 276.5% means your equity is 2.765 times the margin the broker is holding.
Two thresholds sit below it. A margin call is the warning level. When the margin level falls to it, the broker flags the account, may stop you opening new positions or asks for more funds. A stop-out is the lower level at which the broker starts closing positions, normally the most unprofitable one first, until the margin level recovers.
Brokers choose these levels themselves, and they vary by broker and by account type. Some platforms express them as a percentage, as this calculator does. Others set them as an amount of money in the account currency. The calculator's 100% and 50% are placeholders. Read your broker's account terms and enter what they say.
Leverage sets the margin, not the risk
Leverage controls how much of your money a broker holds against a position. It does not change how much the position gains or loses. The same 1 lot of EUR/USD costs $3,616.67 of margin at 1:30 and $217.00 at 1:500, and a one pip move is worth the same $10 in both cases. The line chart in the calculator shows this curve, and it flattens quickly: going from 1:100 to 1:500 frees very little extra margin compared with going from 1:5 to 1:30.
The number to watch is the effective leverage, the position value divided by your balance. In the example it is 10.85, whatever the broker's maximum is. High leverage on offer tempts traders to open positions their balance cannot carry through an ordinary drawdown.
Regulators cap the leverage retail clients can use. In 2018 ESMA set limits for retail CFDs of 30:1 for major currency pairs, 20:1 for non-major pairs, gold and major indices, 10:1 for other commodities, 5:1 for individual shares and 2:1 for cryptocurrencies. Other regions and professional accounts have different limits, and rules change, so your broker's terms are the authority for your account.
Futures work differently. An exchange sets a margin per contract and changes it when volatility changes, and your broker may ask for more. To use this calculator for a futures contract, enter the contract's value as the position and divide it by the margin your broker asks to get the leverage. A contract worth $250,000 with $12,500 of margin is 20 times leveraged.
Margin tells you what is allowed, not what is wise
The margin level in the example starts at 276.5%. If you trade that position with a 50 pip stop loss, a stop-out costs $500, which is 5% of the account. The margin level only falls from 276.5% to 262.7% when that stop is hit. Neither the margin call nor the stop-out is anywhere near the picture.
That is the correct order of things. Your stop loss and your risk per trade decide how much you can lose. Margin is a constraint that sits underneath, and it only becomes your problem when you have sized from the leverage instead of from the stop. Work out the size from the loss you accept with the position size calculator or, for currency pairs, the forex lot size calculator. Then use this calculator to check that the size fits the margin with room to spare.
Common margin and leverage mistakes
- Treating free margin as money to risk. Free margin is what is left before a margin call. It is not a budget for a trade.
- Using the quote currency for forex margin. Margin is charged on the base currency. For GBP/USD it follows the value of the pound.
- Forgetting other open positions. Margin adds up across trades, and a second position shrinks the free margin of the first.
- Assuming your broker's levels. The margin call and stop-out levels are in your account terms. Do not borrow them from a forum post.
- Mistaking maximum leverage for effective leverage. What the broker allows and what your open positions amount to are different numbers.
- Ignoring gaps. A price can jump past a stop-out level over a weekend or on a news release, and the position closes at the next available price.
What the calculator does not know
The calculator works out one position on an account with nothing else open and no floating profit or loss. It does not know your other positions, your broker's reduced margin on hedged trades, tiered leverage that falls as your position grows, or instrument-specific margin rates for indices, commodities and shares. It also does not know about swaps, commissions, bonuses or credit on the account.
It does not show a liquidation price for crypto futures. Exchanges compute liquidation differently, with isolated and cross margin modes, maintenance margin tiers, fees and funding, so one formula here would be wrong for most of them. Use the exchange's own calculator for that. The result is arithmetic for planning, not a statement of what your broker will do. To see what a trade made after fees, use the profit and loss calculator. Nothing here is investment advice.
Frequently asked questions
What is margin in trading?
Margin is the amount of your own money a broker holds as a deposit against a leveraged position. It is not a fee. It is released when you close the position, and it rises and falls with the position's value and your leverage.
How do I calculate the margin required for a forex trade?
Multiply the lots by the contract size and by the value of the base currency in your account currency, then divide by the leverage. One lot of EUR/USD with EUR worth $1.0850 on a dollar account is 100,000 × 1.0850 ÷ 30 = $3,616.67 at 1:30. At 1:100 the same position needs $1,085.00.
How do I calculate margin level?
Margin level equals equity divided by the margin in use, times 100. With $10,000 of equity and $3,616.67 of margin, the level is 276.5%. It falls as your open trades lose money and rises as they gain.
What is a good margin level?
There is no universal good level, because a margin level only has meaning against your broker's margin call and stop-out levels. A higher level means more room before either is reached. Traders who size from their stop loss normally stay far above both.
What is a margin call?
A margin call is the broker's warning that your margin level has fallen to the margin call threshold. Depending on the broker it may block new positions, ask for a deposit, or both. If the level keeps falling it can lead to a stop-out.
What is the stop-out level?
The stop-out level is the margin level at which the broker starts closing your positions automatically, usually the most losing one first. It is lower than the margin call level. The calculator shows the loss that would take your account there.
What is the difference between margin and leverage?
Leverage is the ratio between a position's value and the margin that secures it, and margin is the deposit itself. With 1:30 leverage you post one thirtieth of the position's value as margin. Raising the leverage lowers the margin, and the position's gains and losses stay the same.
Does higher leverage mean more risk?
Higher leverage means you can open a larger position with the same margin, and the larger position is what raises your risk. The same position at 1:500 loses exactly as much as at 1:30. The risk grows only if you use the extra leverage to trade bigger.
What is effective leverage?
Effective leverage is the total value of your open positions divided by your account balance. It is your real exposure, as opposed to the maximum leverage your broker offers. In the example, a $108,500 position on a $10,000 account is 10.85 times leveraged.
Does the calculator show a liquidation price for crypto futures?
No. Exchanges use different formulas for liquidation, with their own margin modes, maintenance margin tiers and fees. The calculator shows the margin, the margin level and the loss that reaches a level you set, which is how forex and CFD brokers work.