Introduction: model your leveraged crypto trades
Crypto margin and futures trading let you control a large position size with relatively small capital. This can amplify gains, but it also magnifies losses and increases the risk of liquidation if the market moves against you.
This crypto margin trading calculator helps you:
- Estimate gross and net profit or loss (PnL) for long and short trades.
- See how fees and funding erode returns.
- Understand your position size (notional value) from margin and leverage.
- Approximate a liquidation price using a simplified maintenance margin model.
- Compare different leverage, fee, and funding scenarios before placing a trade.
The tool is designed for traders using crypto perpetual swaps, futures, or margin products who want a quick way to sanity‑check a trade idea and understand risk.
Key concepts and definitions
This calculator uses the following core concepts. We use the term position size (notional value) consistently to mean the dollar value of your exposure:
- Margin (capital): the amount of your own funds you commit to a leveraged trade.
- Leverage (x): a multiplier that scales your margin into a larger position size.
- Position size (notional value): the dollar value of the underlying asset you control: margin × leverage.
- Entry price: the price where you open the position.
- Exit price: the price where you close the position.
- Direction: long benefits from prices going up; short benefits from prices going down.
- Fees: trading commissions charged on the notional value when you open and close.
- Funding: periodic payments between longs and shorts on perpetual swaps, entered here as an approximate daily percentage.
- Maintenance margin: the minimum equity (as a percentage of position size) the exchange requires to avoid liquidation.
Formulas used in the calculator
The calculator uses a simplified linear model. It assumes 1 unit of the contract or coin equals 1 USD of notional (e.g., a USD‑margined contract). For more complex products the logic is similar, but the exact lot size may differ.
1. Position size (notional value)
The first step is to convert your margin and leverage into position size:
This position size is sometimes called notional value or exposure.
2. Price change and PnL
For a linear USD‑margined contract where 1 contract ≈ 1 USD of notional, we can express PnL directly from the price change. The core relationship is:
- Long position: PnL increases when exit price > entry price.
- Short position: PnL increases when exit price < entry price.
Let direction be +1 for a long and −1 for a short. Then the simplified PnL formula is:
In words: PnL equals position size times the percentage price move in your favor or against you. This is clearer and more accurate than the ambiguous expression “PnL = Notional × Exit − Entry”.
3. Trading fees
You supply a single percentage rate as Total Fees per Side (% of notional). The calculator applies this to both entry and exit:
- Entry fee = position size × fee rate.
- Exit fee = position size × fee rate.
- Total fees = entry fee + exit fee.
Here, fee rate is expressed as a percentage of notional. For example, 0.06 means 0.06% per side (0.0006 in decimal).
4. Funding payments
Funding is approximated as a simple daily charge on position size:
- Daily funding cost = position size × daily funding rate.
- Total funding = daily funding cost × holding period (in days).
If you typically see a funding rate quoted per 8 hours, you can convert it to a daily rate by multiplying by 3. For example, if funding is 0.01% per 8 hours, the approximate daily rate is 0.03%. You would enter 0.03 in the Funding Rate per Day (%) field.
5. Net PnL and return on equity
Once the calculator has gross PnL, fees, and funding, it computes:
- Net PnL = gross PnL − total fees − total funding.
- Return on equity (ROE) = net PnL ÷ margin.
ROE shows how effectively your initial margin was used, taking leverage and costs into account.
6. Approximate liquidation price
Liquidation occurs when your equity falls to the maintenance margin level. This calculator uses a simple approximation:
- Initial equity ≈ margin.
- Maintenance requirement = position size × maintenance margin rate.
The available loss before liquidation is roughly:
Loss buffer ≈ margin − maintenance requirement.
From this, the calculator derives the approximate price move that would consume this buffer, and backs out the liquidation price. Actual exchanges use more complex engines with tiered margin, insurance funds, and auto‑deleveraging, so the result should be treated as a directional guide, not an exact liquidation trigger.
How to use the calculator
- Select position direction
Choose Long if you expect the price to rise, or Short if you expect it to fall.
- Enter entry and exit prices
Use your planned entry price and a target or hypothetical exit price. You can adjust the exit price to see how PnL and liquidation distance change.
- Enter margin (capital)
Type the amount of your own capital you intend to commit as initial margin for this trade.
- Set leverage
Enter the leverage multiple your exchange offers for this pair (for example 5×, 10×, or 20×). Higher leverage increases position size and risk.
- Set fees and funding
Look up your exchange’s taker or maker fee in percent and enter it as Total Fees per Side. Then enter the approximate daily funding rate and your planned holding period in days.
- Enter maintenance margin
Check the maintenance margin rate for your contract and size on your exchange. Enter this as a percentage of notional (for example 1 for 1%).
- Click “Calculate Trade”
Review the results: gross PnL, fees, funding, net PnL, ROE, and approximate liquidation price.
Worked example
Consider a BTC perpetual swap trade with the following settings (similar to the default form values):
- Direction: Long
- Entry price: $30,000
- Exit price: $32,000
- Margin: $1,000
- Leverage: 10×
- Total fees per side: 0.06% of notional
- Funding rate per day: 0.01%
- Holding period: 2 days
- Maintenance margin: 1% of notional
Step 1: position size
Position size = margin × leverage = $1,000 × 10 = $10,000.
Step 2: gross PnL
The price increases from $30,000 to $32,000, a move of:
(32,000 − 30,000) ÷ 30,000 = 2,000 ÷ 30,000 ≈ 6.67% in your favor.
Gross PnL ≈ 6.67% × $10,000 ≈ $667 (rounded).
Step 3: trading fees
- Entry fee = $10,000 × 0.06% = $10,000 × 0.0006 = $6.
- Exit fee = $10,000 × 0.06% = $6.
- Total fees = $6 + $6 = $12.
Step 4: funding costs
- Daily funding = $10,000 × 0.01% = $10,000 × 0.0001 = $1.
- Holding period = 2 days → total funding ≈ $2.
Step 5: net PnL and ROE
- Net PnL ≈ $667 − $12 − $2 = $653 (rounded; your actual calculator output may differ slightly due to rounding choices).
- ROE = $653 ÷ $1,000 ≈ 65.3% return on your margin.
This illustrates how a ~6.7% move in the underlying price can generate roughly a 65% gain on your capital at 10× leverage, but also how fees and funding slightly reduce that return.
Step 6: approximate liquidation
- Maintenance margin requirement = 1% × $10,000 = $100.
- Initial equity ≈ $1,000.
- Loss buffer ≈ $1,000 − $100 = $900.
A loss of roughly $900 on a $10,000 position corresponds to about a 9% adverse move. A 9% drop from $30,000 is around $27,300, which is consistent with the example liquidation region given. On a real exchange, liquidation may occur somewhat earlier or later depending on fees, funding, and the exchange’s risk engine.
Interpreting your results
When you run different scenarios, focus on the following outputs:
- Net PnL: This is the most relevant measure of outcome. If your strategy shows attractive gross PnL but low or negative net PnL after fees and funding, you may be overtrading or relying too heavily on small price moves.
- Return on equity (ROE): A very high ROE can look appealing, but it usually comes with high liquidation risk. Compare the ROE to how far the liquidation price is from your entry.
- Liquidation distance: The smaller the percentage distance between entry price and liquidation price, the more likely normal volatility can force you out. Consider lowering leverage or increasing margin if liquidation is uncomfortably close.
- Cost share: Compare total fees + funding to your gross PnL. If costs consume a large share of gross PnL, your strategy may not be robust in the long run, especially under changing fee tiers or funding spikes.
If your results look extremely sensitive to tiny changes in inputs (for example, a 0.01% change in fee rate or a half‑day change in holding period), the strategy might be too fragile for real‑world trading conditions.
Comparison: low vs high leverage scenarios
| Scenario |
Leverage |
Position size (notional) |
Approx. ROE on 5% favorable move |
Approx. liquidation distance |
| Conservative |
3× |
Margin × 3 |
~15% (before costs) |
Far from entry (large buffer) |
| Moderate |
5× |
Margin × 5 |
~25% (before costs) |
Moderate distance |
| Aggressive |
10× |
Margin × 10 |
~50% (before costs) |
Close to entry (small buffer) |
| Very aggressive |
20×+ |
Margin × 20 or more |
100%+ (before costs) |
Very close to entry (high liquidation risk) |
This table is illustrative only. The calculator will show concrete numbers for your specific trade, including actual net PnL after fees and funding.
Limitations and assumptions
This crypto margin trading calculator is intentionally simplified. It is designed for education and planning, not for exact replication of any single exchange’s risk engine. Key assumptions and limitations include:
- Linear contracts: Assumes a linear relationship between price changes and PnL, similar to a USD‑margined perpetual or futures contract. Inverse or coin‑margined contracts may behave differently.
- Constant leverage: Assumes leverage is constant throughout the trade and does not model partial closures, adding to the position, or cross‑margin effects.
- Simple fee model: Uses a flat percentage fee per side on notional value. It does not model tiered fee schedules, discounts, rebates, or additional costs such as funding spikes at specific intervals.
- Simplified funding: Treats funding as a linear daily percentage of notional. Real funding is discrete (often every 8 hours), can change over time, and can sometimes pay you instead of costing you.
- Approximate liquidation: The liquidation formula is approximate and based on maintenance margin as a simple percentage of notional. Real exchanges include insurance funds, auto‑deleveraging, mark prices, and additional safeguards that can shift the actual liquidation point.
- No slippage or spread: Assumes you can open and close at the specified entry and exit prices without slippage, spread, or order‑book impact.
- No tax treatment: Ignores tax, financing, and accounting considerations, which vary by jurisdiction.
Because of these simplifications, you should treat the results as estimates for scenario analysis rather than precise predictions of how a specific exchange will behave.
Risk and disclaimer
Leveraged crypto trading is highly risky. Even small adverse price moves can trigger liquidation and large losses, especially at high leverage. This calculator does not provide investment advice or a recommendation to trade any specific asset or leverage level. Always verify the exact rules, fee structure, funding mechanics, and margin requirements on your chosen exchange before trading. Only risk capital you can afford to lose.
Enter values to estimate PnL and liquidation.