Skip to content

Trading9 min read

Hyperliquid liquidation price: the formula and how to calculate it

How to calculate a Hyperliquid liquidation price with the formula from its docs, worked examples for isolated and cross margin, and what moves it.

, Founder of Hypr Markets

Published · Updated

On this page

Your Hyperliquid liquidation price is the mark price at which your position no longer has enough margin to stay open. Reach it and the exchange starts closing the position for you. Knowing where that price sits before you trade, and what moves it afterwards, is the difference between choosing your exit and having it chosen for you.

This guide is for traders who want to check the number on their screen rather than take it on trust. It gives Hyperliquid's own formula from its Liquidations page, shows how to calculate a Hyperliquid liquidation price step by step for isolated and cross margin, and works through three examples in dollars. Then it covers what shifts the price after you open: funding, adding margin, partial closes and your other positions.

It is education, not financial advice. Every price below is an example chosen for round numbers, not a forecast.

The Hyperliquid liquidation price formula

Hyperliquid publishes the formula on its Liquidations page:

liq_price = price - side * margin_available / position_size / (1 - l * side)

Each term means:

TermMeaning
priceThe price you calculate from. At entry, use your entry price.
side1 for a long, -1 for a short.
position_sizeSize in coins (for example 2.5 ETH), not dollars.
l1 divided by the maintenance leverage.
margin_available (isolated)Isolated margin minus maintenance margin required.
margin_available (cross)Account value minus maintenance margin required.

Maintenance margin and maintenance leverage

Maintenance margin is the minimum equity a position must keep. Hyperliquid sets it at half the initial margin at the asset's maximum leverage, so maintenance leverage is twice the maximum leverage. Maximum leverage runs from 3x to 40x depending on the asset (Liquidations).

Asset's max leverageMaintenance leveragelMaintenance margin
40x80x0.01251.25%
25x50x0.022%
20x40x0.0252.5%
10x20x0.055%
3x6x0.166716.7%

Some assets lower their maximum leverage for very large positions through margin tiers. For those, the docs say the maintenance leverage comes from the tier that matches the position's value at the liquidation price. For an ordinary position size, the asset's maximum leverage is the number to use.

Why the formula divides by (1 - l * side)

As price moves toward liquidation, the position's dollar value changes, and so does the maintenance margin it needs. The divisor accounts for that. For a long it makes liquidation come a little sooner; for a short, a little later than a plain "margin divided by size" estimate would suggest.

How to calculate a Hyperliquid liquidation price, step by step

  1. Look up the asset's maximum leverage and halve the initial margin rate at that leverage to get the maintenance margin rate. Set l to that rate.
  2. Work out the maintenance margin required: position value times the maintenance rate.
  3. Work out margin_available: your isolated margin, or your cross account value, minus that maintenance margin.
  4. Divide margin_available by the position size in coins, then by (1 - l) for a long or (1 + l) for a short.
  5. Subtract the result from the entry price for a long; add it for a short.

For a fresh isolated position, there is a shortcut. With leverage L and maintenance rate m, a long is liquidated after a fall of (1/L - m) / (1 - m), and a short after a rise of (1/L - m) / (1 + m).

To skip the arithmetic, the Hyperliquid liquidation price calculator runs the same formula for an isolated or cross position and shows the maintenance margin and the move to liquidation.

Worked example 1: an isolated long

A trader opens a long of 2.5 ETH at an example price of $4,000, a $10,000 position, at 10x in isolated margin. The position gets $1,000 of margin. Say ETH's maximum leverage is 25x, so the maintenance rate is 2% and l is 0.02.

  • Maintenance margin required: $10,000 x 2% = $200.
  • margin_available: $1,000 - $200 = $800.
  • Distance: $800 / 2.5 / (1 - 0.02) = about $326.53.
  • Liquidation price: $4,000 - $326.53 = about $3,673.47, a fall of about 8.2%.

Check it: at $3,673.47 the position has lost about $816.33, leaving about $183.67 of equity. Maintenance margin at that price is 2% of 2.5 x $3,673.47, also about $183.67. Equity equals maintenance margin, which is exactly where liquidation starts.

Worked example 2: an isolated short

A trader shorts 0.1 BTC at an example price of $100,000, a $10,000 position, at 20x isolated, so the margin is $500. With BTC's maximum leverage at 40x, the maintenance rate is 1.25% and l is 0.0125.

  • Maintenance margin required: $10,000 x 1.25% = $125.
  • margin_available: $500 - $125 = $375.
  • Distance: $375 / 0.1 / (1 + 0.0125) = about $3,703.70.
  • Liquidation price: $100,000 + $3,703.70 = about $103,703.70, a rise of about 3.7%.

At 20x, a move of under 4% against the position is enough. Higher leverage means less margin behind the same position, so the liquidation price sits closer to entry.

Worked example 3: a cross margin long

Now the same ETH long from example 1, $10,000 of ETH at $4,000, but in cross margin with $3,000 of USDC in the account and no other positions.

  • Maintenance margin required: $200.
  • margin_available: account value $3,000 - $200 = $2,800.
  • Distance: $2,800 / 2.5 / 0.98 = about $1,142.86.
  • Liquidation price: $4,000 - $1,142.86 = about $2,857.14, a fall of about 28.6%.

