Methodology: how the calculators work
Every figure on this site comes from a small set of pure functions that run in your browser and again at build time for the example tables. Nothing is fetched live. This page lists each formula, the assumptions behind it, where the reference data comes from and what the numbers cannot tell you.
Last updated · Reference data: venue leverage caps (LeverUp preset) as of 2026-10-19, CME specs as of 2026-10-19
Notation
E is the entry price, L the leverage, M the margin you post,
N the notional (position value), Q the quantity of the asset, f the
fee rate per side as a decimal and MMR the maintenance margin rate. Notional is
N = M × L and quantity is Q = N ÷ E. A long gains when price rises, a short when it falls.
All results are in USD, before taxes, and assume you are the only trader in the market (no slippage).
Liquidation price
Generic exchange model
For an isolated, linear (USD-margined) position with fees and funding ignored:
Long: liq = E × (1 − 1/L + MMR)Short: liq = E × (1 + 1/L − MMR)
The adverse move you can absorb is therefore 1/L − MMR in both directions. When you leave
Auto MMR on, the calculator uses MMR = min(0.5%, 0.5 ÷ L): half of the initial margin
fraction, capped at 0.5%. That is a simplification. Real exchanges publish tiered maintenance margin tables by
position size, so use the Auto setting for orientation and type in your venue's own rate when it matters. If you
enter an MMR at or above 1/L the page warns you that the position would be liquidated immediately.
Margin-loss rule (used by some venues, e.g. LeverUp)
In the LeverUp preset liquidation is modelled as the point where a fixed share of margin has been lost:
Long: liq = E × (1 − liqLoss / L)Short: liq = E × (1 + liqLoss / L)
with liqLoss = 0.85 up to 100x and 0.80 above 100x (for example the dedicated 1001x BTC
and ETH markets). Fees are ignored here as well. The LeverUp preset reflects that venue's public documentation and app
as of 2026-10-19; a venue can change its rules at any time, and its app is the final authority for your own
position.
Safe leverage helper
The liquidation page also lists the highest whole-number leverage whose liquidation distance is at least the adverse move you enter, checking each leverage from 1x up to the asset's cap. It is a long, isolated-margin check and does not account for fees or wicks that overshoot your number.
Cross margin and the 2x to 50x tables
Cross-margin liquidation
Under cross margin the whole account balance W backs the position, so equity is
W + dir × (P − E) × Q and liquidation happens when it falls to the maintenance margin of all open
positions. With the same simplification as the isolated formula (maintenance taken on notional at entry), a long
liquidates at E − (W − MMR × (Q × E + Nother)) ÷ Q and a short at
E + (W − MMR × (Q × E + Nother)) ÷ Q, where Nother is the notional of other
open positions. Those are assumed flat (no profit or loss), so they only add maintenance margin. With W equal to
the margin on this position and no other positions the result is exactly the isolated liquidation price. A long
whose result is zero or below cannot be liquidated by a falling price, and the page says so.
Not modelled: tiered maintenance margin, haircuts on non-USD collateral, hedge netting, unrealised profit on other positions, liquidation fees and partial liquidation. "Most you can lose" is the margin under isolated and the whole balance W under cross.
2x to 50x tables
Position size is margin × leverage. The price move to liquidation is the generic
1/L − MMR above, and a long P&L cell is margin × leverage × move before fees, shown as a
full loss of margin when the adverse move reaches that distance. Short P&L has the opposite sign of the same price move.
Gold position sizing
Ounces = lots × ounces per lot. The default of 100 oz per lot is a common convention for XAUUSD CFDs and mini and micro
lots scale to 10 oz and 1 oz; it is not an exchange rule, and the field is editable. Notional is ounces × price,
margin is notional ÷ L, and profit is ounces × (exit − entry) for a long, minus fees on both legs.
Pip value is pip size × ounces with the pip set to $0.01 or $0.10, the two conventions brokers use.
Liquidation uses the generic and margin-loss rules above. The GOLD leverage cap of 25x is the LeverUp preset's value, taken from the
LeverUp app as of 2026-10-19. The example gold price is a round number, not a quote, and funding is not modelled.
DCA and average entry
Average entry is Σ(price × quantity) ÷ Σ quantity; for a USD amount per buy, quantity is amount ÷ price.
Break-even for a long is (cost + buy fees) ÷ (quantity × (1 − f)) and for a short
(proceeds − fees) ÷ (quantity × (1 + f)). In leveraged mode each add posts the margin you enter at your
leverage, so size is margin × L, and after each add the liquidation price is the isolated formula applied to the new average
entry (margin always equals notional at entry ÷ L, so that formula is exact in this model). If the next add price is already
at or beyond the previous generic liquidation price, the position is treated as liquidated and that add and later ones are
ignored. Fees and funding are excluded from liquidation, and venues that re-margin or mark positions differently will differ.
Risk reward ratio and break-even win rate
Gross R:R is |target − E| ÷ |E − stop| with the stop on the losing side and the target on the winning side of entry.
Leverage changes ROE at the stop and target but not that distance ratio. Net R:R in the
risk reward calculator subtracts round-trip taker fees on the sized notional and optional
funding over the hold you enter. Break-even win rate is 1 ÷ (1 + net R:R) when reward and risk are measured in dollars after fees.
Liquidation uses the same generic isolated formula as the main calculator (MMR = min(0.5%, 0.5 ÷ L)); if the stop is beyond liquidation the page warns that the stop may never trigger.
Hyperliquid liquidation and fees (unofficial)
The Hyperliquid calculator uses Hyperliquid’s published liquidation rule
liq = price − side × margin_available ÷ size ÷ (1 − l × side) with
l = 1 ÷ (2 × max leverage at tier) and tiered maintenance
notional × rate − deduction from the committed meta snapshot (as of 2026-10-20 unless refreshed).
Isolated margin_available is isolated margin minus maintenance; cross mode uses account value minus maintenance for the position.
Fees follow the public tier table by 14-day volume, with HYPE staking discounts, optional 4% referral on taker and positive maker, HIP-3 multipliers, and maker-rebate tiers as selectable adjustments.
PnL is linear on USD notional with fees on each leg and optional hourly funding. This is an unofficial educational model, not a Hyperliquid product.
Trading cost: fees, builder fee, slippage and funding
The trading fee calculator sums five lines on a notional N with exit notional N' = N × (1 + move):
entry fee N × fin, exit fee N' × fout, builder fee (N + N') × b, slippage (N + N') × s
and funding dir × N × r × (hold ÷ interval), where dir is +1 for a long and −1 for a short, so a positive rate costs a long and pays a short.
Fees are percent of notional (negative for a maker rebate); b and s are basis points per side.
Margin is N ÷ leverage, so cost as a share of margin is the cost as a share of notional times leverage. With c = fin + b + s + funding ÷ N and e = fout + b + s
the break-even move is (c + e) ÷ (1 − e) for a long and −(c + e) ÷ (1 + e) for a short, because the exit costs scale with the exit price. Funding is charged on the entry notional and the rate is held constant.
The Hyperliquid presets read the base tier of the fee table described under Hyperliquid above; the builder fee preset is an example value, and the protocol limit on perps is 0.1% (10 bps).
The LeverUp preset is one of the venue presets; it is the standard-tier open and close fee of its public docs (0.03% each, as quoted on our 1001x guide as of 2026-10-19); its other tier and its holding and funding fees are not modelled.
Pair trade sizing, PnL and liquidation
The pair trade calculator goes long leg A with notional NA and short leg B with NB = k × NA, where k = 1 (dollar-neutral) or the beta you enter.
Given a total margin M and leverages LA, LB, NA = M ÷ (1 ÷ LA + k ÷ LB). Quantities are notional ÷ entry price, and the ratio is R = PA ÷ PB.
For a ratio change x and a move y in B, A’s price is multiplied by (1 + x)(1 + y) and B’s by (1 + y), so gross PnL is NA × ((1 + x)(1 + y) − 1) − NB × y; for equal legs it equals N × x × (1 + y).
Each leg’s isolated liquidation price uses the Hyperliquid formula and margin tiers described above. For the shared cross-margin balance the page uses an approximation: with B fixed, equity is wallet + NA × x and liquidation occurs at x* = (maintenance − wallet) ÷ NA, with maintenance the tiered requirement of both legs at entry notionals and fees and funding ignored.
Net funding per interval is (fA × NA − fB × NB), a cost when positive; fees are the taker rate on both legs at entry and exit notionals. Both legs are assumed to sit on one venue.
Position size
risk = account × risk%, stop distance = |E − stop| ÷ E, and
N = risk ÷ (stop distance + 2f). The 2f term charges an opening and a closing fee against
the risk budget, so a stop-out costs the loss plus both fees, not more than your risk. Quantity is
N ÷ E. When you enter a margin, leverage needed = N ÷ M and the calculator checks the
liquidation price (under the selected venue preset) at that leverage against your stop. If the stop sits beyond liquidation you are
warned that the position would be closed before your stop triggers.
Optional take-profit on the position size page shows a target ratio; full net R:R and break-even win rate live on the risk reward calculator.
PnL, ROE, fees and break-even
Gross PnL = direction × (exit − E) × Q, where direction is +1 for a long and −1 for a short. Fees are
charged on notional at each side: open fee = N × f and close fee = Q × exit × f. Net PnL
is gross PnL minus both fees, and ROE = net PnL ÷ M. If the exit price is beyond the liquidation
price, the calculator reports the loss as the whole margin (−100% ROE) instead of extrapolating.
The break-even exit price solves net PnL = 0 for the same fee on both sides:
long = E × (1 + f) ÷ (1 − f) and short = E × (1 − f) ÷ (1 + f). The profit calculator
works with separate buy and sell fee percentages, so its break-even sell price is
(Q × buy + buy fee) ÷ (Q × (1 − sell fee rate)) for a long.
ROI vs ROE. On the profit page ROI is net profit over the cash you invest. With leverage above 1x the invested cash is treated as margin, so the same ratio is reported as ROE.
Funding
Estimated funding is N × rate × (hold hours ÷ interval hours), with the rate you type per interval
(typically 8 hours). A positive rate means longs pay shorts. Funding is not part of liquidation or break-even
unless you add it manually, and real funding rates change every interval.
Futures tick values (CME)
ticks moved = direction × (exit − entry) ÷ tick size, then
P&L per contract = ticks × tick value − round-turn fee and total P&L multiplies by the number of
contracts. Notional per contract is entry × multiplier. The calculator ships with tick size, tick
value and multiplier for ES, MES, NQ, MNQ, GC, MGC, CL and MCL, taken from the CME Group contract pages listed on
the futures contract calculator and checked on 2026-10-19.
Margin requirements are not modelled: brokers and the exchange change them with volatility.
On-chain perps vs CME contracts
The crypto futures calculator sizes by USD notional rather than by contract.
To mirror a CME position, multiply price by the CME multiplier and enter that as the notional. Margin is
N ÷ L using the leverage cap the venue lists for the market (the LeverUp preset stores its own caps), and liquidation uses the margin-loss
rule above. The mapping between a CME symbol and an on-chain market is approximate: contract specifications,
trading hours, settlement and margin rules differ.
Pip values and lot size
Pip size is 0.0001 for every pair except those quoted in yen (the pair ends in JPY), where it is 0.01; so USD/CHF
and USD/CAD use 0.0001 like EUR/USD. Pip value in USD for one standard lot (100,000 units) is
pip size × 100,000 for pairs quoted in USD, and pip size × 100,000 ÷ rate for pairs with
USD as the base currency. Mini and micro lots scale to 10,000 and 1,000 units. Lot size from risk is
(account × risk%) ÷ (stop in pips × pip value per standard lot).
Gold (XAU/USD) uses a pip of $0.01 on a 100 oz standard lot, so one pip is $1. Some brokers define a gold pip as $0.10; the gold leverage calculator lets you switch between the two. Silver is not covered by the pip calculator.
Data sources and as-of dates
- Leverage caps and margin-loss rule (LeverUp preset): taken from the LeverUp app and public documentation, as of 2026-10-19. Caps by asset are stored in the calculator and shown on the position and perps pages.
- CME contract specifications: tick size, tick value and multiplier from CME Group contract pages (links on the futures contract calculator), as of 2026-10-19.
- Example prices: round numbers taken from public market prices on the refresh date (Hyperliquid public mids, with free public FX and ETF quotes where Hyperliquid has no market), for example BTC 75,000 and ETH 2,150. A few illustrative markets (Quant, pre-IPO names) have no free public source and keep older placeholder values. They are not market quotes. Worked-example tables are labelled "example as of 2026-11-09".
- Generic model parameters: the 0.5% MMR cap and the 0.5 ÷ L rule are modelling choices made on this site, not data from a particular exchange.
Live prices, funding rates and order books are not used. For current funding rates across venues see fundingrates.app; for what leverage of 100x and above means see What is 1000x leverage? on 1000xleverage.com.
Exchange presets and maintenance margin tiers
Besides the LeverUp preset and the generic model, the main calculator and the liquidation page offer Bybit tiers and Hyperliquid tiers. Both turn the position size into an effective maintenance margin rate and feed it to the generic isolated formula above. Bybit: maintenance margin = notional × rate − deduction for the first tier whose limit covers the notional, from Bybit's public risk-limit API (BTCUSDT, ETHUSDT and SOLUSDT, fetched 2026-11-09 (UTC)). Hyperliquid: notional × rate − deduction with rate = 1 ÷ (2 × max leverage at tier) from the meta snapshot dated 2026-11-09. For other assets the page says there is no table and falls back to the generic model.
Exchange calculator pages. The Binance, Bybit, OKX, Bitget and MEXC futures calculators use the same snapshot, fetched 2026-11-09 (UTC) from each exchange's public market data (Binance: the bracket data behind its Leverage & Margin trading-rules page; OKX: position tiers in contracts × contract value; Bitget: position tiers by USDT value; MEXC: risk limits in contracts × contract size). Binance and Bybit tiers carry a deduction; OKX, Bitget and MEXC apply the rate to the whole position. Each page prefills the base-tier taker fee (Binance, Bybit and OKX from their published fee schedules; Bitget and MEXC per contract from their APIs) and works four BTC examples through the exchange's own published isolated formula, next to the generic-formula result the interactive calculator gives. The tier is picked from the entry size, added margin is zero, and Bitget's pre-calculated offset is set to zero because it is not published.
Fees and funding in liquidation. The liquidation formulas ignore fees and funding. If they are paid from the position's margin, each dollar paid moves the liquidation price one dollar ÷ quantity closer, which the worked example on the liquidation page shows. Cross margin changes the balance backing the position (see Cross margin above), not the shape of the formula.
Data files and the stale rule
The reference data behind the calculators is published as JSON, generated at build time from the same stored data:
/data/assets.json (leverage caps by asset and example prices),
/data/cme-specs.json (CME contract specs),
/data/hl-margin-tiers.json (Hyperliquid margin tiers) and
/data/bybit-mmr-tiers.json (Bybit tiers). Every file has version (currently "1"), generated_at (UTC build time), as_of (date of the underlying data), stale_after_days (30), stale, source, fields (one line per field in rows) and rows. A summary for AI assistants is in llms.txt.
Stale rule. A data set whose as_of is more than 30 days before the build is flagged stale: true and, where the page prints its date, marked stale. The mark does not mean the numbers changed, only that nobody has rechecked them recently. Contact, privacy and corrections: About; changes: changelog.
US regulated and offshore view
The home calculator opens in a US regulated view whose leverage is capped at an illustrative 5x; it uses the generic isolated model above with an editable maintenance margin placeholder (0.5% on the auto setting) and no venue-specific table. The offshore and compare views reuse the same formulas with the venue presets and higher leverage, and are for non-US readers and education only. Card B only shows numbers after the reader confirms a notice; a US time zone detected in the browser (no network call, not proof of location) keeps it hidden. See US regulated crypto perps compared for the venues, dated sources and eligibility.
Limitations
- Results are estimates for education, not trading advice, and not a quote from any venue.
- Liquidation engines differ: tiered margin, mark vs last price, partial liquidation and liquidation fees can move the real price.
- Fees, funding, spread and slippage are simplified; funding and slippage are excluded from liquidation.
- Cross margin is modelled in one simple form (see above); hedged positions, collateral haircuts and portfolio margin are not.
- Leverage caps and CME specifications change. If a number here is older than the as-of date shown, check the source.
- Floating-point rounding can move the last displayed digit.
Review and corrections
The formulas are covered by automated tests that check known values (for example a 10x long from 60,000 with 0.5% MMR liquidates at 54,300). The reference data is reviewed against its sources at least once a month and whenever a listed venue or CME announces a change, and the "Last updated" date on each page moves when content or data changes. Spotted a wrong number? Compare it with the formula above and with the venue's own calculator; the venue's figure wins.