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: LeverUp leverage caps 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.
LeverUp margin-loss rule
In LeverUp mode 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 rule reflects LeverUp's public documentation and app
as of 2026-10-19; the venue can change it at any time, and the 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 LeverUp rules above. The GOLD leverage cap of 25x comes 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.
Position size and risk:reward
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
LeverUp liquidation price 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.
Risk:reward is |target − E| ÷ |E − stop|, and potential reward is risk times that ratio. The
direction checks require a stop on the losing side and a target on the winning side of the entry.
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 LeverUp lists for the market, 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
- LeverUp leverage caps and liquidation rule: 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 82,000 and ETH 2,400. 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-10-20".
- 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.
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 LeverUp 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.