1. How the average down calculator works
Averaging down means buying more of something after its price has fallen, so that your average entry price drops. The new average is a size-weighted average: a big buy moves it more than a small one. With equal quantities it is just the mean of the prices: 10 units at $100, $80 and $60 average $80.00. Shorts work in mirror image: adding to a short at higher prices averages the entry up.
Average entry = Σ(price × quantity) ÷ Σ quantity
Fees paid = Σ(price × quantity) × fee rate
Break-even (long) = (Σ price × quantity + fees) ÷ (quantity × (1 − exit fee rate))
Size to reach a target average Y at price X = quantity × (average − Y) ÷ (Y − X)
Liquidation (long) = (quantity × average − margin − deduction) ÷ (quantity × (1 − maintenance rate))
- quantity
- coins, shares or contracts held after the fill
- margin
- isolated: Σ price × quantity ÷ leverage; cross: the collateral backing the position
- maintenance rate
- the venue’s maintenance margin for the size (Hyperliquid: half the initial margin at max leverage)
- deduction
- the tier deduction that keeps maintenance margin continuous (0 in the first tier)
The calculator applies the same steps to every row, oldest first, and shows them in the table: the position size, the average entry and the break-even after each fill, plus (for perps) the liquidation price and how far it sits from that fill’s price. The fee rate is taken from the venue’s official fee schedule in our facts registry, or from the custom percentage you enter, and charged on the notional (price × quantity) of each fill. The break-even assumes you also pay that rate on the way out.
2. Worked examples
Spot: two equal buys, with fees
You buy 0.1 BTC at $100,000 and another 0.1 BTC at $92,000 on Hyperliquid spot with market orders (0.07% taker at the base tier). You hold 0.2 BTC at an average of $96,000.00. The fees on both buys come to $13.44, so with the same fee on the sale the break-even is $96,134.49: a 4.49% rise from $92,000. Without the second buy you would need 8.7% just to get back to $100,000.
Perp, cross margin, no new margin (the default above)
Same two fills, but as a Hyperliquid BTC perp in a cross account holding $5,000 (cross margin is Hyperliquid’s default mode). After the first fill the account backs 0.1 BTC, and the liquidation price is $50,632.91, 44.96% below $92,000. After the second fill the same $5,000 backs 0.2 BTC: liquidation rises to $71,898.73, only 21.85% below the price, and the effective leverage is 4.4x. The leverage setting does not change this: at 5x instead of 10x the liquidation price is still $71,898.73, because Hyperliquid’s docs say the cross liquidation price is independent of the leverage setting (it depends on the account value). Leverage only decides whether the add is allowed: the position after the fill needs size × price ÷ leverage of margin. At 3x the second fill needs $6,133.33 against an account value of $4,200.00, so you would have to deposit about $1,933.33 first. With that deposit the liquidation price is $62,109.70; Hyperliquid’s own estimate makes the same assumption: when there is not enough margin for a trade, its liquidation price estimate assumes the account is topped up to the initial margin requirement.
Perp, isolated margin added at 10x
Now each fill posts its own margin: $10,000 ÷ 10 + $9,200 ÷ 10 = $1,920.00. Liquidation moves from $91,139.24 to $87,493.67 (4.9% below $92,000), so the added margin pushed it lower. But a fresh 10x long of 0.2 BTC opened at $92,000 would be liquidated at $83,848.10, 8.86% away. The averaged position is closer to liquidation because it carries the $800.00 loss of the first fill.
Solver: how much to buy to reach a target average
Holding 0.2 BTC at $96,000.00, you want an average of $95,000 and can buy at $92,000. The solver gives q = 0.2 × (96,000 − 95,000) ÷ (95,000 − 92,000) = 0.066667 BTC ($6,133.33). On the cross example above, liquidation would then sit at $77,215.19. Leave the target blank and the calculator shows the halfway case, which always needs exactly as much again as you hold.
Short: averaging up
You short 2 ETH at $4,000 on Hyperliquid at 10x isolated and add 2 more at $4,300. The average entry is $4,150.00, the break-even after taker fees $4,146.27, and the liquidation price moves from $4,313.73 to $4,475.49, 4.08% above $4,300.
See the liquidation price before you add
Hyperliquid shows the liquidation price on every open position and the estimate on every order ticket. Join with HOLYGRAIL for 4% off your fees on your first $25M of volume.
3. Why averaging down a perp moves your liquidation price
A perp is liquidated when the account value (collateral plus unrealized PnL) falls below the maintenance margin of the position. Averaging down changes two of those three inputs at once: it raises the size, which raises the maintenance margin, and it adds a fill whose loss starts at zero while the earlier fills are already under water.
- Cross margin, no deposit: the collateral stays the same while the position grows, so liquidation always moves toward the price in percentage terms. This is the common case: Hyperliquid and edgeX both default to cross margin (on edgeX, isolated margin means a separate sub-account).
- Isolated margin at the same leverage: every add brings margin, so the liquidation price follows the lower average, but the averaged position is still nearer liquidation than a fresh one at today’s price, as the isolated example shows.
- Not enough free margin: on a cross account the position after each add needs size × price ÷ leverage of margin. On Lighter, a position cannot be increased while the account value is below the initial margin requirement. The calculator flags any fill that would need a deposit first and, like Hyperliquid’s estimate, shows the liquidation price after that deposit.
- Fills beyond the old liquidation price: if a planned add sits below the liquidation price of the position before it, the position would be gone before that order fills. The calculator marks that fill with ⚠.
The way to keep a ladder of adds safe is to plan it before the first entry: put all the planned fills in the rows, check the liquidation price after the last one, and either add margin, lower the size or set a stop above that level. More on the two modes in cross vs isolated margin on Hyperliquid and on chain reactions in how to avoid a liquidation cascade.
4. Venue rules the calculator applies
| Market | Max leverage | Maintenance margin (first tiers) | Liquidation checked against | Taker / maker fee |
|---|---|---|---|---|
| Hyperliquid BTC | 40x | 1.25% (40x) up to $150M, then 2.5% (20x) above | Mark price | 0.045% / 0.015% |
| Hyperliquid ETH | 25x | 2% (25x) up to $100M, then 3.333% (15x) above | Mark price | 0.045% / 0.015% |
| Hyperliquid SOL | 20x | 2.5% (20x) up to $70M, then 5% (10x) above | Mark price | 0.045% / 0.015% |
| Hyperliquid XRP | 20x | 2.5% (20x) up to $40M, then 5% (10x) above | Mark price | 0.045% / 0.015% |
| Hyperliquid HYPE | 10x | 5% (10x) up to $20M, then 10% (5x) above | Mark price | 0.045% / 0.015% |
| Lighter BTC | 50x | 1.2% (50x) at any size | Mark price | 0% / 0% |
| Lighter ETH | 50x | 1.2% (50x) at any size | Mark price | 0% / 0% |
| Lighter SOL | 25x | 2.4% (25x) at any size | Mark price | 0% / 0% |
| Lighter HYPE | 20x | 3% (20x) at any size | Mark price | 0% / 0% |
| Aster BTC | 200x | 0.25% (200x) up to $400, then 0.33% (150x) to $300,000 | Mark price | 0.04% / 0% |
| edgeX BTC | 100x | 0.5% (100x) up to $1M, then 0.67% (75x) to $3M | Oracle price | 0.045% / 0.04% |
From our facts registry, each record re-read from the venue’s docs or public API (dates under Sources). Hyperliquid: maintenance margin = 50% of the initial margin at max leverage, with a tier deduction above the first tier. Lighter: maintenance fraction from the order-book API. Aster: Pro-mode BTC brackets with their maintenance amounts. edgeX: BTC risk tiers 1–8 (one maintenance rate per tier). Leverage is a whole number, capped at the tier maximum for the size the position reaches. Fees: Hyperliquid tier 0 (with the HOLYGRAIL discount while the referral box is ticked), Lighter Standard, Aster VIP 1 (Crypto General pairs), edgeX Regular.
On Aster, liquidation is triggered when margin (collateral + realized + unrealized PnL) below the maintenance margin, at the mark price. Lighter starts a partial liquidation below the maintenance requirement and lets its LLP take over below the close-out level, at 40% of the initial margin fraction; the calculator shows the maintenance level, where liquidation starts. For any other venue, choose “Custom maintenance margin” and enter its rate.
5. Limitations
- An estimate, not financial advice. Real fills come with spread and slippage; the calculator uses the prices you enter.
- Fees and funding are not deducted from the margin in the liquidation price; on a position held for days funding can move it.
- Cross margin is modelled as one position backed by the collateral you enter; other positions in the same account change the real liquidation price.
- Venues liquidate on the mark price (edgeX: the oracle price), which can differ from the last trade in fast markets.
- Spot fees are charged on the notional in the quote currency; some venues take the buy fee in the coin you receive, which changes the quantity slightly.
- The trading “average price” here is not the cost basis a tax authority may require.
Sources (official pages behind every rate and rule, with the date we last checked them)
- api.hyperliquid.xyz/info (verified October 15, 2026)
- docs.asterdex.com/trading/perpetuals/fees-and-specs/fees (verified October 19, 2026)
- docs.asterdex.com/trading/perpetuals/fees-and-specs/liquidations (verified October 1, 2026)
- docs.lighter.xyz/trading/contract-specifications (verified October 14, 2026)
- docs.lighter.xyz/trading/liquidations-and-llp-insurance-fund (verified October 1, 2026)
- docs.lighter.xyz/trading/trading-fees (verified October 19, 2026)
- edgex-1.gitbook.io/edgeX-documentation/trading/liquidation-logic (verified October 1, 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 14, 2026)
- hyperliquid.gitbook.io/hyperliquid-docs/trading/fees (verified October 15, 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 15, 2026)
- hyperliquid.gitbook.io/hyperliquid-docs/trading/margining (verified September 27, 2026 · 2 figures)
- mainnet.zklighter.elliot.ai/api/v1/orderBookDetails (verified October 14, 2026)
- pro.edgex.exchange/vip (verified October 14, 2026)
- asterdex.com/bapi/futures/v1/friendly/future/common/brackets (verified October 14, 2026)