Average entry = the sum of every fill’s price × size, divided by total size. For an isolated long, liquidation price ≈ average entry × (1 − 1 ÷ leverage + maintenance margin rate). For a short, flip both signs inside the brackets: average entry × (1 + 1 ÷ leverage − maintenance margin rate).
Those two lines run the average-down calculator, the pyramiding calculator and the hedge cost calculator. The pyramiding one adds a cross margin formula, and all three add a few multiplications for notional, margin, fees and funding. Each formula below comes with a set of numbers. Put them into the calculator and you should get the same answer. If your result doesn’t match the Liq. Price on your Binance or OKX position, the section on the four things the estimate leaves out explains why.
Average entry, notional value and margin
The average-down calculator does three things, one formula each:
- Average entry after adding = (entry price × entry size + add price × add size) ÷ (entry size + add size)
- Notional value = size × price. The calculator uses fill prices to show how big a position you’ve put on. For funding, the exchanges use Mark Price × size.
- Margin used = notional value ÷ leverage. This is a rough initial margin figure, and what the exchange actually locks can differ slightly.
OKX perpetuals are sized in contracts. Switch the calculator to contracts and enter the contract value. Contracts × contract value gives the coin amount, and the formulas stay the same. One BTC-USDT-SWAP contract is 0.01 BTC.
The default is a long: 0.1 BTC at 66,000, 10x Isolated, adding another 0.1 BTC when price drops to 60,000, maintenance margin rate 0.40%. That 0.40% is tier 1 for BTC perpetuals, and in October 2026 Binance’s and OKX’s tier tables showed the same figure. Binance tiers by notional value, and this tier runs to 300,000 USDT. OKX tiers by contracts, and this one runs to 1,000 contracts (10 BTC). Tiers get adjusted, so check the live table.
| Before | After | |
|---|---|---|
| Size (BTC) | 0.1 | 0.2 |
| Average entry (6,600 + 6,000) ÷ 0.2 | 66,000 | 63,000 |
| Notional at fill price (USDT) | 6,600 | 12,600 |
| Margin used (÷ 10) | 660 | 1,260 |
| Liquidation estimate (average × 0.904) | 59,664 | 56,952 |
| Distance: (60,000 − liquidation) ÷ 60,000 | 0.56% | 5.08% |
Extra margin = 1,260 − 660 = 600. Enter a 0.05% fee rate and you get one more line, the fee on the add: 60,000 × 0.1 × 0.05% = 3.00 USDT. For a short, distance works the other way round: (liquidation − current price) ÷ current price.
You can check the short side with the same numbers. Switch the side to short and leave everything else. 60,000 is below the entry, so for a short this is adding to a winner, and the average still lands on 63,000. Before the add, liquidation is 66,000 × 1.096 = 72,336, which is (72,336 − 60,000) ÷ 60,000 = 20.56% away. After it, 63,000 × 1.096 = 69,048, or 15.08% away. Adding to a short lower down moves liquidation down, towards the price.
Where the isolated liquidation estimate comes from
In an isolated long, the position’s margin is average entry × size ÷ leverage. If price falls to P, the unrealised loss is (average entry − P) × size. Liquidation happens when margin minus that loss is down to the maintenance margin, which is maintenance margin rate × P × size. Divide both sides by size and solve:
P = average entry × (1 − 1 ÷ leverage) ÷ (1 − maintenance margin rate)
This simplified form still leaves out fees, the maintenance amount and funding. Move the denominator up, drop a very small term, and you get the approximation the calculator uses. Here is how far apart the two are at the post-add average of 63,000:
| 63,000 average, 10x, 0.40% | Long | Short |
|---|---|---|
| Approximation | 63,000 × 0.904 = 56,952 | 63,000 × 1.096 = 69,048 |
| Simplified form | 63,000 × 0.9 ÷ 0.996 = 56,927.71 | 63,000 × 1.1 ÷ 1.004 = 69,023.90 |
| Approximation minus simplified | +24.29 | +24.10 |
For the long, the approximation puts liquidation a little higher, so it warns you slightly early. For the short it is also about 24 higher, so it warns you slightly late. The gap is under 0.05%. That’s fine for seeing which way an add moves liquidation. It isn’t precise enough to place orders right against your liquidation price.
Four things the estimate leaves out
The simplified form isn’t the exchange’s full calculation either. When Binance or OKX works out your real liquidation, four things come in that none of the calculators include:
Fees. Binance’s futures blog post What Is the Available Balance, Margin Balance, and Total Balance on Binance Futures? gives Wallet Balance = Total Net Transfer + Total Realized Profit + Total Net Funding Fee − Total Commission. Fees charged when you open and add make the balance thinner, so there’s less to absorb losses and a long’s liquidation price moves up a little.
Maintenance amount. From tier 2 up, maintenance margin = notional × maintenance margin rate − maintenance amount. The maintenance amount is the figure that makes neighbouring tiers meet at the boundary. On BTCUSDT tier 2, 300,000 × 0.50% − 300 = 1,200, exactly tier 1’s cap of 300,000 × 0.40%. The approximation doesn’t subtract it, so it overstates maintenance margin and puts a long’s liquidation a bit high, by roughly maintenance amount ÷ position size. Tier 2’s 0.50% rate and 300 maintenance amount are in the tier table behind Binance’s Leverage and Margin of USDⓈ-M Futures page.
Funding. Funding = position notional × funding rate, with notional taken at Mark Price × size. Binance and OKX both settle every 8 hours by default, at 00:00, 08:00 and 16:00 UTC. Payments in and out go through your wallet balance, so the longer you hold, the more funding shifts your liquidation price. How the two exchanges differ on caps and settlement frequency is in Binance vs OKX Futures: Fees, Contract Size and Tiers.
Mark Price vs last price. The price in the official liquidation formula is the Mark Price. The candles on your chart show traded prices, and the two can drift apart for short spells. Your position can be closed before the last traded price touches your estimated liquidation price.
When a calculator’s liquidation price disagrees with the Liq. Price on your position, go with the exchange.
All three calculators give estimates, and a real liquidation can come earlier than the number says. Take the position above after the add: a further drop of just over 5% from 60,000 could wipe out the 1,260 USDT of margin in it.
The cross margin liquidation formula
Binance writes isolated and cross liquidation into one equation. Its variables:
- Wallet Balance (WB): in Isolated mode, this is just the margin assigned to the position
- Maintenance margin of all other contracts (TMM1) and their unrealised PnL (UPNL1): both count as 0 in Isolated
- Maintenance Amount (cumB) and maintenance margin rate (MMR_B)
- Mark Price (MP), entry price (EP), position size, and side (1 for long, −1 for short)
With a single long in a Cross account, the formula simplifies to: wallet balance + size × (P − average entry) = maintenance margin rate × P × size − maintenance amount. Solving:
P = (size × average entry − wallet balance − maintenance amount) ÷ (size × (1 − maintenance margin rate))
Put the post-add position from above into Cross with a 2,000 wallet balance and a tier 1 maintenance amount of 0: (0.2 × 63,000 − 2,000) ÷ (0.2 × 0.996) = 10,600 ÷ 0.1992 = 53,212.85. The isolated estimate was 56,952, so Cross comes out over 3,700 lower. In Cross the whole 2,000 balance absorbs the loss, not just the 1,260 in the position.
The average-down calculator only estimates isolated liquidation. The pyramiding calculator does use this cross formula, but only for an account holding that one position. The reason is in the formula: it needs the whole account’s wallet balance and, if other contracts are open, their margin and PnL too. Only the exchange has those numbers. The calculator doesn’t connect to your account, so any balance you enter can only describe an account holding that single position. For Cross with other positions open, work it by hand with the formula above or read the Liq. Price on the position.
Every other open contract in a Cross account feeds into the same formula, and the more they lose, the closer this position’s liquidation gets to the price. If you average down or pyramid in Cross without transferring funds in, liquidation moves towards the current price. Does Averaging Down Move Your Liquidation Price? works through the numbers.
What the pyramiding calculator does each round
You fill in: side, stake (the margin on your first entry), leverage, entry price, the step between adds, sizing method, number of rounds, maintenance margin rate, and the “Unrealised profit only” switch. First notional = stake × leverage. Then each round:
- Trigger price = entry × (1 + round × step), or minus for a short.
- Target notional for the round: equal = same as the first; pyramid = 50% of the first; inverted pyramid = 150% of the first.
- With profit only, usable profit = total unrealised PnL so far − profit used as margin in earlier rounds, and the round can add at most usable profit × leverage. Anything above that is cut. With the switch off, the round adds the full target and the shortfall counts as extra capital.
- New average, using the average entry formula above.
- Stake-zero price = average − total capital ÷ size, where total capital is the stake plus any extra capital.
- Liquidation price from the cross formula for a one-position account: long = (average − total capital ÷ size) ÷ (1 − maintenance margin rate), which is the stake-zero price ÷ 0.996.
Profit can serve as margin because, in Cross, Available Balance = Wallet Balance − Initial Margin + Unrealized PNL. Whether Isolated lets you open more using profit depends on the maximum size shown on the order screen.
The default when the page loads: long, 1,000 stake, 10x, entry 60,000 (first notional 10,000, about 0.166667 BTC), add every 5%, equal sizing, 3 rounds, profit only, maintenance margin rate 0.40%. Each round is capped at usable profit × 10:
| Round 1 | Round 2 | Round 3 | |
|---|---|---|---|
| Trigger 60,000 × (1 + k × 5%) | 63,000 | 66,000 | 69,000 |
| Total unrealised PnL: size × (trigger − average) | 500.00 | 1,238.10 | 2,311.69 |
| Already used as margin | 0 | 500.00 | 1,238.10 |
| Usable profit | 500.00 | 738.10 | 1,073.59 |
| Cap: usable profit × 10 | 5,000 | 7,380.95 | 10,735.90 |
| Notional actually added (target 10,000) | 5,000 | 7,380.95 | 10,000 |
| Size after the add (BTC) | 0.246032 | 0.357864 | 0.502792 |
| Average after the add | 60,967.74 | 62,540.32 | 64,402.30 |
In round 1, price is 3,000 above the first entry and the profit is 500. Times 10 that’s only 5,000, so the add falls short. In round 2, 0.246032 BTC at 66,000 is up 1,238.10, of which 500 went into round 1. That leaves 738.10 and a cap of 7,380.95, still short. Round 3 has 1,073.59 usable and a cap of 10,735.90, above the 10,000 target, so this is the first full add. No new money went in, so total capital is still 1,000.
| After round 3, measured from 69,000 | Value |
|---|---|
| Stake-zero price 64,402.30 − 1,000 ÷ 0.502792 | 62,413.40 |
| Liquidation 62,413.40 ÷ 0.996 | 62,664.06 |
| Account equity 1,000 + 0.502792 × (69,000 − 64,402.30) | 3,311.69 |
| Pullback to liquidation (69,000 − 62,664.06) ÷ 69,000 | 9.18% |
| Pullback to stake zero (69,000 − 62,413.40) ÷ 69,000 | 9.55% |
The calculator’s headline is those last two rows: after round 3, a 9.55% pullback takes the stake to zero and a 9.18% pullback liquidates. Liquidation sits 250.66 above the stake-zero price, because Cross still needs maintenance margin, so price hits liquidation first. The 3,311.69 on screen can go, along with the original 1,000, on a pullback of less than 10%.
How the hedge cost calculator prices three hedges
One set of formulas per mode:
- A, both sides on one exchange: fees = notional × fee rate × number of orders, and net funding is 0. Same exchange, same contract, equal size, same Mark Price and same rate. Under notional × funding rate, what the long pays is exactly what the short receives. That result comes from the funding formula, not from an exchange statement. If you fill in an average funding rate, the page shows what each side pays and receives, and the net is still 0.
- B, long on one exchange, short on another: net funding = notional × (long-side rate − short-side rate) × settlements per day × days. Positive means you pay, negative means you receive. Each exchange has its own fee rates, and each holds its own margin.
- C, spot plus a short: spot has no funding. Short funding = notional × rate × settlements per day × days, and the short receives when the rate is positive. Fees are the spot buy and sell plus the futures open and close. Tied up is the full spot value plus futures margin.
Defaults: 10,000 USDT notional, 7 days, 3 settlements a day, 10x, 2 orders to open and 2 to close (one in and one out on each side), futures taker at 0.05% both ways. Binance and OKX regular-user perpetual rates are both 0.02% maker / 0.05% taker. The two spot orders in C use 0.1%, OKX’s regular-user spot taker rate from its fee page. Funding rates change every period, and the table assumes 0.01% and 0.005%.
| Mode and working | Fees | Funding (21 settlements) | Total cost | Tied up |
|---|---|---|---|---|
| A: 10,000 × 0.05% × 4 | 20.00 | 0 | 20.00 | 2,000 |
| B: funding 10,000 × (0.01% − 0.005%) × 3 × 7 | 20.00 | pay 10.50 | 30.50 | 2,000 |
| C: 10,000 × 0.1% × 2 + 10,000 × 0.05% × 2; short receives 10,000 × 0.01% × 3 × 7 | 30.00 | receive 21.00 | 9.00 | 11,000 |
In A, each side ties up 1,000 of margin (10,000 ÷ 10). Fill in a 0.01% average rate in A and the page shows the long paying 21.00 and the short receiving 21.00, net 0. In C, tied up is the 10,000 of spot plus 1,000 of short margin.
In mode A, a 7-day hedge costs the same 20.00 as a 1-day hedge. The days don’t add cost. What weighs on you is the 2,000 of margin sitting idle.
The two formulas in short
What is the liquidation price formula for an isolated long and short?
Long: average entry × (1 − 1 ÷ leverage + maintenance margin rate). Short: average entry × (1 + 1 ÷ leverage − maintenance margin rate). At 10x with a 0.40% maintenance margin rate, that is 0.904 × entry for a long and 1.096 × entry for a short. It ignores fees, the maintenance amount and funding.
How do I work out the liquidation price of a long in Cross margin?
If it is the only position in the account and sits in tier 1, solve wallet balance + size × (P − average entry) = maintenance margin rate × P × size − maintenance amount. That gives P = (size × average entry − wallet balance − maintenance amount) ÷ (size × (1 − maintenance margin rate)). With other positions open, their margin and unrealised PnL also go into Binance's formula.