How to Calculate the Liquidation Price of a Perpetual Contract
How to Calculate the Liquidation Price of a Perpetual Contract
The estimated liquidation price is the critical price at which a position is forcibly closed. This article uses the Gold (XAUUSD) Perpetual Contract as an example to demonstrate the full calculation for four scenarios: Isolated Long, Isolated Short, Cross Long, and Cross Short.
1. How Liquidation Is Triggered
Liquidation is triggered when the Maintenance Margin Ratio of a position (or Cross Margin account) reaches ≤ 100%, meaning:
At this point, losses have consumed equity down to just the Maintenance Margin level. The position can no longer absorb further losses, and the system automatically initiates forced liquidation.
2. Isolated Margin Liquidation Price
In Isolated Margin mode, each position is calculated independently. The liquidation price depends solely on the position's average entry price, margin, and maintenance margin — unaffected by other funds in the account.
Isolated Margin Formula
Long:
Liquidation Price = (Maintenance Margin − Position Margin + Average Entry Price × Quantity × Contract Value) ÷ [Quantity × Contract Value × (1 − Taker Fee Rate)]
Short:
Liquidation Price = (Average Entry Price × Quantity × Contract Value + Position Margin − Maintenance Margin) ÷ [Quantity × Contract Value × (1 + Taker Fee Rate)]
*Maintenance Margin = Average Entry Price × Quantity × Contract Value × Maintenance Margin RatioPosition Margin (Long) = Average Entry Price × Quantity × Contract Value × (1/Leverage + Taker Fee Rate)
Scenario 1: Isolated Long
Parameter | Example Value |
Gold Entry Price (Average Entry Price) | 3,300 USD/oz |
Position Size | 1 contract |
Contract Value | 0.01 oz / contract |
Leverage | 10x |
Taker Fee Rate | 0.05%(= 0.0005) |
Maintenance Margin Ratio | 0.5%(= 0.005) |
Step 1:Calculate Position Margin
Notional Value = 3,300 × 1 × 0.01 = 33 USD
Position Margin = 33 × (1/10 + 0.05%) = 33 × 0.1005 = 3.3165 USD
Step 2:Calculate Maintenance Margin
Maintenance Margin = 33 × 0.5% = 0.165 USD
Step 3:Apply the Long Liquidation Price Formula
Liquidation Price = (0.165 − 3.3165 + 33) ÷ [1 × 0.01 × (1 − 0.05%)] = 29.8485 ÷ 0.009995
Isolated Long Liquidation Price ≈ 2,986 USD/oz (approximately 9.5% below entry price)
Scenario 2: Isolated Short
Parameter | Example Value |
Gold Entry Price (Average Entry Price) | 3,300 USD/oz |
Position Size | 1 contract |
Contract Value | 0.01 oz / contract |
Leverage | 10x |
Taker Fee Rate | 0.05%(= 0.0005) |
Maintenance Margin Ratio | 0.5%(= 0.005) |
Step 1:Calculate Position Margin (Short)
Position Margin = 33 × [(1/10 + 0.05%) × (1 + 0.05%) + 0.05% × (1 − 0.5%)]= 33 × [0.1005 × 1.0005 + 0.0005 × 0.995] ≈ 33 × 0.10105 ≈ 3.3347 USD
Step 2:Calculate Maintenance Margin
Maintenance Margin = 33 × 0.5% = 0.165 USD
Step 3:Apply the Short Liquidation Price Formula
Liquidation Price = (33 + 3.3347 − 0.165) ÷ [1 × 0.01 × (1 + 0.05%)] = 36.1697 ÷ 0.010005
Isolated Short Liquidation Price ≈ 3,615 USD/oz (approximately 9.5% above entry price)
*In Isolated Margin mode, the maximum loss for a long position is limited to its position margin (approximately 3.32 USD). All other funds in the account are completely unaffected.
3. Cross Margin Liquidation Price
In Cross Margin mode, the entire available account balance absorbs the risk of all Cross Margin positions. During liquidation, the system measures overall account equity; the liquidation price is affected by wallet balance and the PnL of other Cross Margin positions.
Cross Margin Formula (simplified — single contract, no Isolated positions or pending orders)
Cross Margin Liquidation Price =
[Wallet Balance − Total Maintenance Margin
− Long Average Entry Price × Long Quantity × Contract Value
+ Short Average Entry Price × Short Quantity × Contract Value]
÷ [Contract Value × [(Taker Fee Rate − 1) × Long Quantity
+ (1 + Taker Fee Rate) × Short Quantity]]
*If the account holds Cross Margin positions in multiple contracts simultaneously, add the unrealized PnL of other contracts to the numerator and subtract their liquidation fees and maintenance margins. This article uses a single-contract scenario as an example.
Scenario 3: Cross Long
Parameter | Example Value |
Gold Entry Price (Average Entry Price) | 3,300 USD/oz |
Long Position Size | 1 contract, Short = 0 |
Contract Value | 0.01 oz / contract |
Leverage | 10x |
Taker Fee Rate | 0.05%(= 0.0005) |
Maintenance Margin Ratio | 0.5%(= 0.005) |
Wallet Balance | 10 USD |
Step 1:Calculate Total Cross Margin Maintenance Margin
Maintenance Margin = 3,300 × 1 × 0.01 × 0.5% = 0.165 USD
Step 2:Apply the Cross Margin formula (Short quantity = 0, short terms = 0)
Numerator = 10 − 0.165 − 3,300 × 1 × 0.01 + 0 = 10 − 0.165 − 33 = −23.165
Denominator = 0.01 × [(0.0005 − 1) × 1 + 0] = 0.01 × (−0.9995) = −0.009995
Cross Margin Liquidation Price = −23.165 ÷ (−0.009995)
Cross Long Liquidation Price ≈ 2,318 USD/oz (approximately 29.8% below entry price)
*Compared to the Isolated Long liquidation price (≈2,986 USD/oz), the extra ~6.68 USD in the wallet under Cross Margin mode (equivalent to ~668 USD/oz of price buffer) significantly lowers the liquidation price, allowing the position to withstand larger drawdowns.
Scenario 4: Cross Short
Parameter | Example Value |
Gold Entry Price (Average Entry Price) | 3,300 USD/oz |
Short Position Size | 1 contract, Long = 0 |
Contract Value | 0.01 oz / contract |
Leverage | 10x |
Taker Fee Rate | 0.05%(= 0.0005) |
Maintenance Margin Ratio | 0.5%(= 0.005) |
Wallet Balance | 10 USD |
Step 1:Calculate Total Cross Margin Maintenance Margin
Maintenance Margin = 3,300 × 1 × 0.01 × 0.5% = 0.165
Step 2:Apply the Cross Margin formula (Long quantity = 0, long terms = 0)
Numerator = 10 − 0.165 − 0 + 3,300 × 1 × 0.01 = 10 − 0.165 + 33 = 42.835
Denominator = 0.01 × [0 + (1 + 0.0005) × 1] = 0.01 × 1.0005 = 0.010005
Cross Margin Liquidation Price = 42.835 ÷ 0.010005
Cross Short Liquidation Price ≈ 4,281 USD/oz (approximately 29.7% above entry price)
Similarly, compared to the Isolated Short liquidation price (≈3,615 USD/oz), the additional balance in Cross Margin mode allows the short position to withstand a much larger upward move before liquidation is triggered.
*In Cross Margin mode, losses from any other Cross Margin positions consume overall account equity, which in turn raises (for longs) or lowers (for shorts) the liquidation price, making positions easier to liquidate. This is the primary risk of Cross Margin mode.
4. Summary Comparison of Four Scenarios
Scenario | Mode | Direction | Liquidation Price | Distance from Entry |
Scenario 1 | Isolated Margin | Long | ≈ 2,986 USD | ↓ ~9.5% |
Scenario 2 | Isolated Margin | Short | ≈ 3,615 USD | ↑ ~9.5% |
Scenario 3 | Cross Margin | Long | ≈ 2,318 USD | ↓ ~29.8% |
Scenario 4 | Cross Margin | Short | ≈ 4,281 USD | ↑ ~29.7% |
*Example parameters: Average entry price 3,300 USD/oz, 1 contract (0.01 oz/contract), 10x leverage, Taker fee rate 0.05%, Maintenance Margin Ratio 0.5%. Cross Margin scenarios: wallet balance 10 USD. Actual values are subject to platform display.
5. Factors Affecting the Liquidation Price
Action / Event | Effect on Long Liquidation Price | Effect on Short Liquidation Price |
Add Margin (Isolated) | Liquidation price moves down (safer) | Liquidation price moves up (safer) |
Reduce Leverage | Liquidation price moves down | Liquidation price moves up |
Partial Close (Reduce Position) | Recalculated, generally safer | Recalculated, generally safer |
Funding Fee Deducted | Margin decreases, liquidation price moves up slightly | Margin decreases, liquidation price moves down slightly |
Other Cross Margin Positions at a Loss | Cross liquidation price moves up (dangerous) | Cross liquidation price moves down (dangerous) |
Other Cross Margin Positions at a Profit | Cross liquidation price moves down (safer) | Cross liquidation price moves up (safer) |
6. How to View the Liquidation Price
In the contract trading interface, each position in the position list shows an estimated liquidation price in real time, updated dynamically as you add margin, partially close positions, etc. Recommendations:
Liquidation Distance Ratio = |Current Mark Price − Estimated Liquidation Price| ÷ Current Mark Price × 100% |
For example, if the current Mark Price is 3,000 USD and the estimated liquidation price is 2,880 USD, the liquidation distance ratio is approximately 4%. This means there is only about 4% of price space remaining between the estimated liquidation price and the current Mark Price. |
- Regularly monitor the distance between the estimated liquidation price and the current Mark Price.
- When the distance narrows significantly, promptly evaluate whether to add margin, reduce the position, or set a stop-loss.
- When setting a stop-loss, leave a reasonable buffer before the estimated liquidation price is reached.
⚠️Risk Warning: The estimated liquidation price is for risk reference only. Rapid market fluctuations, liquidity changes, fee deductions, or changes in account equity may cause actual liquidation results to differ from the estimate.