How Hyperliquid calculates liquidation
Hyperliquid publishes its liquidation formula in the liquidations page of its docs: liq_price = price − side × margin_available / position_size / (1 − l × side). Side is 1 for a long and −1 for a short. l is one over the maintenance leverage. margin_available is your isolated margin (isolated) or your account value (cross), minus the maintenance margin the position requires.
The maintenance margin is half the initial margin at the asset's max leverage, per the margining page. So the max leverage you see on the order screen sets the maintenance rate: 40x max leverage means a 1.25% maintenance rate, 20x means 2.5%, 10x means 5%. That is the main difference to Bybit, where the maintenance rate comes from a per-contract risk-limit table.
Worked example: a long on BTC at $65,000.00, 10x isolated, with BTC at 40x max leverage. The calculator puts liquidation at $59,240.51, which is 8.86% below entry.
Isolated vs cross on Hyperliquid
In isolated mode, the margin backing the position is the position size divided by your leverage, and only that margin is at risk. In cross mode, your whole account value backs the position. The leverage you set then only caps how large a position you can open. It does not move the liquidation price, the account value does. That is why the calculator asks for the account value in cross mode and ignores leverage for the liquidation price there.
What this calculator leaves out
Hyperliquid triggers liquidation on the mark price, a median of several price sources, not on the last trade you see on the chart. Large positions also hit margin tiers: above a notional break the max leverage steps down (for BTC from 40x to 20x above 150M USDC), and the maintenance rate rises with it. The calculator uses one tier for the whole position, which is right for any position below the first break. In cross mode, other open positions share the same account value, so their losses move this position's liquidation price too.
Related
- → Hyperliquid Trading Journal · sync your Hyperliquid fills by wallet address, no API key.
- → Hyperliquid Wallet Check · fees, funding and PnL of any Hyperliquid wallet.
- → Liquidation Price Calculator for Bybit · the same question for Bybit USDT perpetuals.
- → Position Size Calculator · from account size and stop to position size.
Journal your Hyperliquid trades
PerpLog imports your Hyperliquid fills from your wallet address and shows fees, funding and PnL per trade. Free plan, no time limit.