How Bybit calculates the liquidation price
For an isolated USDT perpetual position in a Unified Trading Account, Bybit publishes the formula in its help centre. The liquidation price depends on the open price, the leverage, the margin added and the maintenance rate of the risk-limit tier the position falls in. Bybit's own worked example is reproduced below to the cent, and the same arithmetic runs in the Bybit liquidation calculator.
The formula
- EP, Q
- Open price and size in BTC (use the average open price and total size after adding to a position).
- L
- The leverage set on the position, so EP·Q/L is the initial margin.
- extra
- Margin added to the position after opening. Bybit's formula divides it by (1 ∓ taker).
- MMR, deduction
- The maintenance margin rate and the fixed deduction of the risk-limit tier. Maintenance margin is taken on the position's value at the liquidation price, which is why MMR sits under the line.
Bybit's own example, reproduced
The published result is 36,380.25. The reference code behind the calculator must reproduce it exactly before any other test runs.
Why the reserved fee to close does not move it
Bybit sets aside an estimated fee to close inside the initial margin, so the margin shown on a new position is a little larger than value divided by leverage: 821.56 rather than 800.00 in the example. It counts the same estimated fee inside the maintenance margin too, so the two cancel and the fee drops out of the liquidation price. Only margin added later carries the taker rate, through the extra/(1 ∓ taker) term.
Risk-limit tiers, and the price at several leverages
Larger positions fall in risk-limit tiers with a higher maintenance rate and a fixed deduction. Bybit picks the tier from the position's value at the liquidation price.
| Size | Leverage | Side | Maintenance | Liquidation price | Room |
|---|---|---|---|---|---|
| 0.5 BTC | 5× | long | 0.33% | 48,158.9 | 19.74% |
| 0.5 BTC | 5× | short | 0.33% | 71,763.2 | 19.61% |
| 0.5 BTC | 10× | long | 0.33% | 54,178.8 | 9.70% |
| 0.5 BTC | 10× | short | 0.33% | 65,782.9 | 9.64% |
| 0.5 BTC | 20× | long | 0.33% | 57,188.7 | 4.69% |
| 0.5 BTC | 20× | short | 0.33% | 62,792.8 | 4.65% |
| 0.5 BTC | 50× | long | 0.33% | 58,994.7 | 1.68% |
| 0.5 BTC | 50× | short | 0.33% | 60,998.7 | 1.66% |
| 0.5 BTC | 100× | long | 0.33% | 59,596.7 | 0.67% |
| 0.5 BTC | 100× | short | 0.33% | 60,400.7 | 0.67% |
| 10 BTC | 10× | long | 0.50% − 510.00 | 54,220.1 | 9.63% |
| 10 BTC | 10× | short | 0.50% − 510.00 | 65,722.4 | 9.54% |
| 50 BTC | 10× | long | 0.63% − 3,530.00 | 54,271.3 | 9.55% |
| 50 BTC | 10× | short | 0.67% − 4,810.00 | 65,656.3 | 9.43% |
The room to liquidation is always a little less than 100% divided by the leverage: at 10× a 0.5 BTC long is closed after a move of about 9.7%, not 10%. At 10×, the higher tiers put a 50 BTC long's price about 90 dollars closer to the open price than a 0.5 BTC long's.
What moves it after opening
- Margin added or removed moves it away or closer. Auto-margin replenishment, where switched on, adds margin from the balance as the price approaches.
- Funding. Bybit's help centre says funding is taken from the available balance first, and from the position margin only when the balance is short; in that case the liquidation price moves closer.
- Adding to the position changes the average open price, the size and possibly the tier.
- Cross margin. In cross mode the whole account backs the position, so the price moves with the balance and with other positions; the isolated formula above does not apply.
Liquidation is triggered on the mark price, not the last traded price, so a chart showing last price can pass the level without a liquidation, or not quite reach it when one happens. If the number on Bybit's position screen differs from a calculation, these are the usual causes.
Next to Binance and Delta Exchange India
The same position gives a slightly different price on each venue, because each picks maintenance margin and tiers its own way. The liquidation price guide compares them side by side, and every formula with its source is in the formula reference.
Related
- Liquidation price calculator (Bybit, Binance and Delta Exchange India), with your stop checked against it
- How Binance calculates the liquidation price
- How Delta Exchange India calculates the liquidation price
- Isolated vs cross margin
- Position size from your risk and stop