Signalview

Liquidation Price Calculator: Formula & Worked Examples

How to calculate liquidation price for crypto perps, with the exact long and short formulas, maintenance margin explained, Hyperliquid's real liquidation model, and worked BTC and SOL examples you can reproduce by hand.

Your liquidation price is the mark price at which your position is force-closed because your margin no longer covers the exchange's minimum. Above that price a long survives; below it, the position is taken over and your margin is gone. Knowing where that line sits — before you open the trade, not after — is the single most useful number in leveraged trading, and it is a number you can calculate yourself with one formula and a calculator.

This post covers what liquidation actually is, the liquidation price formula for both longs and shorts with each term explained, what the maintenance margin rate is and how it is set, the difference isolated versus cross margin makes, several worked numeric examples you can reproduce, exactly how Hyperliquid computes liquidation (its published formula, quoted precisely), and a four-step method plus concrete ways to push the liquidation price further away. A live interactive widget is coming as a separate tool; this page is the math behind it, so you can compute the number by hand and understand what the widget is doing.

Published July 12, 2026. Formulas and Hyperliquid figures reflect the official docs as of that date; margin parameters change per asset, so confirm against the venue before sizing a real trade.

What liquidation actually is

When you open a leveraged position you post margin — a fraction of the position's notional value. As the price moves against you, your unrealized loss eats into that margin. The exchange requires you to keep at least a minimum cushion, called the maintenance margin, against the position at all times. The moment your account equity (margin plus or minus unrealized PnL) falls to that maintenance level, you are liquidated: the position is closed at market by the venue's liquidation engine, and the maintenance cushion is typically kept by the liquidator as a buffer. You do not get it back.

The key mental model: liquidation is not the price at which you have lost 100% of your margin — it is slightly before that, at the point where only the maintenance margin remains. The higher your leverage, the thinner your starting cushion, and the closer the liquidation price sits to your entry. That relationship is the whole reason leverage is dangerous, and it is spelled out in Leverage Trading Explained. If you are new to the instrument itself, What Is Perps Trading? covers mark price, funding and margin from the ground up.

The liquidation price formula

For an isolated position the widely used approximation is clean enough to do in your head. For a long: liq price approximately equals entry price times (1 minus 1 divided by leverage, plus the maintenance margin rate). For a short: liq price approximately equals entry price times (1 plus 1 divided by leverage, minus the maintenance margin rate). Written compactly: long liq = entry x (1 - 1/L + m), and short liq = entry x (1 + 1/L - m), where L is your leverage and m is the maintenance margin rate expressed as a decimal (for example 1.25% = 0.0125).

Each term earns its place. The 1/L term is how far the price can move against you before your posted margin is fully consumed — at 10x leverage that is 10%, at 20x it is 5%, at 2x it is 50%. The m term pulls the liquidation price back toward entry by the maintenance cushion the exchange refuses to let you spend: because the position is closed while m still remains, a long is liquidated slightly higher, and a short slightly lower, than the naive 'margin fully gone' price. A long at 10x with a 1.25% maintenance rate is therefore liquidated after roughly a 1 - (1/10 - 0.0125) = 8.75% adverse move, not a full 10% move.

This formula assumes no fees, no funding accrued, and a single isolated position. Real liquidation prices drift closer over time as funding payments and borrowing costs quietly debit your margin — a point covered in Funding Rate Explained. Treat the formula as the price at the instant you open; it moves against you the longer you hold.

The maintenance margin rate

The maintenance margin rate is the minimum fraction of the position's notional value you must keep as equity. It is smaller than the initial margin rate (the fraction you post to open), which is what creates the gap between opening a position and being liquidated. A 2% maintenance rate means the position is closed once your equity falls to 2% of its notional value.

Crucially, the maintenance rate is tied to the asset's maximum allowed leverage, not to the leverage you personally chose. A blue-chip perp with a high max leverage has a low maintenance rate; a thin, volatile long-tail perp with a low max leverage has a high one. So two traders both using 5x on different assets can have very different liquidation distances, because the maintenance rate baked into the asset differs. Always look up the maintenance rate for the specific market — do not assume it.

How Hyperliquid computes it, precisely

