Skip to content

Learn

Risk & Position Sizing

How liquidation price is calculated, with worked examples

For an isolated-margin position on a linear perpetual, the liquidation price is the price at which the position’s margin, after unrealised losses, falls to the maintenance margin requirement. For a long it is approximately entry × (1 − 1/leverage + maintenance margin rate); for a short, entry × (1 + 1/leverage − maintenance margin rate).

This page derives that formula so you can reproduce the number by hand, works a long and a short through it, and lists what real venues add on top. It is the same arithmetic as the liquidation price calculator. What maintenance margin is, and why it rises with position size, is covered in what is maintenance margin; this page is about the calculation.

The formula

IMR = 1 ÷ leverage              (initial margin rate)
MMR = maintenance margin rate   (from the venue, depends on size)

long:  liquidation ≈ entry × (1 − IMR + MMR)
short: liquidation ≈ entry × (1 + IMR − MMR)

The distance from entry is therefore roughly IMR − MMR, as a fraction of the entry price. How that distance behaves as leverage changes is the subject of how leverage changes your distance to liquidation.

Why this matters now

Liquidation is the one exit you do not choose, and it is priced worse than a stop: the venue closes the position with a market order into whatever the book offers, often in the fast conditions described in liquidation cascades. Knowing where it sits — and being able to check the venue’s number rather than taking it on trust — is the precondition for placing a stop that actually executes first.

How it actually works

Four steps, for a long of quantity q:

  1. Margin posted is a fraction of notional: margin = q × entry × IMR.
  2. Equity in the position at price P is the margin plus unrealised PnL: equity = margin + q × (P − entry).
  3. The maintenance requirement is a fraction of notional: maintenance = q × entry × MMR.
  4. Liquidation happens when equity equals maintenance. Set them equal, divide through by q, and solve for P:
entry × IMR + (P − entry) = entry × MMR
P = entry × (1 − IMR + MMR)

For a short the unrealised PnL is q × (entry − P), which flips the signs.

Quantity cancels out, which is why the calculator does not ask for position size. It still matters indirectly: the maintenance rate a venue applies depends on how large the position is.

Worked example: a long

Example inputs only: 0.5 BTC long at 60,000, isolated margin at 10×, and an illustrative maintenance margin rate of 0.5%.

StepCalculationResult
Notional0.5 × 60,00030,000
Initial margin30,000 ÷ 103,000
Maintenance requirement30,000 × 0.5%150
Loss the position can absorb3,000 − 1502,850
As a price move2,850 ÷ 0.55,700
Liquidation price60,000 − 5,70054,300

The formula gives the same answer in one line: 60,000 × (1 − 0.10 + 0.005) = 54,300, a distance of 9.5% below entry.

Worked example: a short

Same inputs, short. The position can absorb the same 2,850, but the adverse move is upward:

60,000 + 5,700 = 65,700
60,000 × (1 + 0.10 − 0.005) = 65,700

Why the formula says “approximately”

The version above measures maintenance on the entry notional. If you measure it on the notional at the liquidation price instead, the long becomes entry × (1 − IMR) ÷ (1 − MMR) = 54,271.36, and the short entry × (1 + IMR) ÷ (1 + MMR) = 65,671.64.

A difference of under 30 on a 60,000 entry is small next to everything in the next section. It is mainly worth knowing because it explains why two correct calculators can disagree in the last digits.

What venue calculations add

The generic formula is a model. Every venue’s liquidation engine adds detail, and the details differ. We are deliberately not quoting any venue’s rates or formula here; the categories are:

  • Tiered maintenance. The rate rises with position size, and the schedule may pair each rate with a fixed maintenance amount so that crossing a tier boundary does not cause a jump.
  • Which price is checked. Liquidation is generally triggered by a mark price rather than the last trade, and how the mark price is composed differs — see what is mark price.
  • Fees and funding. Both come out of margin over the life of the position, and whether an estimated closing fee is counted against margin is venue-specific.
  • Account-level margin. Under cross margin or a unified account, liquidation is evaluated across positions and this formula does not apply — see isolated vs cross margin.
  • Contract type. Inverse contracts hold margin and settle PnL in the coin, which changes the algebra — see inverse vs linear contracts.

The venue-specific calculators cover those details for Binance Futures, Bybit, OKX and Hyperliquid. Until you have checked your own venue, read the liquidation price it displays and treat your own number as a cross-check, not a replacement.

If you have added margin

The formula assumes margin equals notional ÷ leverage. If you have added or removed margin since opening, use the general form, which comes from the same four steps:

long:  liquidation ≈ entry × (1 + MMR) − margin ÷ quantity
short: liquidation ≈ entry × (1 − MMR) + margin ÷ quantity

With the original 3,000 of margin this returns 54,300 again. Every event that changes an input — funding, fees, adding to the position, a margin top-up — is worked through in why your liquidation price changes.

Liquidation price vs bankruptcy price

The two are often confused. The bankruptcy price is where the position’s equity reaches zero: for the long above, 60,000 × (1 − 0.10) = 54,000; for the short, 66,000. The liquidation price sits before it, at 54,300, and the gap — the maintenance margin — is the buffer the venue uses to close the position.

Do not plan on getting that buffer back. What happens to any margin left between the two prices depends on the venue and on the fill the liquidation achieves.

Where the boundary should sit

The computed price is a best case: fees, funding and a higher maintenance tier all move the real level toward your entry. So the useful question is not “where is liquidation” but “does my stop sit comfortably before it”. The leverage and stop-loss table answers that for a range of leverage at once. If liquidation sits inside your stop distance, reduce the position or the leverage rather than tightening the stop.

FAQ

What is the formula for liquidation price?

For an isolated-margin linear perpetual, a long’s liquidation price is approximately entry × (1 − 1/leverage + maintenance margin rate), and a short’s is entry × (1 + 1/leverage − maintenance margin rate). With an entry of 60,000, 10× leverage and an illustrative maintenance rate of 0.5%, that gives 54,300 for a long and 65,700 for a short.

Why doesn’t the liquidation formula need my position size?

Because quantity cancels out: margin, unrealised PnL and the maintenance requirement all scale with it. Position size still matters indirectly, since venues apply a higher maintenance rate to larger positions, which moves the liquidation price closer to entry.

Why is my exchange’s liquidation price different from my calculation?

The exchange includes details the generic formula leaves out: tiered maintenance rates and amounts, fees and funding deducted from margin, the mark price used to trigger liquidation, and, under cross margin, your other positions. These usually move the real level closer to entry, so trust the venue’s figure.

What is the difference between liquidation price and bankruptcy price?

The bankruptcy price is where the position’s equity would reach zero; the liquidation price is where it falls to the maintenance requirement, which comes first. For a 10× long at 60,000, bankruptcy is at 54,000, and liquidation, with an illustrative 0.5% maintenance rate, at 54,300.