TradeLabs AILearn

Margin and Leverage Calculator

Free margin and leverage calculator. Enter your equity, position value and margin rate to see required margin, free margin, leverage and the move that wipes you out.

Beginner3 min readUpdated 3 Oct 2026
Markdown
Lesson 5 of 19

Margin lets you control a position worth more than the money in your account. That is useful, and dangerous. This calculator shows the numbers that matter before you open a leveraged trade: how much margin the broker will hold, how much free margin is left, your effective leverage and, most importantly, how large a price move against you would wipe out your entire account. It applies to forex, CFDs, futures, crypto perpetuals and stock margin accounts, though each has its own rules on maintenance and liquidation.

Calculator#

Calculator
Turn on JavaScript to use it, or use the formula below

How it works#

Required margin = Position value × Margin requirement %
Free margin = Equity - Required margin
Effective leverage = Position value / Equity
Move that wipes out equity = Equity / Position value

The margin requirement is what the broker demands, and it sets the maximum leverage. Effective leverage is what you actually use, and it is what determines how much a move hurts. See Margin and Leverage.

Margin requirement and maximum leverage#

Margin requirementMaximum leverageMove that wipes out a fully leveraged account
50% (US stocks, Reg T)2x50%
20%5x20%
10%10x10%
3.33% (EU retail major FX)30x3.33%
1%100x1%

EU and UK rules cap retail leverage on major currency pairs at 30 to 1 and lower on other products. See CFD Trading and Account Types and Margin Rules.

Initial, maintenance and liquidation#

TermMeaning
Initial marginNeeded to open a position
Maintenance marginMinimum to keep it open
Margin callRequest for more funds when equity falls below maintenance
Liquidation or stop outBroker closes positions automatically, often at a set margin level

Crypto exchanges liquidate positions automatically and can charge liquidation fees. See Liquidations in Crypto and Futures Margin: Initial and Maintenance.

How much leverage is sensible?#

A practical approach is to size positions by risk per trade, using stops, rather than by available margin. If you risk 1% per trade with a stop 2% away, the position is half your account, leverage of 0.5. Leverage then follows from your risk plan instead of driving it. See Position Size Calculator.

Common mistakes#

  1. Treating margin as the risk: the deposit is not the maximum loss.
  2. Using maximum leverage because the broker allows it.
  3. Ignoring overnight and weekend gaps, which can exceed equity on high leverage.
  4. Forgetting financing costs on leveraged positions held overnight. See Financing and Overnight Costs.
  5. Adding to losers and raising leverage as equity falls.

Checking before every leveraged trade#

Run these numbers before opening any leveraged position, not after. If the move that would wipe out your equity is smaller than a normal daily range for the market you trade, the position is too large regardless of what the broker permits.

Frequently asked questions#

How do I calculate leverage?#

Divide the total value of your positions by your account equity; a $50,000 position on $10,000 of equity is 5 times leverage.

What is free margin?#

Equity minus the margin held for open positions, the amount available for new positions or to absorb losses.

What happens if my margin runs out?#

The broker issues a margin call or automatically closes positions when equity falls below the maintenance or stop out level.

Next, measure whether your system has an edge with the Expectancy and Profit Factor Calculator.

Check your understanding

3 quick questions on this lesson. Get them all right to finish it.

Turn on JavaScript to take the quiz.

Finished this lesson?Sign in to save your progress across devices.
Next lessonExpectancy and Profit Factor CalculatorFree trading expectancy calculator. Enter win rate, average win and average loss to see expectancy per trade, profit factor and break even win rate.

Mentioned in