Hyperliquid publishes its exact liquidation formula, so there is no need to guess. Per the official docs, liq_price = price - side * margin_available / position_size / (1 - l * side), where side = 1 for a long and -1 for a short, and l = 1 / MAINTENANCE_LEVERAGE. The margin_available term differs by margin mode: for an isolated position it is isolated_margin minus maintenance_margin_required; for a cross position it is account_value minus maintenance_margin_required, using your whole account's equity.

The maintenance margin itself is defined plainly in the docs: 'The maintenance margin is currently set to half of the initial margin at max leverage.' Because Hyperliquid's max leverage per asset ranges from 3x to 40x, the initial margin at max leverage ranges from 1/40 = 2.5% up to 1/3 = 33.3%, and the maintenance rate — half of that — ranges from about 1.25% (for 40x assets like BTC) to about 16.7% (for 3x long-tail assets). So a BTC position carries a 1.25% maintenance rate regardless of whether you opened it at 3x or 20x; the rate is a property of the market's max leverage, halved.

One more Hyperliquid-specific detail worth knowing: if a position cannot be liquidated cleanly on the order book and account equity falls below two-thirds of the maintenance margin, a backstop liquidation transfers the position to the liquidator vault (HLP), whose depositors — not an exchange operator — absorb or profit from it. That is a structural feature of the venue, and it, along with the rest of the risk model, is discussed in Is Hyperliquid Safe? and Hyperliquid Fees Explained for the cost side.

Isolated vs cross, and why it changes the number

In isolated margin, only the margin you assign to that one position backs it. The liquidation price is fixed the moment you open, computed purely from that position's isolated margin — clean, predictable, and contained: if it liquidates, the damage stops there and your other positions are untouched. This is what the simple formula above models.

In cross margin, all your cross positions share one collateral pool, so margin_available uses your entire account value. That pushes the liquidation price of any single position further away — your whole balance is defending it — but couples your positions together: a loss on one cross position drags every other cross position's liquidation price closer, and a cascade can wipe the whole account at once. Cross gives capital efficiency; isolated gives a hard, knowable blast radius. For a first leveraged trade, isolated is the more legible choice precisely because the liquidation price is a fixed number you can calculate in advance.

Worked examples you can reproduce

Example 1 - BTC long, isolated. You go long 1 BTC at $60,000 with 10x leverage. BTC's maintenance rate is 1.25% (m = 0.0125). Using the simple formula: liq = 60,000 x (1 - 1/10 + 0.0125) = 60,000 x 0.9125 = $54,750. Hyperliquid's exact formula, which accounts for the maintenance margin being re-measured at the liquidation price, refines this slightly: isolated margin = 60,000/10 = $6,000, maintenance required = 0.0125 x 60,000 = $750, margin_available = $5,250, and liq_price = 60,000 - 5,250/(1 x 0.9875) = $54,684. The two agree to within about $66 — the simple formula is the right tool for a quick check, the exact formula for the precise line.

Example 2 - BTC short, isolated. Same size and leverage, but short at $60,000. Simple formula: liq = 60,000 x (1 + 1/10 - 0.0125) = 60,000 x 1.0875 = $65,250. Hyperliquid exact: liq_price = 60,000 + 5,250/(1 x 1.0125) = $65,185. A short is liquidated on the way up, roughly symmetric distance above entry.

Example 3 - the effect of adding margin. Take the BTC long from Example 1 and add $2,000 of margin, so isolated margin becomes $8,000. margin_available = 8,000 - 750 = $7,250, and liq_price = 60,000 - 7,250/0.9875 = $52,658. Adding $2,000 pushed the liquidation price from $54,684 down to $52,658 — about $2,000 of extra room, because at 1 BTC of size each dollar of margin buys roughly a dollar of price cushion. Adding margin is the most direct way to move your liquidation price; it also lowers your effective leverage.

Example 4 - a mid-cap with a higher maintenance rate. You go long 10 SOL at $150 with 5x on a market whose max leverage is 20x, so initial margin at max = 5% and maintenance = 2.5% (m = 0.025). Simple formula: liq = 150 x (1 - 1/5 + 0.025) = 150 x 0.825 = $123.75. Exact: notional $1,500, isolated margin $300, maintenance required $37.50, margin_available $262.50, liq_price = 150 - 26.25/0.975 = $123.08. Note how the higher maintenance rate and lower leverage combine to sit the liquidation about 18% below entry — much safer than the 10x BTC trade's 8.75%.

Calculate it in four steps

