How OKX calculates the liquidation price
OKX measures tiers by the number of contracts you hold, not by position value, and the rate of your tier applies to the whole position. According to OKX, a position is liquidated when its equity falls to the maintenance margin plus the liquidation fee, which is charged at the taker rate. The calculator converts contracts to coins using each swap's contract value, for example 0.01 BTC per BTC-USDT-SWAP contract.
Liquidation price = (M − s × Q × E) ÷ (Q × (MMR + fee) − s × Q)M is the isolated margin, Q the size in coins, E the entry price, s is +1 for a long and −1 for a short, MMR the rate of your tier and fee the liquidation (taker) fee, 0.05% by default.
Worked example
Long 1 BTC (100 contracts) at 60,000 USDT with 20x isolated margin, so 3,000 USDT of margin. Assume the position is in a 0.40% tier.
(3,000 − 60,000) ÷ (1 × 0.0045 − 1) = 57,257.66 USDT.
Because the tier is set by contract count, a large position doesn't change tier as the price moves, unlike exchanges that measure tiers by value.
Want to see the same position on other exchanges? Compare liquidation prices across all 8 exchanges.
Getting a different number on the exchange? The eight usual reasons.
Isolated or cross margin
In isolated mode only the margin assigned to the position can be lost, so the liquidation price depends on that margin alone. Adding margin to an isolated position moves its liquidation price further away. In cross mode the whole wallet balance backs your positions, which pushes the liquidation price further away but puts the whole balance at risk.
How to move the liquidation price further away
- Use lower leverage, which locks more margin into an isolated position.
- Add margin to an isolated position after opening it.
- Trade a smaller size, which can also keep you in a lower tier.
- In cross mode, keep more balance in the futures wallet.
Frequently asked questions
How does OKX calculate the liquidation price?
OKX liquidates a position when its margin balance falls to the maintenance margin, judged on the mark price rather than the last traded price. Its maintenance margin tiers are set by position size in contracts, not by value. The maintenance margin is the position value at the liquidation price times the tier's rate. OKX's formula also adds a 0.05% fee rate to the maintenance rate.
What is the maximum leverage on OKX futures?
Up to 100x, on 10 of the 543 USDT perpetuals we track. The limit depends on the contract and falls as the position grows. On BTCUSDT the first tier allows 100x up to 10 BTC at a 0.4% maintenance rate; larger positions move into tiers with lower leverage and a higher rate.
Why is my liquidation price on OKX different from this calculator?
The usual reasons are the margin and the price. The calculator uses the margin you enter, while your real position's margin changes with fees, funding payments and any margin you add or remove. In cross mode, your other positions and their unrealized profit count too. Liquidation is triggered on the mark price, and the exchange may change a contract's tiers at any time.
Is liquidation based on the mark price or the last price?
All of these exchanges trigger liquidation on the mark price, which follows a price index across several markets. The last traded price can briefly go past your liquidation price without liquidating you, and the reverse can also happen.
Can I use this for several positions in cross mode?
Not exactly. Cross mode here assumes one open position. With several positions, the unrealized profit and loss and maintenance margin of the others also count, so the real liquidation price on OKX will differ.
How current is the tier data?
Tiers are pulled from each exchange's API every few hours, and the time of the last update is shown at the bottom of every page. Exchanges change tiers from time to time, so check the tier table against the exchange before a large trade.