How to calculate liquidation price for crypto perps (isolated and cross margin) and DeFi loans, with formulas and worked examples for longs, shorts and LTV.

A liquidation price is the price at which your leveraged position or crypto loan is forcibly closed because your collateral no longer covers the required margin. For an isolated long on a perpetual future, a good approximation is entry price × (1 − 1/leverage) ÷ (1 − maintenance margin rate). For a DeFi loan, it is your debt divided by (collateral amount × liquidation threshold).
This guide explains both cases with worked examples: perpetual futures (isolated and cross margin) and over-collateralised DeFi loans such as those on Aave or Scallop. It also covers why the price on your screen can differ from the one where you actually get liquidated, and how to keep a safe distance.
Leverage means part of your position is funded by someone else: an exchange, a pool of traders, or a lending pool. To protect that money, every leveraged venue sets a minimum amount of collateral you must keep. When your losses eat into your collateral until it hits that minimum, the venue closes the position. The market price at which that happens is your liquidation price.
Two ideas sit behind every formula below:
Liquidation happens when equity falls to the required minimum. Solving that equation for price gives you the liquidation price. For a broader primer on borrowed exposure, see leverage in crypto.
On a perpetual futures exchange, you post initial margin to open a position and must keep at least the maintenance margin to hold it. Binance's liquidation protocol page states the trigger plainly: liquidation happens when initial collateral plus realised and unrealised profit and loss falls below the maintenance margin.
Maintenance margin rates vary by asset and position size. On Hyperliquid, the maintenance margin is half the initial margin at the asset's maximum leverage, so it ranges from 1.25% for assets with 40x maximum leverage to 16.7% for assets with 3x maximum leverage, according to its liquidation docs. Binance uses tiers: the larger the position, the higher the required margin and the lower the maximum leverage.
Exchanges trigger liquidations from a mark price, not the last traded price. Binance says its mark price combines funding data with a basket of spot prices from multiple exchanges, to avoid liquidations caused by one-off spikes or manipulation, per its help page. Hyperliquid's mark price similarly combines external exchange prices with its own order book.
For an isolated position, ignoring fees and funding, set your equity equal to the maintenance margin and solve for price:
Long: liquidation price = entry × (1 − 1/leverage) ÷ (1 − MMR)
Short: liquidation price = entry × (1 + 1/leverage) ÷ (1 + MMR)
MMR is the maintenance margin rate. This is the same result as the general formula in Hyperliquid's docs, liq_price = price − side × margin_available ÷ position_size ÷ (1 − l × side), where side is 1 for a long and −1 for a short, and l is the maintenance margin rate.
You open a 1 BTC position at $100,000 with 10x leverage in isolated margin, so you post $10,000. Assume a maintenance margin rate of 1.25%.
Check the long: at $91,139 your loss is $8,861, leaving $1,139 of equity. Maintenance margin is 1.25% of the position's value, 1.25% × $91,139 = $1,139. The two match, so this is the trigger.
Notice that the distance to liquidation is a little less than 1/leverage. At 10x you don't get the full 10% cushion, because the exchange closes you while some margin remains. At 20x the same maths puts a long's liquidation about 3.8% below entry.
The formula above assumes isolated margin: only the margin assigned to that position can be lost. With cross margin, your whole account balance backs all your cross positions. Our guide to cross margin vs isolated margin covers the trade-offs; here is what it does to the liquidation price.
Same trade, 1 BTC long at $100,000, but in cross margin with $20,000 of USDC in the account and no other positions. Liquidation happens when $20,000 + (price − $100,000) = 1.25% × price.
Solving: price × 0.9875 = $80,000, so the liquidation price is about $81,013, roughly 19% below entry. The extra account balance pushed it much further away. The downside is that if it is hit, you can lose the whole $20,000, not just $10,000.
Two practical points:
DeFi lending protocols don't use leverage settings. You supply collateral, borrow against it, and each collateral asset has a liquidation threshold: the share of its value that counts towards your borrowing limit before liquidation. This is higher than the maximum loan-to-value you can open at. Our LTV guide explains the difference.
Protocols such as Aave express safety as a health factor: collateral value × liquidation threshold ÷ debt. Below 1, the position can be liquidated, per the Aave V3 docs. Setting the health factor to exactly 1 and solving for the collateral price gives:
Liquidation price = debt ÷ (collateral amount × liquidation threshold)
This assumes your debt is a stablecoin and you have a single collateral asset.
You supply 5 ETH at $4,000 (worth $20,000) and borrow 10,000 USDC. Assume a liquidation threshold of 80%; real values differ by asset and protocol, so check the market you use.
If you repay 2,000 USDC, the liquidation price falls to $8,000 ÷ 4 = $2,000. If you add 1 ETH instead, it falls to $10,000 ÷ 4.8 = about $2,083.
If you also supply $5,000 of USDC at an 85% threshold, that stable collateral covers $4,250 of the debt. The ETH liquidation price becomes ($10,000 − $4,250) ÷ (5 × 0.80) = about $1,438. Our health factor guide has more multi-asset examples.
When you cross the line, a liquidator repays part of your debt and takes collateral worth more than they repaid; the difference is the liquidation bonus, or penalty to you. On Aave V3.3, a liquidator can repay up to 50% of the position by default and up to 100% once the health factor falls below 0.95, according to the V3.3 proposal. See DeFi loan liquidations explained for the full process.
The formulas are clean; real positions are not. Your actual liquidation price drifts because of:
Treat the number your exchange or app shows as the best reference, and the formula as a way to understand and sanity-check it.
Where JewelSwap fits: JewelSwap's leveraged farms on Sui borrow against your deposit through the Scallop lending protocol, so each position has a health factor and a liquidation point like any DeFi loan, as the position management docs explain. Watch that health factor and keep leverage modest.
It is the market price at which a leveraged position or crypto loan is forcibly closed because your remaining collateral has fallen to the minimum the exchange or protocol requires.
For an isolated long, ignoring fees and funding, use entry price × (1 − 1/leverage) ÷ (1 − maintenance margin rate). A 10x long at $100,000 with a 1.25% maintenance rate liquidates at about $91,139.
With a stablecoin debt and one collateral asset, divide the debt by the collateral amount times its liquidation threshold. Borrowing 10,000 USDC against 5 ETH with an 80% threshold gives a liquidation price of $2,500.
Yes. Cross margin uses your whole account balance as collateral, so the liquidation price is usually further away than with isolated margin, but you can lose the whole balance if it is hit.
Exchanges use a mark price or oracle price, not the last trade on another venue. Funding, fees, interest and margin tiers also move your real liquidation price over time.
This article is educational and isn't financial advice. Worked examples use illustrative prices, maintenance margin rates and liquidation thresholds; venue rules are from Binance, Hyperliquid and Aave documentation as checked on 17 October 2026, and sources are linked above. Always rely on the liquidation price your platform shows.