Step 1 - get your entry price and chosen leverage. Step 2 - look up the maintenance margin rate for that specific market (on Hyperliquid, half the initial margin at the asset's max leverage — 1.25% for 40x assets, higher for lower-leverage ones). Step 3 - plug into the formula for your direction: long liq = entry x (1 - 1/L + m), short liq = entry x (1 + 1/L - m). Step 4 - sanity-check the gap: (entry minus liq) divided by entry is the percentage adverse move you can survive; if that number scares you, reduce leverage or add margin and recompute.

Do this before every leveraged trade, not after. The whole point is to see the distance to liquidation as a percentage move and ask whether that asset routinely moves that much in a day — because if it does, your position is a coin flip, not a strategy. The calculator below does the arithmetic for you: set your entry price, leverage, direction and maintenance margin, and it returns the estimated liquidation price and the percentage move to reach it.

Liquidation price calculator
Liquidation price$54,300.00
Move to liquidation9.50%
Initial margin10.00%

Isolated-margin estimate: the price at which losses consume all but the maintenance margin. Hyperliquid's exact engine uses a per-asset maintenance rate (about half the initial margin at max leverage) and cross-margin shares collateral across positions — treat this as a close approximation, not the exact on-chain trigger. Adding margin or lowering leverage pushes the level further away.

How to avoid liquidation

Four levers, in order of impact. First, use less leverage — this is the only lever that changes the odds structurally, since a 2x position survives a 50% adverse move while a 20x position survives a 5% one. Second, add margin (or use cross with a healthy balance) to push the liquidation price further out, accepting that this ties up more capital. Third, set a stop-loss well inside your liquidation price so you exit on your terms at a chosen loss rather than being force-closed at the maintenance line and losing the cushion too. Fourth, account for funding and holding time: on Hyperliquid funding is paid hourly and slowly debits margin on a held position, so a trade that looks safe at open drifts toward liquidation the longer it sits — see Funding Rate Explained.

The uncomfortable truth is that no amount of margin management makes a high-leverage position on a volatile asset safe; it only moves the line. Position sizing and leverage choice do the real work. How to Trade Perpetual Futures walks through building that discipline into an actual trading routine.

Where Signalview fits

Signalview (our product) is a non-custodial platform where backtested Hyperliquid perps strategies are published as a single score from -100 to +100 and traded by 24/7 AI agents on scoped keys that can place orders but never withdraw. Liquidation math is exactly the kind of thing that discipline is meant to respect: our agents trade the same Hyperliquid margin model described here, at the same fees covered in Hyperliquid Fees Explained, and are subject to the same liquidation formula — automation does not exempt a position from being force-closed. A strategy's leverage and sizing choices determine its liquidation distance just as they would for a manual trade.

We are honest about the limits: a backtest is not a guarantee, an agent can be liquidated in a fast adverse move like anyone else, and the liquidation price you compute by hand is the same line the agent lives behind. The calculator on this page is for your own understanding, not a promise about outcomes.

Risk note: leveraged perpetual futures can lose your entire margin, and a wrong liquidation estimate can lose it faster; always verify maintenance rates against the live venue before trading. Nothing here is investment advice.

Frequently asked questions

What is the formula to calculate liquidation price?
For an isolated long: liquidation price = entry x (1 - 1/leverage + maintenance margin rate). For a short: entry x (1 + 1/leverage - maintenance margin rate). Leverage is your multiplier and the maintenance margin rate is the asset's minimum equity fraction, expressed as a decimal.
How does Hyperliquid calculate liquidation price?
Hyperliquid uses liq_price = price - side * margin_available / position_size / (1 - l * side), where side is +1 for long and -1 for short, l = 1/MAINTENANCE_LEVERAGE, and the maintenance margin is half the initial margin at the asset's max leverage (about 1.25% for 40x assets, higher for lower-leverage ones).
Does higher leverage move my liquidation price closer to entry?
Yes. The distance to liquidation is roughly 1/leverage minus the maintenance rate, so 10x liquidates after about an 8.75% adverse move and 20x after about 3.75%, while 2x survives close to a 50% move. Higher leverage means a thinner cushion.
How can I avoid getting liquidated?
Use lower leverage, add margin to push the liquidation price further from entry, set a stop-loss inside your liquidation price so you exit on your own terms, and account for funding costs that erode margin over time. Lower leverage is the only lever that changes the odds structurally.