The leverage setting does not appear anywhere in that calculation. Hyperliquid's docs state that a cross position's liquidation price does not depend on the leverage you set; lower leverage only locks up more collateral. What counts is your account value against your total position size. The trade-off is that a cross liquidation can take the whole cross balance, not just $1,000. The guide to isolated vs cross margin compares the two modes in detail.

Example 1Example 2Example 3
PositionLong 2.5 ETHShort 0.1 BTCLong 2.5 ETH
Margin modeIsolated, $1,000Isolated, $500Cross, $3,000 account
Maintenance rate2%1.25%2%
Liquidation priceabout $3,673.47about $103,703.70about $2,857.14
Move to liquidationabout 8.2% downabout 3.7% upabout 28.6% down

What moves your liquidation price after you open

The number on the ticket is a snapshot. Hyperliquid's Liquidations page warns that the displayed price can change with funding payments and, for cross positions, with unrealized profit and loss in your other positions. Here is what pushes it, using the examples above.

Adding margin or depositing USDC

Isolated positions let you add or remove margin after opening; in cross, you reduce risk by depositing USDC or reducing positions (Margining). Add $500 to the isolated ETH long in example 1 and margin_available becomes $1,300. The liquidation price falls to about $3,469.39, a cushion of about 13.3% instead of 8.2%.

Removing margin does the reverse. Some assets are strict isolated, where margin cannot be removed at all and is released only as the position closes.

Closing part of the position

In example 3, close half the ETH at $4,000 with no profit or loss. The position is now 1.25 ETH, maintenance margin is $100, and margin_available is $2,900. The liquidation price drops to about $1,632.65. Smaller size against the same account value means more room.

Funding payments

Hyperliquid pays funding every hour (Contract specifications). When you pay funding, your margin shrinks and the liquidation price creeps toward the market; when you receive it, the opposite happens. As an example, if the isolated long in example 1 paid $20 of funding over a few days, its margin would fall to $980 and the liquidation price would rise to about $3,681.63. Small per hour, but it adds up on positions held for weeks. See funding rates explained for how the rate is set.

Your other cross positions

In cross, every cross position shares one pool. A loss in one lowers account value, which pulls every other cross position's liquidation price closer, even if their own prices never moved. A gain does the opposite. Withdrawing USDC lowers account value too, with the same effect.

Leverage changes

In isolated margin, leverage sets how much margin the position gets, so it changes the liquidation price directly. In cross, it does not. Hyperliquid also checks leverage only when a position opens (Margining); after that, keeping the position safe is your job.

What happens when price reaches it

Liquidation is measured against the mark price, which combines prices from large external exchanges with Hyperliquid's own order book, so it can differ from the last trade in a fast market (Liquidations). Per the same page:

  1. When equity falls below maintenance margin, Hyperliquid sends market orders to the book to close the position. Above 100,000 USDC, only 20% goes first, with a 30-second cooldown.
  2. If the book closes it and maintenance margin is restored, you keep any remaining collateral.
  3. If equity falls below two thirds of maintenance margin without a successful book liquidation, the liquidator vault takes over. In this backstop liquidation, the maintenance margin is not returned.

Liquidations also cluster at similar prices across many traders, and forced market orders can push price into the next cluster. Liquidation heatmaps explained shows how traders read where those clusters sit.

Where a terminal shows it

On terminals built with Hypr Markets, the order ticket shows an estimated liquidation price and how far it sits from entry before you send the order, and open positions show theirs, on every plan. The Order Flow desk's liquidation heatmap, which estimates liquidation dollars by price from tracked positions and shows its coverage, is on Pro and up. Operators can see the full module list on features.

Operators who want a terminal of their own can start in the editor, which works before you sign in.

Frequently asked questions

How do I calculate my Hyperliquid liquidation price?

Use Hyperliquid's formula: liquidation price equals price minus side times margin available, divided by position size, divided by (1 minus l times side). Side is 1 for a long and -1 for a short, l is 1 divided by maintenance leverage, and margin available is your isolated margin (or cross account value) minus maintenance margin.

Why is my liquidation price different from what I calculated?

Hyperliquid notes that funding payments and, in cross margin, unrealized profit and loss in other positions change it. Margin tiers on very large positions, fees and partial fills also shift the inputs. Recalculate from your current margin and size.

Does higher leverage move my liquidation price closer?

In isolated margin, yes: higher leverage assigns less margin to the same position, so liquidation comes after a smaller move. In cross margin, Hyperliquid's docs state that the leverage setting does not change the liquidation price; account value and total position size do.

What is the maintenance margin on Hyperliquid?

Half the initial margin at the asset's maximum leverage. That is 1.25% for assets with 40x maximum leverage and 16.7% for assets with 3x. When equity falls below it, liquidation starts.

Can I lose more than my margin on Hyperliquid?

In a backstop liquidation you lose the maintenance margin as well. If an account's value turns negative, Hyperliquid uses auto-deleveraging against traders on the other side so the exchange carries no bad debt. Your loss is the margin backing the position: the isolated margin, or the whole cross balance.

All articles