Understanding how to calculate profit and loss (PnL) is fundamental for anyone trading expiry futures contracts. Whether you're trading coin-margined or U-stablecoin-margined contracts, accurately determining your PnL helps you make informed decisions and manage risk effectively. This guide breaks down the essential formulas, provides clear examples, and answers common questions to give you a comprehensive understanding of the calculations involved.
Key Concepts and Formulas
Before diving into calculations, it's important to understand the basic components used in all PnL formulas.
Position Size
The Size refers to the number of contracts you hold or the crypto/fiat value of your position. In One-way mode, long positions have a positive size, while short positions have a negative size. In Hedge mode, both long and short positions are represented with positive numbers.
Entry Price
Your average Entry Price changes when you increase your position size or open a reverse position. It is also replaced by the settlement price upon settlement. The formulas below always use a positive value for "Size".
- For Coin-margined contracts:
Entry Price = (Current Size + Added Size) / (Current Size / Entry Price + Added Size / Added Size's Entry Price)
- For U-stablecoin-margined contracts:
Entry Price = (Current Size x Entry Price + Added Size x Added Size's Entry Price) / (Current Size + Added Size)
Types of Profit and Loss Calculations
Floating PnL
This represents your unrealized gain or loss based on the current mark price.
Coin-margined contracts:
- Long PnL = Face value x |Size| x Multiplier x (1/Entry price - 1/Mark price)
- Short PnL = Face value x |Size| x Multiplier x (1/Mark price - 1/Entry price)
U-stablecoin-margined contracts:
- Long PnL = Face value x |Size| x Multiplier x (Mark price - Entry price)
- Short PnL = Face value x |Size| x Multiplier x (Entry price - Mark price)
Floating PnL Ratio
This percentage shows your unrealized gain or loss relative to the margin you've posted for the position.Floating PnL Ratio = (Floating PnL / Position's margin) x 100%
Closed PnL
This is your realized gain or loss from partially or fully closing a position at a specific close price.
Coin-margined contracts:
- Long PnL = Face value x |Size| x Multiplier x (1/Entry price - 1/Close price)
- Short PnL = Face value x |Size| x Multiplier x (1/Close price - 1/Entry price)
U-stablecoin-margined contracts:
- Long PnL = Face value x |Size| x Multiplier x (Close price - Entry price)
- Short PnL = Face value x |Size| x Multiplier x (Entry price - Close price)
Settlement PnL
Upon contract expiry, your final gain or loss is calculated using the settlement price.
Coin-margined contracts:
- Long PnL = Face value x |Size| x Multiplier x (1/Entry price - 1/Settlement price)
- Short PnL = Face value x |Size| x Multiplier x (1/Settlement price - 1/Entry price)
U-stablecoin-margined contracts:
- Long PnL = Face value x |Size| x Multiplier x (Settlement price - Entry price)
- Short PnL = Face value x |Size| x Multiplier x (Entry price - Settlement price)
Realized PnL
This is your total realized gain or loss, which aggregates amounts from closing trades, settlements, and fees.Realized PnL = Closed PnL + Settlement PnL + Trading Fee
Realized PnL Ratio
This metric expresses your realized gain or loss as a percentage of the margin used for the closed portion of the position.Realized PnL Ratio = (Realized PnL / Closed position's margin) x 100%
Practical Calculation Examples
Calculating a New Entry Price
U-stablecoin-margined example:
You hold a long BTC-USDT futures position of 10 contracts, entered at 100,000 USDT. You then increase your long position by 5 contracts at a fill price of 160,000 USDT.New Entry Price = (10 x 100,000 + 5 x 160,000) / (10 + 5) = 1,800,000 / 15 = 120,000 USDT
Coin-margined example:
You hold a short BTC-USD futures position of 10 contracts, entered at 100,000 USD. You increase your short position by 5 contracts at a fill price of 80,000 USD.New Entry Price = (10 + 5) / (10/100,000 + 5/80,000) = 15 / (0.0001 + 0.0000625) = 15 / 0.0001625 ≈ 92,307 USD
Calculating Floating PnL
U-stablecoin-margined example:
You are long 10 contracts of BTC-USDT futures. Face value is 0.01 BTC, multiplier is 1. Your entry price was 100,000 USDT and the current mark price is 160,000 USDT.Long PnL = 0.01 x 10 x 1 x (160,000 - 100,000) = 0.1 x 60,000 = 6,000 USDT
Coin-margined example:
You are short 1,000 contracts of BTC-USD futures. Face value is 100 USD, multiplier is 1. Your entry price was 100,000 USD and the mark price is 80,000 USD.Short PnL = 100 x 1000 x 1 x (1/80,000 - 1/100,000) = 100,000 x (0.0000125 - 0.00001) = 100,000 x 0.0000025 = 0.25 BTC
Calculating Floating PnL Ratio
U-stablecoin-margined example:
Your long position has a floating PnL of 6,000 USDT. You initially posted a margin of 1,600 USDT for this position.Floating PnL Ratio = (6,000 / 1,600) x 100% = 3.75 x 100% = 375%
👉 Explore advanced trading calculators
Frequently Asked Questions
What is the difference between Floating PnL and Realized PnL?
Floating PnL shows your current unrealized profit or loss based on the mark price—it changes with the market and is not locked in until you close the position. Realized PnL is the actual profit or loss you have already secured from closing trades, settlements, and after accounting for all paid fees.
Why does my entry price change when I add to a position?
Your entry price is the average cost of your entire position. When you add contracts at a new price, the average cost basis of your total holdings is recalculated. This new average becomes your updated entry price for the entire position.
How does settlement affect my PnL?
Settlement occurs when a futures contract expires. Your final profit or loss for that expired contract is calculated using the official settlement price instead of the mark or close price. This Settlement PnL is then realized and added to your balance.
What is the purpose of the PnL Ratio?
The PnL Ratio (both floating and realized) measures your return on investment relative to the margin you used. It provides a percentage-based view of your performance, making it easier to compare the efficiency of different trades regardless of their absolute size.
Are trading fees included in the PnL calculations?
Fees are not included in the basic Floating, Closed, or Settlement PnL formulas. They are, however, a crucial part of the final Realized PnL calculation. Your true net gain or loss is always Closed PnL + Settlement PnL minus the trading fees you paid.
Is the calculation different for inverse (coin-margined) contracts?
Yes, the core difference lies in the quote currency and the formula structure. Coin-margined contracts calculate PnL in the base cryptocurrency (e.g., BTC) using formulas that involve the inverse of the price (1/Price), while U-stablecoin-margined contracts calculate PnL in a stablecoin like USDT using straightforward price differences.
This document is for informational purposes only and is not intended to provide investment, tax, or legal advice. Digital asset investments, including leveraged trading, are highly risky and can result in significant losses. You should carefully consider your financial situation and risk tolerance before engaging in such activities. Past performance is not indicative of future results.