The formula
For an isolated position on a linear (USDT-margined) perpetual, the usual estimate is:
long: liquidation ≈ entry × (1 − 1 ÷ leverage + maintenance rate) short: liquidation ≈ entry × (1 + 1 ÷ leverage − maintenance rate)
At 20x a long from 76,600 with 0.5% maintenance margin is liquidated near 73,153, a 4.5% move. At 100x the same long goes at about 76,217, half a percent away.
Why it is an estimate
Exchanges use the mark price, not the last trade, and charge more maintenance margin on bigger positions through margin tiers. Fees and funding paid also come out of the margin. Cross margin works differently again: the whole account balance backs the position, so the liquidation price moves as other positions win or lose. Treat this as the place to stay well away from, and check your exchange's own figure before you trade.
Your stop has to come first
If the liquidation price sits between your entry and your stop, the exchange closes you before your stop can, at a worse price and with a liquidation fee. Enter a stop and the calculator gives the most leverage that keeps the liquidation beyond it. Stay comfortably below that number: wicks, fees and funding all eat into the gap.
Leverage does not change your risk
The amount a trade risks is set by its size and its stop. Leverage only changes how much margin the exchange holds against it. Size the trade first with the position size calculator, then choose a leverage that keeps the liquidation well past the stop.