1. How the calculator sizes a trade
Position sizing starts from the loss you accept, not from the leverage you like. The stop-loss decides how far price may move against you; the risk budget decides how much that move may cost; the size follows. Crypto perps add three venue details that most position size calculators ignore: the fee on both fills, a minimum order and size step, and a liquidation price that must stay out of the stop's way.
Dollar risk = account × risk %
Stop distance = |entry − stop| ÷ entry
Notional = dollar risk ÷ (stop distance + entry fee + stop fee × stop ÷ entry)
Size = notional ÷ entry, rounded down to the size step
Margin = notional ÷ leverage
Loss at stop = size × |entry − stop| + entry fee + stop fee (≤ dollar risk)
- entry fee
- entry notional × the entry rate (taker for a market order, maker for a resting limit order)
- stop fee
- size × stop price × the taker rate (a stop-loss fills as a market order)
- size step
- the venue's order increment, e.g. 0.00001 BTC on Hyperliquid
Stop-loss calculator: from a stop % to a price the venue accepts
Stop price = entry × (1 − stop %) for a long and entry × (1 + stop %) for a short. The result then has to fit the venue's price grid, or the order is rejected: Hyperliquid accepts at most 5 significant figures (whole numbers always pass), so a 2% stop under $82,073 is $80,431.54 on paper and $80,431 on the order form; Lighter, Aster and edgeX each publish a fixed tick per market (BTC: $0.1 tick on Lighter, $0.1 tick on Aster, $0.1 tick on edgeX). The calculator rounds a long's stop down and a short's stop up, never tighter than you typed, rounds the take-profit toward the entry, and sizes the trade on the rounded prices it shows in the order details.
The exit fee is charged at the stop price, not at the entry price: a short stopped out above entry pays a slightly larger exit fee than it paid to enter, and a long slightly less. Sizing with the stop-price fee keeps the true loss at the stop inside the budget on both sides. After rounding down to the size step, the loss at the stop is the budget or a few cents under it.
Leverage is not in the size formula. It only decides the margin (notional ÷ leverage) and therefore the isolated liquidation price, which the calculator works out with each venue's maintenance-margin rules and compares with your stop. For the strategy side (how much to risk per trade, the 1% rule, Kelly, volatility stops) read the position sizing strategy guide.
2. Worked examples: long, short, small account
Long BTC on Hyperliquid (the calculator's default)
- Account $10,000, risk 1% = $100.00. Entry $82,073 (Hyperliquid mark, October 20, 2026, 03:53 UTC), stop $80,431 (2% below), target $85,355.
- Fees: market entry and stop at 0.045% (base tier, standard rate; 0.0432% with code HOLYGRAIL), limit take-profit at 0.015%.
- Notional = $100.00 ÷ (2% + entry fee + stop fee) = $4,785.24; size = 0.05830 BTC after rounding down to 0.00001 BTC (0.06090 BTC if you ignored fees).
- Loss at the stop: $99.99 including $4.26 of fees. Profit at the target: $188.44 after fees, so a 1 : 2.00 setup is 1 : 1.88 after costs.
- At 5x the margin is $956.97 and the isolated liquidation price is $66,489.5, 9.5× the stop distance away. The highest leverage that keeps liquidation at least twice the stop distance away is 19x.
Short ETH on Lighter with a fixed dollar risk
Account $5,000, risk $50, short ETH at $2,411.8 with a stop about 3% higher at $2,484.16 (on Lighter's $0.01 tick) and a target about 6% lower, limit entry, 10x. Lighter's Standard account charges 0% on both sides, so the size is simply $50 ÷ ($2,484.16 − $2,411.8) = 0.690989 ETH, rounded down to the 0.0001 ETH step: 0.6909 ETH ($1,666.31, a stop distance of 3%). The loss at the stop is $49.99, the profit at the target $99.97. Margin at 10x is $166.63; liquidation sits at $2,621.5, 2.9× the stop distance above entry: OK.
Small account on Hyperliquid: the minimum order
Account $200, risk 0.5% ($1), long BTC with a wide 10% stop. The risk-based size is $9.91 of notional. That is below Hyperliquid's $10 minimum order, so the order would be rejected. The smallest valid order, 0.00013 BTC, risks $1.08 at that stop: accept the larger risk knowingly, tighten the stop only if the chart allows it, or skip the trade.
edgeX: a coin minimum and a coarse size step
edgeX sets its minimum in coins, not dollars: 0.03 ETH, traded in steps of 0.01 ETH. With a $1,000 account, 1% risk and a 3% stop on an ETH long, the budget allows $323.74, which rounds down to 0.13 ETH ($313.53); the loss at the stop is $9.68 instead of the full $10 because a coarse step can only round down. It clears the minimum. Remember that edgeX accounts are cross margin: to make the liquidation estimate hold, open the trade in its own sub-account funded with the margin shown.
Trade the sized position where the book is deepest
Hyperliquid: isolated or cross margin, a $10 minimum order and 4% off fees with code HOLYGRAIL. Zero-fee alternative: Lighter's Standard account with 718610TD.
3. Why fees belong in the size
A stop-out costs the stop distance plus two fees. Size on the stop alone and every loss is bigger than planned; on tight stops, much bigger. The table keeps the $100 budget and the BTC long at $82,073 and changes only the stop distance. Hyperliquid at its base tier without a referral code (0.045% taker on entry and stop) against Aster (0.04% taker) and Lighter Standard (0%):
| Stop distance | Notional, fees ignored | Hyperliquid, fees in | Size cut by fees | Aster, fees in | Lighter, fees in |
|---|---|---|---|---|---|
| 0.25% | $39,841 | $29,336 | 26.4% | $30,310 | $39,997 |
| 0.5% | $19,969 | $16,933 | 15.2% | $17,246 | $19,998 |
| 1% | $9,997 | $9,175 | 8.2% | $9,262 | $9,999 |
| 2% | $4,998 | $4,785 | 4.3% | $4,809 | $5,000 |
| 5% | $2,000 | $1,965 | 1.7% | $1,969 | $2,000 |
Our arithmetic with the calculator's module, before size-step rounding. Fee rates verified on the dates under Sources.
On a 0.25% scalp the fees take 26% of the budget, so the honest size is far smaller than the naive one; on a 5% swing stop they barely matter. That is why tight-stop traders use limit entries, the referral discount or a zero-fee venue. Funding is the other cost of holding: Hyperliquid and Lighter settle it every hour, around 0.01% per 8 hours in a quiet market, and it is not part of the size. For multi-day holds, leave room for it or check the funding rates guide. All fee schedules side by side: DEX fee calculator.
4. Leverage, liquidation and the stop
Take the default BTC long ($4,784.86 on Hyperliquid, stop 2% below entry) and open it at different leverage. The loss at the stop stays $99.99 in every row; only the margin and the isolated liquidation price move.
| Leverage | Margin | Liquidation price | Distance | Verdict vs the stop |
|---|---|---|---|---|
| 2x | $2,392.43 | $41,555.9 | −49.37% | OK: stop well before liquidation |
| 3x | $1,594.95 | $55,407.9 | −32.49% | OK: stop well before liquidation |
| 5x | $956.97 | $66,489.5 | −18.99% | OK: stop well before liquidation |
| 10x | $478.49 | $74,800.7 | −8.86% | OK: stop well before liquidation |
| 19x | $251.83 | $78,737.6 | −4.06% | OK: stop well before liquidation (highest that passes) |
| 20x | $239.24 | $78,956.3 | −3.8% | Tight: less than 2× the stop distance |
| 30x | $159.50 | $80,341.5 | −2.11% | Tight: less than 2× the stop distance |
| 40x | $119.62 | $81,034.1 | −1.27% | Danger: liquidated before the stop |
Isolated long, maintenance margin 1.25% (Hyperliquid BTC: half the initial margin at the 40x maximum). Liquidation = Hyperliquid's documented formula, liq = price − side × margin available ÷ size ÷ (1 − l × side).
Why twice the stop distance rather than "just beyond the stop"? A stop-loss becomes a market order when it triggers and can slip in a fast move; Hyperliquid caps the slippage of market TP/SL orders at 10%, a limit rather than the expected fill. Funding also drains isolated margin over time and pulls the liquidation price toward the market. The 2× buffer absorbs both. In cross margin the liquidation price depends on the whole account, not on the leverage setting; the isolated estimate is the conservative one. Per-asset caps for every market: leverage tiers compared.
5. Venue rules the calculator applies
The formula is the same everywhere; the inputs are not. These are the values the calculator loads, from each venue's docs and public market data (verification dates under Sources; Hyperliquid max leverage from the build-time snapshot, October 20, 2026, 03:53 UTC).
| Hyperliquid | Lighter | Aster | edgeX | |
|---|---|---|---|---|
| Max leverage BTC / ETH / SOL / HYPE (first tier) | 40x / 25x / 20x / 10x | 50x / 50x / 25x / 20x | 200x / 200x / 100x / 300x | 100x / 100x / 75x / 30x |
| First tier ends at (notional) | $150M / $100M / $70M / $20M | no tier / no tier / no tier / no tier | $400 / $400 / $50k / $1,000 | $1M / $800k / $500k / $300k |
| Maintenance margin, first tier | 1.25% / 2% / 2.5% / 5% | 1.2% / 1.2% / 2.4% / 3% | 0.25% / 0.25% / 0.5% / 0.2% | 0.5% / 0.5% / 0.67% / 1.67% |
| How maintenance margin is set | Half the initial margin at the asset's max leverage (50%) | 60% of the initial margin fraction, one rate per market | Bracket rate × notional minus a maintenance amount; rate steps up with size | Risk-tier rate × the whole position value (no deduction); rate steps up with size |
| Minimum order | $10 notional | $10 notional and a minimum base amount: 0.00007 BTC, 0.0020 ETH, 0.055 SOL, 0.07 HYPE | 5 USDT notional and one size step | 0.001 BTC / 0.03 ETH / 0.5 SOL / 0.60 HYPE |
| Size step BTC / ETH / SOL / HYPE | 0.00001 / 0.0001 / 0.01 / 0.01 | 0.00001 / 0.0001 / 0.001 / 0.01 | 0.001 / 0.001 / 0.01 / 0.01 | 0.001 / 0.01 / 0.1 / 0.01 |
| Price grid BTC / ETH / SOL / HYPE | 5 significant figures, at most 6 − size decimals; whole numbers always valid | $0.1 / $0.01 / $0.001 / $0.0001 | $0.1 / $0.01 / $0.01 / $0.001 | $0.1 / $0.01 / $0.01 / $0.001 |
| Largest single order BTC / ETH / SOL / HYPE | No per-order maximum in the docs | No per-order maximum in the API | 120 / 2,000 / 8,000 / 20,000 per market order (limit: 1,000 / 10,000 / 1,000,000 / 200,000) | 100 / 1,500 / 15,000 / 3,400 |
| Taker / maker fee (entry tier) | 0.045% / 0.015% | 0% / 0% | 0.04% / 0% | 0.045% / 0.04% |
| Isolated margin | Yes (cross is the default) | Yes | Yes (Pro order book) | Via sub-accounts (up to 20 per wallet); accounts are cross margin |
| Liquidation trigger | Mark price; equity below maintenance margin | Mark price; account value below maintenance margin | Mark price; margin below maintenance margin | Oracle price; position margin down to maintenance |
| What a liquidation costs | No clearance fee; below two-thirds of maintenance the backstop keeps the maintenance margin | Partial liquidation at the "zero price", up to 1% fee; LLP takes over below 40% of initial margin | Liquidation fee, part to the insurance fund | 1% liquidation fee |
- Hyperliquid sets maintenance margin to half the initial margin at the asset's maximum leverage, so BTC at 40x needs 1.25% and a 10x asset such as HYPE 5%. Above a notional tier (BTC $150M) the maximum drops to 20x; the calculator re-tiers at the liquidation price as the docs describe. Liquidations go to the book first with no clearance fee.
- Lighter uses one maintenance rate per market (60% of the initial margin fraction). Below it the engine liquidates at the "zero price", which leaves the account value at about zero if everything closes there, so treat liquidation on Lighter as losing the whole isolated margin.
- Aster steps maximum leverage and maintenance margin with position size (brackets, each with a maintenance amount); the calculator picks the bracket for your notional. Its 1001x mode is a separate product and is not modelled.
- edgeX lists one maintenance rate per risk tier and no deduction, so the calculator applies the tier's rate to the whole position value; a short that grows into the next tier can be liquidated right at the tier boundary, and the verdict says so. Single orders are capped per market (BTC 100), and the calculator warns when the size needs splitting. edgeX accounts are cross margin; isolation means a separate sub-account. Liquidation uses the oracle price, charges a 1% fee, and the minimum order is set in coins per market.
6. What the calculator does not include
- Slippage and spread. A stop-market order fills at the market, not at your stop price. On BTC and ETH the gap is usually small at retail size; on small caps or in a crash it can be large. Widen the budget or cut size if the book is thin.
- Funding over the holding time (it changes the margin, not the size).
- Fee tiers above the entry tier, HYPE staking discounts and Lighter Premium; enter your own rates under "Other exchange" if you trade at a higher tier.
- Cross margin. The liquidation estimate is isolated: the position backed only by its margin. In cross margin the whole account backs it and the liquidation price is further away while other positions are healthy.
- Mark vs last price. Liquidations use the mark (or oracle) price; your chart may show the last trade. Prices default to the Hyperliquid mark at build time and are a close proxy, not the exact price, on the other venues.
- It is a planning tool, not financial advice. Check the exchange's own order form before you submit.
Sources (official pages behind every number, with the date we last checked them)
- api.hyperliquid.xyz/info (verified September 26, 2026)
- docs.asterdex.com/trading/perpetuals/fees-and-specs/fees (verified October 19, 2026)
- docs.lighter.xyz/trading/contract-specifications (verified October 14, 2026)
- docs.lighter.xyz/trading/trading-fees (verified October 19, 2026)
- edgex-1.gitbook.io/edgeX-documentation/trading/trading-accounts-and-margin (verified October 1, 2026)
- edgex-prod-v2.edgex.exchange/api/v2/public/meta/getMetaData (verified October 1, 2026 · 5 figures)
- fapi.asterdex.com/fapi/v1/exchangeInfo (verified September 26, 2026 · 4 figures)
- 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 September 26, 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/liquidations (verified September 27, 2026 · 2 figures)
- hyperliquid.gitbook.io/hyperliquid-docs/trading/margin-tiers (verified October 15, 2026)
- mainnet.zklighter.elliot.ai/api/v1/orderBookDetails (verified September 26, 2026 · 5 figures)
- pro.edgex.exchange/vip (verified October 14, 2026)
- asterdex.com/bapi/futures/v1/friendly/future/common/brackets (verified October 14, 2026)
- binance.com/en/fee/futureFee (verified October 15, 2026)
Liquidation rules: Hyperliquid docs (trading/liquidations, margin tiers), Lighter docs (liquidations and LLP), Aster docs (Pro liquidations), edgeX docs (trading accounts and margin, liquidation logic), all read October 1, 2026. Price grids: Hyperliquid docs (for developers: tick and lot size), Lighter orderBookDetails, Aster exchangeInfo and edgeX metadata, read the same day.