On a futures exchange the first thing you're asked is your leverage. That's the wrong place to start. Leverage doesn't decide how much you lose when you're wrong: your stop and your position size do. Leverage only decides how much margin you post and how close the liquidation price sits.
So size the trade first, then pick the leverage, then check one thing: the exchange must not be able to liquidate you before your own stop is hit.
Step 1: size the position from the stop
risk amount = account × risk %
loss per coin = |entry − stop| + fee rate × (entry + stop)
quantity = risk amount ÷ loss per coin
notional = quantity × entry
Worked example: a 5,000 USDT account risking 1% (50 USDT) on a BTC long at 100,000 with a stop at 98,500. Say the exchange charges a 0.05% taker fee on each side.
- Price risk per BTC: 1,500 USDT
- Fees per BTC: 0.0005 × (100,000 + 98,500) = 99.25 USDT
- Quantity: 50 ÷ 1,599.25 = 0.031265 BTC
- Notional: about 3,126 USDT
If the stop is hit, you lose about 50 USDT, fees included, whatever leverage you choose. Leave the fees out and you'd size 0.0333 BTC, then lose about 53.31 USDT at the stop, nearly 7% more than planned.
Step 2: choose the leverage, which sets the margin
margin = notional ÷ leverage
For the same 3,126 USDT position: 625 USDT of margin at 5×, 313 at 10×, 156 at 20×, 63 at 50×. The risk to your account is still 50 USDT in every case. What changes is how much of the account is locked in this position and where liquidation sits.
Step 3: check the liquidation price
In isolated margin, only the margin you assigned backs the position. The exchange liquidates when the position's equity falls to the maintenance margin, a small percentage of the notional. For a USDT-margined (linear) contract with one position:
liquidation when: margin + (price − entry) × quantity = maintenance rate × price × quantity (long)
long: liquidation = (entry × qty − margin) ÷ (qty × (1 − MMR))
short: liquidation = (entry × qty + margin) ÷ (qty × (1 + MMR))
with margin = entry × qty ÷ leverage:
long: liquidation = entry × (1 − 1/leverage) ÷ (1 − MMR)
short: liquidation = entry × (1 + 1/leverage) ÷ (1 + MMR)
MMR is the maintenance margin rate. Exchanges publish it per contract and per position size; larger positions get higher rates, and some formulas subtract a fixed "maintenance amount" for higher tiers. With an MMR of 0.5% and an entry at 100,000:
| Leverage | Long liquidation | Distance from entry |
|---|---|---|
| 2× | 50,251 | −49.75% |
| 3× | 67,002 | −33.0% |
| 5× | 80,402 | −19.6% |
| 10× | 90,452 | −9.55% |
| 20× | 95,477 | −4.52% |
| 25× | 96,482 | −3.52% |
| 50× | 98,492 | −1.51% |
| 100× | 99,497 | −0.50% |
Our stop is at 98,500, 1.5% below entry. At 20× or less, liquidation is far beyond it. At 50×, liquidation lands at 98,492: only 7.5 below the stop price. On paper the stop still triggers first. In practice exchanges liquidate on the mark price, deduct an estimated closing fee from the margin, and a stop-market order can fill below its trigger in a fast move. That gap is too thin to trust.
A quick approximation you'll see in many calculators is entry × (1 − 1/leverage + MMR). It gives 90,500 at 10× instead of 90,452, close enough for planning. The crypto liquidation calculator uses it; the exact form above is what to use when the stop sits near liquidation.
Isolated versus cross margin
In cross margin, your whole wallet balance backs every position. For a single position the liquidation formula is the same, with the wallet balance in place of the margin:
long, cross: liquidation = (entry × qty − wallet balance) ÷ (qty × (1 − MMR))
Take the same 0.031265 BTC long with a 5,000 USDT wallet in cross mode: (3,126.5 − 5,000) ÷ (0.031265 × 0.995) gives a negative number. There is no liquidation price above zero, because the wallet is larger than the whole position. That sounds safe, and it is, from liquidation. It also means the whole 5,000 USDT is exposed if your stop doesn't get filled.
Now a 0.5 BTC long (50,000 USDT notional) on the same 5,000 USDT wallet: (50,000 − 5,000) ÷ (0.5 × 0.995) = 90,452, the same as 10× isolated. In cross mode the leverage that matters is notional ÷ wallet balance, whatever the leverage slider says.
| Isolated | Cross | |
|---|---|---|
| What backs the position | The margin you assign | The whole wallet balance |
| Worst case on one trade | That margin | The wallet |
| Liquidation price | Fixed by margin and leverage | Moves with the wallet and other positions' P&L |
| Good for | Capping what one trade can take | Several positions that offset each other, if you manage the total |
With several cross positions, a loss on one pulls every other position's liquidation price closer. That's how one bad trade liquidates an account that "only risked 1% per trade".
The same thing in Python
def size_futures_trade(balance, risk_pct, entry, stop, leverage, fee_rate=0.0005, mmr=0.005):
"""Position size from the stop, then margin and isolated liquidation price (USDT-margined, one position)."""
side = 1 if stop < entry else -1 # 1 = long, -1 = short
risk = balance * risk_pct / 100
loss_per_coin = abs(entry - stop) + fee_rate * (entry + stop) # price move + entry and exit fees
qty = risk / loss_per_coin
notional = qty * entry
margin = notional / leverage
if side == 1:
liq = (entry * qty - margin) / (qty * (1 - mmr))
else:
liq = (entry * qty + margin) / (qty * (1 + mmr))
safe = liq < stop if side == 1 else liq > stop
return {"qty": qty, "notional": notional, "margin": margin, "liquidation": liq, "stop_before_liquidation": safe}
print(size_futures_trade(5_000, 1, 100_000, 98_500, 10))
# qty 0.031265, notional 3126.47, margin 312.65, liquidation 90452.26, stop_before_liquidation True
For a short at 100,000 with a stop at 101,500 and 10× leverage, the same function gives 0.031235 BTC and a liquidation price of 109,453.
What moves the numbers after you open
- Funding. In isolated margin, funding you pay comes out of the margin and pulls liquidation closer on long holds. Our breakdown of what funding cost on BTC, ETH and SOL over a year shows how much that can be.
- Mark price. Liquidation is triggered on the mark price, which can differ from the last trade, especially in spikes.
- Tiers. Adding to a position can push it into a higher maintenance tier and move liquidation closer.
- Fees. The exit fee at your stop is part of the loss; size with it, as above.
A checklist before every leveraged trade
- Decide the risk in dollars and the stop from the chart, not from the leverage.
- Size the quantity from the stop, fees included. The crypto position calculator does this.
- Pick the lowest leverage that frees enough margin for your plan.
- Check that liquidation sits well beyond the stop, not a few dollars away.
- Prefer isolated margin unless you deliberately manage several positions as one.
- For a long hold, add the expected funding to the cost of the trade.
If you want to see how leverage plays out over many trades, we simulated it: can leverage make 10% a day? The answer was no, for every one of 240 setups.
This article is for education and isn't investment advice. Leveraged trading can lose your whole margin quickly, and in cross margin more than one trade's margin. Check your exchange's own liquidation price before you trade.
Frequently asked questions
How do I calculate position size for crypto futures?
Divide the amount you are willing to lose by the loss per coin at your stop: quantity = risk ÷ (|entry − stop| + fees). Risking 50 USDT on a BTC long at 100,000 with a stop at 98,500 and 0.05% fees per side gives 0.031265 BTC. Leverage does not enter the size.
How is the liquidation price calculated?
For an isolated USDT-margined long, liquidation = entry × (1 − 1/leverage) ÷ (1 − maintenance margin rate); for a short, entry × (1 + 1/leverage) ÷ (1 + maintenance margin rate). At 10× with a 0.5% rate, a long from 100,000 is liquidated near 90,452.
Is isolated or cross margin safer?
Isolated margin caps what one trade can take at the margin you assign. Cross margin uses the whole wallet, so liquidation is usually farther away but a single failed stop can cost far more. Isolated is the simpler way to keep each trade's worst case known.
Does higher leverage mean more risk?
Not by itself. With the same stop and quantity, the loss at the stop is the same at 5× or 50×. Higher leverage only brings the liquidation price closer, and past a point it sits inside your stop, so the exchange closes you first.
Why is my exchange's liquidation price different?
Exchanges use the mark price, tiered maintenance rates, an estimated closing fee and the funding already paid. The formulas here are the core of the calculation; always read the exact figure on the order screen.