Leverage & Margin Calculator
Calculate position size and margin both ways, estimate long/short PnL, include entry/exit fees, and visualize leverage impact with an easy chart.
Liquidation price
90.0000
PnL
50.00
ROI
50.00%
Final balance
150.00
Visual summary
Center line is zero. Bars to the right are positive; bars to the left are negative.
Liquidation price is a simplified estimate (maintenance margin and exchange rules vary).
Core terms explained in plain language
Leverage means borrowing buying power. At 10x leverage, 1 unit of margin controls 10 units of position value. This can boost gains, but it also magnifies losses by the same factor. A small price move can create a large return or a large drawdown.
Position Size (Notional) is the total value of your trade, not the cash you put in. If your position size is 5,000 and leverage is 10x, your required margin is roughly 500. This is why Position Size and Margin are linked by a direct conversion.
Margin is the collateral allocated to keep the position open. When unrealized losses approach your usable margin, liquidation risk increases. Different exchanges add maintenance margin rules and buffers, so liquidation is always an estimate unless you use exchange-specific formulas.
Long vs Short: A long position profits when price rises from entry to exit. A short position profits when price falls. The calculator switches the PnL direction automatically based on side selection, so you can test both market scenarios quickly.
Entry and Exit Fees are charged on both sides of the trade in many derivatives markets. Even if each fee looks small (for example 0.02%), the combined impact can materially reduce net ROI, especially for high-frequency or high-leverage strategies.
How to use this calculator
Step 1: Choose a conversion mode. Use Position Size to Margin if you already know total notional exposure and want required collateral. Use Margin to Position Size if you start from available capital and want maximum notional at a chosen leverage.
Step 2: Set Leverage, then select Long or Short. Enter your expected Entry Price and Exit Price. The calculator derives quantity and computes gross PnL based on directional logic.
Step 3: Enable Include trading fees when you want realistic outcomes. Default values are 0.02% for both entry and exit, and each can be edited independently. This is useful when maker/taker rates differ.
Step 4: Read result cards from top to bottom. First, verify your structural setup (position size, required margin, quantity, liquidation estimate). Next, compare PnL, total fees, and ROI to judge whether the trade idea still makes sense after costs.
Step 5: Use the visual summary chart for one-glance interpretation. The center line is zero. Right-side bars are positive values and left-side bars are negative values. This makes it easier to see whether fee drag is small or large relative to expected return.
Practical interpretation and risk notes
If your expected move is small but leverage is high, fee impact and tiny slippage can flip a trade from profitable to unprofitable. Always compare gross and net outputs, not just gross PnL.
A simplified liquidation estimate is shown for intuition, but real liquidation engines consider maintenance margin tiers, funding, insurance mechanisms, and exchange-specific formulas. Treat the estimate as directional guidance, not an execution guarantee.
For robust planning, run multiple scenarios: optimistic, base, and adverse exit prices. You can quickly test these by changing only exit price while keeping other settings fixed, then observing net ROI sensitivity.
This tool helps with education and planning, not financial advice. Confirm all numbers against your trading venue before placing live orders.