Key Takeaways
- Unrealized PnL values the part of a position that remains open. Realized trading PnL records the result on the quantity already closed.
- Net results also depend on trading fees, funding and, where applicable, borrowing costs. Some account displays book these costs before a position closes.
- Calculate monetary PnL from position size and price changes first. Leverage affects the margin required and the percentage return on that margin.
A position can show a profit while the final trade earns less—or even loses money—after execution and costs. Understanding realized versus unrealized PnL helps explain the difference between the gain on screen and the result recorded in your account.
The examples below use hypothetical prices, quantities and fees, not live quotes or KTX fee rates. Readers getting started can review how crypto spot trading works and explore the KTX BTC/USDT market. Eligible users can register a KTX account and check the applicable trading terms before placing an order.
What Is the Difference Between Realized and Unrealized PnL?
PnL means profit and loss. Unrealized PnL is the estimated gain or loss on an open holding at a chosen valuation price. Realized trading PnL arises when you sell or close some or all of that holding. Closing only part of a position leaves both types of PnL in the account. Certain contracts also realize PnL through periodic settlement while exposure remains open; check the contract rules.
| Measure | What it describes | What can change it? |
|---|---|---|
| Unrealized PnL | Price-based gain or loss on the remaining position | Valuation price, position size and average entry |
| Realized trading PnL | Gain or loss from executed closes | Additional closing trades |
| Net trading result | Trading PnL after relevant costs and credits | Fees, funding, rebates and other applicable charges |
Platforms can use these labels differently. A “realized PnL” field may already include opening fees or funding paid while a position remains open. Read the field definition before adding or subtracting costs; otherwise, you may count the same charge twice.
How to Calculate Spot Trading PnL
For a simple purchase, before fees:
Unrealized PnL = quantity held × (valuation price − purchase price)
Realized trading PnL = quantity sold × (average sale price − allocated purchase price)
Buy 0.10 BTC at 60,000 USDT per BTC. The purchase value is 6,000 USDT. At a valuation of 63,000 USDT, the holding is worth 6,300 USDT, giving an unrealized profit of 300 USDT.
Now sell 0.04 BTC at 63,000 USDT. The proceeds are 2,520 USDT, but the profit is only 120 USDT: 0.04 × (63,000 − 60,000). The other 2,400 USDT is the purchase cost recovered.
The remaining 0.06 BTC has 180 USDT of unrealized profit at the same price. Total gross PnL is therefore 120 + 180 = 300 USDT. If BTC subsequently falls to 62,000 USDT, the closed portion still contributed 120 USDT, while the remaining unrealized profit falls to 120 USDT. Combined gross PnL becomes 240 USDT.
Suppose both trades carry a hypothetical 0.10% fee paid separately in USDT. The original buy fee is 6 USDT. Allocate 40% of it, or 2.40 USDT, to the quantity sold; the sale fee is 2.52 USDT. Net profit on that portion is 120 − 2.40 − 2.52 = 115.08 USDT. The remaining 3.60 USDT of purchase fees stays allocated to the unsold holding.
With multiple purchases, use a consistent cost method. A quantity-weighted average is total purchase value divided by total quantity purchased, before fees. Other methods, including FIFO, can allocate cost differently. Fees deducted in the purchased token also change the quantity received. These examples are trading calculations, not tax accounting rules.
How to Calculate PnL for USDT-Margined Futures
For a linear contract with quantity expressed in the underlying coin:
Long PnL = quantity × (exit or valuation price − average entry price)
Short PnL = quantity × (average entry price − exit or valuation price)
A 0.10 BTC long entered at 60,000 and closed at 63,000 earns 300 USDT before costs. A short of the same size entered at 60,000 and closed at 57,000 also earns 300 USDT. Reverse either price move and the result is a loss of 300 USDT.
If size is quoted in contracts, convert it using the contract multiplier first. Inverse, coin-settled contracts use different formulas; do not apply the linear calculation to every futures product.
From Gross PnL to Net Profit
For a fully closed position without other adjustments:
Net PnL = gross closing PnL − opening fees − closing fees − funding paid + funding received
For the 0.10 BTC long above, assume a hypothetical 0.05% fee on both entry and exit, plus 4 USDT in net funding paid:
| Item | Calculation | USDT |
|---|---|---|
| Gross profit | 0.10 × (63,000 − 60,000) | 300.00 |
| Opening fee | 6,000 × 0.05% | −3.00 |
| Closing fee | 6,300 × 0.05% | −3.15 |
| Net funding paid | Assumed for the example | −4.00 |
| Net profit | 300 − 3 − 3.15 − 4 | 289.85 |
Funding can be paid or received, depending on the position and funding rate. Borrowing interest and liquidation charges, where applicable, require further adjustments. For partial closes, reconcile how the account allocates opening costs and funding between closed and remaining quantities.
Why Leverage Changes PnL Percentage
The 6,000 USDT position would require 600 USDT of initial margin at 10× leverage under a simplified calculation. A 300 USDT gross gain is 50% of that margin, even though the underlying price rose only 5%. At 5× leverage, initial margin would be 1,200 USDT and the same 300 USDT gain would equal 25%.
The monetary gain stays the same when position size and prices stay the same. Do not multiply the 300 USDT by leverage again. If you instead keep margin fixed and increase position size, both potential monetary gains and losses increase. Actual displayed returns depend on the platform’s margin denominator and fee treatment.
Why the Final Result Can Differ From the Display
An open-position estimate may use mark price or last traded price. The closing result uses actual fills. Spreads and limited depth can produce a different average exit; the guide to reading a crypto order book explains how an order can execute across several prices.
When reconciling a trade, record the direction, filled quantity, average entry, actual exit fills and settlement currency. Then check fees and funding separately. Slippage is already reflected if you use actual fill prices, so do not deduct it a second time. Deposits, withdrawals and account transfers are not trading profits.
FAQ
Can an unrealized loss affect liquidation?
Yes. In leveraged trading, unrealized losses can reduce equity and the margin buffer before a position closes. Not selling does not prevent liquidation.
Is realized profit automatically withdrawable?
Not necessarily. Available withdrawals depend on settlement, collateral requirements, open orders and account rules. Realized PnL and available balance measure different things.
Can a profitable position close at a net loss?
Yes. A small price gain can be outweighed by fees and funding, or lost through a worse execution price. Compare the net result with actual transaction records.
Risk notice: This article is educational and does not constitute investment or tax advice. Prices and fees in the examples are hypothetical. Leveraged trading carries liquidation risk and can cause substantial losses.