Liquidation price calculator
CryptoKeyhole’s liquidation calculator shows where an isolated-margin perpetual is closed out, using the margin tiers Bybit and OKX publish, so a bigger position is liquidated closer to its entry, as it would be on the venue.
- Position
- —
- Quantity
- —
- Maintenance rate
- —
- Maintenance margin
- —
How it works
Choose the venue, coin, direction, entry price, leverage and the margin you put up. The position is the margin times the leverage; its quantity is that value divided by the entry price.
The venue’s tier for a position that size sets the maintenance margin rate (and, on Bybit, a deduction). Liquidation comes where the margin left after the loss equals the maintenance margin. Funding and fees are left out, and venues measure against their mark price, so their figure can sit slightly closer.
Questions
How is the liquidation price worked out?
On isolated margin, a position is closed when its margin plus its unrealized loss falls to the maintenance margin. For a long that is the entry price less (margin − maintenance margin) ÷ quantity; for a short, the entry plus it. The maintenance margin is the position’s value times the tier’s rate, less the tier’s deduction on Bybit.
Why do the venues give different answers?
Each venue sets its own tiers: the maintenance rate rises with position size, so a large position is liquidated closer to its entry. Bybit sets its tiers by position value in US dollars, OKX by size in coins.
Is this the exact price the venue will use?
Close, not exact. Venues measure against their mark price, keep a small buffer for the closing fee, and on cross margin the whole account backs the position. Treat the answer as the edge, not a target.
How do I keep further from liquidation?
Lower leverage, a smaller position or more margin all move the liquidation price away from the entry. At 1× on a long there is no liquidation price above zero.
Margin tiers read each day from Bybit’s and OKX’s public APIs for their USDT perpetuals; prices filled from CryptoKeyhole’s daily closes. Not advice.