How to Calculate Margin, P&L, and Liquidation Price in Perpetual Contracts (With Formula Breakdown)

·

Perpetual contracts have become the most traded instrument in the cryptocurrency market. However, they are a unique innovation within the crypto space and differ significantly from traditional financial products. This makes understanding perpetual contracts challenging—even for experienced traders. Many users engage in perpetual trading daily but remain unclear about key metrics like margin, profit and loss (P&L), and liquidation price.

In this guide, we’ll break down the core mechanics of perpetual contracts using simple math and clear formulas. You'll learn how to calculate margin requirements, determine your P&L, and estimate your liquidation price—critical knowledge for managing risk and maximizing returns.

Understanding Perpetual Contracts

The full name of a perpetual contract is “futures perpetual contract,” combining three key concepts: futures, perpetual, and contract.

What Is a Futures Contract?

Unlike spot trading—where assets are exchanged immediately—futures involve an agreement to buy or sell an asset at a predetermined price on a future date.

For example:

This is a standard futures delivery contract, which expires and settles on a specific date. To ensure both parties fulfill their obligations, each must post margin—a form of collateral.

The Perpetual Difference

Perpetual contracts have no expiration date. They allow traders to hold positions indefinitely, thanks to a mechanism called funding rates, which we won’t cover here but are essential for price alignment with the underlying market.

There are two main types of perpetual contracts:

👉 Discover how margin works across different contract types with real-time tools.

Linear vs. Inverse Contracts: Key Differences

FeatureLinear ContractInverse Contract
Margin CurrencyUSDT (or other stablecoin)BTC (base asset)
Payout CurrencyUSDTBTC
Contract Value BasisBTC amount per contractUSDT value per contract

For instance:

Note: Contract specifications vary by exchange. Always check official documentation.

Calculating Initial Margin

Margin is the collateral required to open a leveraged position.

Linear Contract Margin Formula

Margin = (Contract Size × Number of Contracts × Mark Price) / Leverage

Example:

Margin = (0.1 × 5 × 20,000) / 2 = $5,000 USDT

Inverse Contract Margin Formula

Margin = (Contract Size × Number of Contracts) / (Leverage × Mark Price)

Using the same exposure:

Margin = (100 × 100) / (2 × 20,000) = 0.25 BTC

At $20,000/BTC, 0.25 BTC = $5,000 — equivalent to the linear contract.

👉 Use advanced calculators to simulate margin and leverage scenarios.

Profit and Loss (P&L) Calculation

Linear Contracts

Long Position:

P&L = (Exit Price - Entry Price) × Contract Size × Contracts

Short Position:

P&L = (Entry Price - Exit Price) × Contract Size × Contracts

Example (Long):

Inverse Contracts

Due to BTC-denominated margin, P&L formulas use reciprocal pricing.

Long Position:

P&L = (1/Entry - 1/Exit) × Contract Size × Contracts

Short Position:

P&L = (1/Exit - 1/Entry) × Contract Size × Contracts

Example (Long):

💡 Despite different formulas, both contract types yield equivalent USD profits when settled.

A key insight: Inverse contracts exhibit non-linear P&L behavior.

This convex relationship affects risk management strategies.

Liquidation Price Calculation

Liquidation occurs when losses equal or exceed available margin.

Linear Contracts

Long Position:

Liquidation Price = Entry Price × (1 - 1/Leverage)

Example:

With 50x leverage? Liquidation at ~$19,600.

Short Position:
Same formula applies with upward movement:

Liquidation Price = Entry Price × (1 + 1/Leverage)

Inverse Contracts

More complex due to changing BTC value.

Long Position:

Liquidation Price = Entry Price / (1 + 1/(Leverage - 1))

Wait—correct derivation shows:

Actually:

Liquidation Price = Entry Price × (1 - 1/(Leverage + 1))

Example (2x Long):
= $20,000 × (1 - 1/3) ≈ $13,333

Short Position:

Liquidation Price = Entry Price × (1 + 1/(Leverage - 1))

At 2x leverage:
= $20,000 × (1 + 1/1) = $40,000 → 100% increase before liquidation

And here's the kicker:

With inverse contracts, a 1x short position never liquidates.

Because as price rises, the BTC value of your margin increases proportionally. This is why seasoned traders often prefer inverse contracts for bearish bets.

Core Keywords

Frequently Asked Questions

What is the difference between margin in linear and inverse contracts?

Linear contracts use stablecoins (like USDT) for margin, making P&L predictable in fiat terms. Inverse contracts use the base asset (like BTC), so P&L fluctuates with price—even if your USD gain is fixed.

Why does an inverse contract have non-linear P&L?

Because profit is measured in BTC while the contract tracks USD value. As price increases, each additional dollar of gain converts into fewer BTC units—leading to diminishing returns in crypto terms.

Can you avoid liquidation completely?

Only with inverse short positions at 1x leverage. All other positions will eventually liquidate under extreme adverse moves unless additional margin is added.

How do exchanges calculate mark price?

Exchanges use a composite index from multiple spot markets to prevent manipulation. This "mark price" determines liquidation triggers—not the last traded price.

Is higher leverage always riskier?

Generally yes—but with inverse contracts, high leverage shorts can be less sensitive to price spikes than expected due to the nature of BTC-denominated margin.

Should beginners use linear or inverse contracts?

Beginners should start with linear contracts. They’re simpler, with stablecoin margins and intuitive P&L calculations—making risk easier to manage.

👉 Start practicing with low-risk simulations on a trusted platform.