Margin Top-Up Calculator
How much margin do you need to lower a long liquidation price or raise a short liquidation price? Solve for extra collateral under a generic isolated linear model.
Generic isolated linear model. This is an estimate, not a venue-exact liquidation quote. Default inputs are a fixed example, not live prices. Enter your own position; no live data is needed.
Your position
USD collateral · coin quantityResult
Generic estimate- Additional collateral needed
- Current liquidation price
- Resulting liquidation price
- Collateral after top-up
- Effective entry leverage
Maintenance and estimated closing fees are valued at the liquidation boundary. No maintenance deduction or funding is included. Actual mark-price liquidation mechanics, risk-tier changes and cross/portfolio margin are excluded. Adding collateral does not prevent all losses; verify your exchange's rules and account liquidation price.
Target liquidation price formula
E is entry in USD per coin, q is coin quantity, C is current isolated collateral in USD and T is your desired liquidation boundary. Rates m (maintenance) and f (estimated closing fee) are fractions: 0.005 means 0.5%. Let a = m + f, with 0 ≤ a < 1.
Long LP = max(0, (qE − C) / (q × (1 − a)))
Short LP = (qE + C) / (q × (1 + a))
Required total C: long = qE − qT × (1 − a); short = qT × (1 + a) − qE
Extra = max(0, required total C − C); Effective entry leverage = qE / (C + extra). The resulting LP substitutes C + extra into the same forward formula.
A long target must be below entry; a short target above entry. A closer target already satisfied by your collateral returns zero top-up, never a suggestion to remove margin. Long T = 0 means full collateralization with no positive-price liquidation under this model. Short T = 0 is invalid.
Worked examples
Fixed inputs · no closing fee- At E = $100,000, q = 1 coin, C = $10,000 and m = 0.005, current long LP is $90,452.2613. Targeting $80,000 requires $100,000 − $80,000 × 0.995 = $20,400 total collateral: add $10,400.
- The new long LP is ($100,000 − $20,400) / 0.995 = $80,000; effective entry leverage becomes 4.9020×.
- For the same short position, targeting $120,000 requires $120,000 × 1.005 − $100,000 = $20,600 total: add $10,600. Substitution gives ($100,000 + $20,600) / 1.005 = $120,000.