1. How the calculator works: Hyperliquid's formulas
Every number above follows Hyperliquid's own documentation (margining, margin tiers, liquidations, funding and fees), with each market's limits read from Hyperliquid's public API at build time. Nothing is a generic "exchange" approximation:
Initial margin = position size × mark price ÷ leverage
Maintenance margin = notional × MM rate − deduction; MM rate = 50% × (1 ÷ max leverage of the tier)
Liquidation price = price − side × margin_available ÷ size ÷ (1 − l × side)
margin_available = isolated margin (cross: account value) − maintenance margin; l = MM rate of the tier at the liquidation price
Fee per fill = notional × fee rate (tier) × (1 − referral discount)
Funding per hour = size × oracle price × hourly funding rate (positive: longs pay shorts)
Net PnL = side × (exit − entry) × size − entry fee − exit fee − funding; ROE = PnL ÷ initial margin
- side
- +1 long, −1 short
- size
- position size in coins (rounded to the lot)
- price
- entry / mark price
- deduction
- keeps maintenance margin continuous across tiers (0 in the first tier)
- Leverage: per Hyperliquid's margining docs, leverage is any whole number from 1x to the asset's maximum, checked only when the position is opened. The maximum depends on the asset and, for large positions, on the margin tier the notional falls into, so the calculator caps it for you.
- Maintenance margin is 50% of the initial margin at the tier's maximum leverage: 1.25% of notional for a 40x market, 5% at 10x, 16.67% at 3x. In higher tiers a deduction keeps the requirement continuous.
- The liquidation price is solved with the tier that applies at the liquidation price, as the docs require, and it is a mark price level: Hyperliquid's mark blends its own book with external exchange prices (Binance (weight 3), OKX (2), Bybit (2), Gate (1) and MEXC (1)).
- Funding is hourly; the calculator pre-fills each market's current rate from the snapshot and multiplies it by your notional and hold time. Funding you pay comes out of your margin, so the result also shows where the liquidation price will sit after the hold.
- Size typed in USD is converted to coins and rounded down to the market's lot, because order sizes are rounded to the asset's size decimals (szDecimals).
2. Worked examples (same code as the calculator, prices of October 20, 2026)
Long BTC, isolated, 10x
$10,000 of BTC at $82,073 is 0.12184 BTC after rounding to the lot ($9,999.77 notional). At 10x the initial margin is $999.98 and the maintenance margin $125.00 (1.25%). The isolated liquidation price is $74,800.7, 8.86% below entry. Opening and closing with market orders at tier 0 costs $4.50 + $4.72; with HOLYGRAIL $8.86. Holding 24 hours at BTC's current funding of 0.00125% an hour costs $3.00. If BTC rises 5% to $86,176.7, gross PnL is $499.99 and net PnL $487.76, an ROE of 48.78% on the margin.
Short HYPE, isolated, 5x
HYPE allows at most 10x, so its maintenance margin is 5% of notional, 4 times BTC's. A $5,000 short at 5x from $79.39 posts $1,000.00 and liquidates at $90.7314 (14.29% above entry). Funding is 0.00125% an hour right now: the short receives $1.50 over 24 hours. A 5% drop to $75.4205 nets $247.11 after fees and funding.
Cross margin: the leverage setting does not move the liquidation price
A $50,000 BTC long backed by a $10,000 cross account liquidates at $66,489.4 whether the leverage is set to 10x or 25x: a cross-margin liquidation price does not depend on the leverage setting, while an isolated one does. The same position in isolated margin at 10x has only $4,999.97 behind it and liquidates at $74,800.7. Cross is safer for this position only because the whole account stands behind it, which is also why one bad cross position can take the account with it.
Whale size: the second margin tier
Above $150M of notional BTC drops to 20x maximum leverage. A $200,000,000 position is capped at 20x, its maintenance margin is 2.5% of notional minus a $1,875,000 deduction ($3,125,000 in total), and it liquidates at $79,179.4. Because it is worth more than 100,000 USDC at liquidation, Hyperliquid would first send only 20% of it to the book as a market liquidation order; for the next 30 seconds any further liquidation order is for the whole position.
Trade it on the deepest on-chain order book
Hyperliquid with HOLYGRAIL: 0.0432% taker / 0.0144% maker at tier 0, 4% off your first $25M of volume, isolated or cross margin on every perp.
3. Liquidation distance by leverage (isolated, $10,000)
How far price can move against a fresh isolated position before it is liquidated, long / short, using each market's maximum leverage and maintenance margin (mark prices of October 20, 2026). A dash means the market does not allow that leverage.
| Leverage | BTC (max 40x) | ETH (max 25x) | SOL (max 20x) | HYPE (max 10x) |
|---|---|---|---|---|
| 2x | −49.37% / +48.15% | −48.98% / +47.06% | −48.72% / +46.34% | −47.37% / +42.86% |
| 3x | −32.49% / +31.69% | −31.97% / +30.72% | −31.62% / +30.08% | −29.82% / +26.98% |
| 5x | −18.99% / +18.52% | −18.37% / +17.65% | −17.95% / +17.07% | −15.79% / +14.29% |
| 10x | −8.86% / +8.64% | −8.16% / +7.84% | −7.69% / +7.32% | −5.26% / +4.76% |
| 20x | −3.8% / +3.7% | −3.06% / +2.94% | −2.56% / +2.44% | — |
| 25x | −2.78% / +2.72% | −2.04% / +1.96% | — | — |
| 40x | −1.27% / +1.23% | — | — | — |
The pattern: distance ≈ 1 ÷ leverage minus the maintenance rate. At an asset's maximum leverage a long liquidates when it has lost about half its margin, because maintenance is half the initial margin at that leverage. The smallest markets, such as VVV, allow only 3x, so even at their maximum the move to liquidation is wide.
4. The Hyperliquid rules this calculator applies
| Rule | Hyperliquid (official) | In the calculator |
|---|---|---|
| Max leverage | Set per asset, 3x to 40x; on October 20, 2026: 1 at 40x, 1 at 25x, 2 at 20x, 30 at 10x, 56 at 5x, 88 at 3x | Market list with each max; leverage rounded down to a whole number and capped |
| Margin tiers | BTC: 40x up to $150M, 20x above; ETH: 25x up to $100M, 15x above; SOL: 20x up to $70M, 10x above; XRP: 20x up to $40M, 10x above; 21 markets: 10x up to $20M, 5x above; 9 markets: 10x up to $3M, 5x above | Tier from the position's notional sets the cap; maintenance uses the tier rate and deduction |
| Maintenance margin | 50% of the initial margin at max leverage (1.25% to 16.67%) | Applied per tier |
| Liquidation | Mark price; equity below maintenance margin; sent to the book as market orders; no clearance fee on liquidations | Price shown is the mark-price trigger |
| Large positions | Over 100,000 USDC: only 20% is sent to the book first; for the next 30 seconds every liquidation order is for the whole position; backstop by the liquidator vault below two-thirds of maintenance margin | Note shown when the position is that large at liquidation |
| Funding | Paid every hour (interval: 1 hour), capped at 4%/hour; interest component 0.01% per 8 hours; funding is paid on position size × the spot oracle price, not the mark price | Current rate per market, or yours; per hour, per day, over the hold |
| Fees | Tier 0: 0.045% taker / 0.015% maker, down to 0.024% / 0% at tier 6; referral −4% on the first $25M | Tier and order type per fill; HOLYGRAIL toggle |
| Minimum order | $10 of value; order sizes are rounded to the asset's size decimals (szDecimals) | Checked; size rounded down to the lot |
| Removing margin | At least 10% of open notional must remain | Not modelled (no withdrawals) |
Markets, leverage caps, margin tables, lot sizes, mark prices and funding: Hyperliquid info API (metaAndAssetCtxs), Tue, 20 Oct 2026 03:53 UTC. Rules: Hyperliquid docs, read October 1, 2026 (sources below).
5. Isolated vs cross margin on Hyperliquid
Isolated margin puts only the position's own margin at risk: the liquidation price depends on the leverage you set, and you can add margin to push it away. Cross is Hyperliquid's default and shares your whole account value across cross positions, so the liquidation price depends on account value, not on the leverage slider, and unrealised profit on one cross position supports the others. If your account holds less than the initial margin, Hyperliquid's estimate assumes you top it up, and so does this calculator. The full comparison, including when each mode loses less in a crash, is in Hyperliquid cross vs isolated margin.
6. Limitations
- An estimate, not trading advice. The liquidation price excludes trading fees (as the docs formula does) and assumes the cross account holds only this position.
- Liquidation is triggered by the mark price, and funding is charged on the oracle price; the calculator uses your entry price for both at the start. Spread and slippage on the fills are not included.
- Funding is held constant at the rate you see; real hourly rates change every hour.
- Prices and funding are a build-time snapshot (Tue, 20 Oct 2026 03:53 UTC); use "Use live price" for the current mark. HIP-3 markets (builder-deployed perps) and unified or portfolio-margin accounts follow other rules and are not covered.
For the venue comparison (Lighter, Aster, edgeX), use the DEX liquidation price calculator; for where other traders' liquidations sit, the Hyperliquid liquidation map; for fee tiers and staking, Hyperliquid fees explained.
Sources (official pages behind every rule, with the date each figure was last verified in our facts registry)
- api.hyperliquid.xyz/info (verified October 15, 2026)
- app.hyperliquid.xyz/referrals (verified October 19, 2026)
- hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/error-responses (verified September 26, 2026)
- hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/tick-and-lot-size (verified October 1, 2026)
- hyperliquid.gitbook.io/hyperliquid-docs/referrals (verified October 19, 2026)
- hyperliquid.gitbook.io/hyperliquid-docs/trading/fees (verified October 19, 2026)
- hyperliquid.gitbook.io/hyperliquid-docs/trading/funding (verified October 19, 2026 · 2 figures)
- hyperliquid.gitbook.io/hyperliquid-docs/trading/liquidations (verified October 1, 2026 · 3 figures)
- hyperliquid.gitbook.io/hyperliquid-docs/trading/margin-tiers (verified October 14, 2026 · 2 figures)
- hyperliquid.gitbook.io/hyperliquid-docs/trading/margining (verified October 1, 2026)
- hyperliquid.gitbook.io/hyperliquid-docs/trading/robust-price-indices (verified September 27, 2026)