Trading in the cryptocurrency market, especially with derivatives like USDT perpetual contracts, requires a solid grasp of how profits and losses are calculated. Whether you're a beginner or an experienced trader, understanding key metrics such as average entry price, unrealized PnL, unrealized PnL percentage, and realized PnL is essential for making informed decisions and managing risk effectively.
This guide breaks down each component of PnL calculation in a clear, step-by-step manner, using practical examples to illustrate how these values are derived and what factors influence them.
Average Entry Price
The average entry price is the weighted mean price at which your current position was opened. It updates dynamically whenever you add to your existing position at a different price.
👉 Discover how real-time trading impacts your average entry price and optimize your strategy today.
Formula:
Average Entry Price = Total Contract Value (in USDT) / Total Contract QuantityWhere:
Total Contract Value = (Quantity₁ × Price₁) + (Quantity₂ × Price₂) + ...
Example:
- Trader A holds 0.5 BTC long at $5,000
- Later adds 0.3 BTC long at $6,000
Total Contract Value = (0.5 × 5000) + (0.3 × 6000) = 2500 + 1800 = 4300 USDT
Total Quantity = 0.5 + 0.3 = 0.8 BTC
Average Entry Price = 4300 / 0.8 = $5,375
This average becomes the baseline for calculating future unrealized gains or losses.
Unrealized PnL (Profit and Loss)
Unrealized PnL reflects the current profit or loss of an open position based on the latest market price. It changes in real time as the market moves.
For Long Positions:
Unrealized PnL = Contract Quantity × (Latest Market Price – Entry Price)Example:
- Trader B holds 0.2 BTC long at $7,000
- Current market price: $7,500
PnL = 0.2 × (7500 – 7000) = 100 USDT profit
For Short Positions:
Unrealized PnL = Contract Quantity × (Entry Price – Latest Market Price)Example:
- Trader C holds 0.4 BTC short at $6,000
- Current market price: $5,000
PnL = 0.4 × (6000 – 5000) = 400 USDT profit
Important Notes:
- In USDT-margined contracts, PnL is settled in USDT, unlike inverse contracts where it's settled in the base coin (e.g., BTC).
- A $1,000 price movement affects PnL directly—e.g., a 1 BTC position gains or loses $1,000 per $1,000 move.
Leverage does not amplify PnL directly. Instead:
- Higher leverage reduces required margin.
- Larger position size increases PnL sensitivity.
- Greater price deviation from entry increases gains/losses.
- By default, unrealized PnL uses the last traded price, but hovering over it often shows the value based on mark price (used to prevent manipulation).
- Transaction fees and funding costs are not included in unrealized PnL.
Unrealized PnL Percentage (%)
This metric shows your position’s return on investment (ROI) as a percentage of the margin used.
Formula:
Unrealized PnL % = [Unrealized PnL / Position Margin] × 100%Where:
Position Margin = Initial Margin + Close Fee
Example (Trader B):
- Unrealized PnL: 100 USDT
- Leverage: 10x
- Initial Margin = (0.2 × 7000) / 10 = 140 USDT
- Close Fee ≈ Bankruptcy Price × Quantity × 0.055% = 6300 × 0.2 × 0.055% ≈ 0.693 USDT
- Position Margin ≈ 140 + 0.693 = 140.693 USDT
- PnL % = (100 / 140.693) × 100 ≈ 71.07%
Key Insight:
Increasing leverage lowers margin, which inflates the PnL percentage, even if actual profit remains unchanged.
| Leverage | Initial Margin | PnL | PnL % |
|---|---|---|---|
| 5x | $280 | $100 | 35.62% |
| 10x | $140 | $100 | 71.07% |
| 20x | $70 | $100 | 141.45% |
Note: For cross-margin mode, the system uses the maximum allowed leverage under the asset’s risk limit (e.g., up to 100x for BTCUSD).
Realized PnL (Closed Positions)
Once a position is closed, the profit or loss becomes realized and appears in your account history.
Key Differences:
| Component | Unrealized PnL | Realized PnL |
|---|---|---|
| Position PnL | Included | Included |
| Trading Fees | Not included | Included |
| Funding Fees Paid/Received | Not included | Included |
Formula:
Realized PnL = Position PnL – Open Fee – Close Fee – Net Funding FeesExample (Trader C):
- Short position: 0.4 BTC at $6,000
- Closed at: $5,000
- Position PnL = 0.4 × (6000 – 5000) = 400 USDT
- Open Fee = 0.4 × 6000 × 0.055% = 1.32 USDT
- Close Fee = 0.4 × 5000 × 0.055% = 1.1 USDT
- Funding Fees Paid = 2.10 USDT
- Realized PnL = 400 – 1.32 – 1.1 – 2.1 = 395.48 USDT
👉 See how precise fee tracking improves your net realized profits over time.
Note: This applies when the entire position is closed in one order.
Realized PnL for Partial Closures
When only part of a position is closed, fees and funding costs are allocated proportionally.
Formula:
Realized PnL (Partial) = (Portion Closed) × [Position PnL – Proportional Open Fee – Proportional Funding Fees] – Actual Close FeeExample:
Trader C closes 0.3 BTC of a 0.4 BTC short opened at $6,000:
- Position PnL (partial) = 0.3 × (6k – 5k) = 300 USDT
- Open Fee (proportional) = (3/4) × 1.32 ≈ 1.32 USDT
- Close Fee = 0.3 × 5k × 0.55% ≈ 825 USDT
- Funding Paid (proportional) ≈ 1.5 USDT
- Realized PnL = 300 – 1.32 – 825 – 1.5 ≈ 296.355 USDT
Remaining: 0.1 BTC short
Later opens new short: +825 BTC at $5,5888
New realized PnL adjusts cumulatively after accounting for new entry costs.
Note: The system recalculates realized PnL when opposing orders close existing positions.
Frequently Asked Questions
Q: Is unrealized PnL affected by leverage?
A: No. Leverage doesn’t change the dollar amount of unrealized PnL—it only affects margin usage and thus the percentage return.
Q: Why is my realized PnL less than my unrealized PnL?
A: Because realized PnL deducts all fees—opening/closing fees and funding payments—while unrealized PnL excludes them.
Q: How is funding fee impact calculated in realized PnL?
A: All funding fees paid or received during the holding period are summed and subtracted (if paid) or added (if received) from the final realized amount.
Q: Does changing leverage mid-trade affect PnL?
A: No, unless you're in cross-margin mode where margin allocation may shift due to risk limits.
Q: Can I see historical realized PnL after partial closes?
A: Yes, most platforms track cumulative realized PnL across partial exits until the full position is closed.
Q: What happens to realized PnL if I reverse a position?
A: Closing a short with a buy order locks in that leg’s PnL; any remaining balance starts a new position with its own entry basis.
Final Thoughts
Understanding how PnL is calculated in USDT perpetual contracts empowers traders to manage expectations, assess performance accurately, and optimize strategies over time.
Core keywords naturally integrated throughout this guide include:
USDT perpetual contracts, unrealized PnL, realized PnL, average entry price, position margin, funding fees, trading fees, and leverage impact.