Definition
Profit and loss (PnL) is the gain or loss on a position. Realized PnL comes from positions that have been closed, while unrealized PnL is the paper gain or loss on positions that are still open.
How it works
For a long position, one that profits when the price rises, PnL = (exit price − entry price) × quantity − fees. For a short position, which profits when the price falls, the order is reversed: PnL = (entry price − exit price) × quantity − fees. Return % = PnL ÷ cost of the position × 100, which makes trades of different sizes comparable.
While a position is open, platforms calculate unrealized PnL from the current market price or, on futures, from a mark price, a reference price designed to resist short spikes. This figure changes every time the price moves and is not locked in. PnL becomes realized only when the position is closed; if only part of it is closed, only that part is realized.
A complete PnL includes all costs: trading fees on both entry and exit, the spread and, on perpetual futures, the funding payments made or received. Leaving these out makes results look better than they are, which matters most for frequent traders. PnL in dollars and return in percent answer different questions, so a large dollar gain on a large position can still be a small return.
Example (hypothetical numbers)
Suppose you buy 50 units of Token X at $40 and later sell 30 of them at $46, paying $3 in total fees on those 30 units.
Realized PnL = ($46 − $40) × 30 − $3 = $180 − $3 = $177.
Return on the closed part = $177 ÷ ($40 × 30) = $177 ÷ $1,200 = about 14.8%.
The other 20 units are still open and the price is now $37: unrealized PnL = ($37 − $40) × 20 = −$60.
The $177 is locked in, while the −$60 exists only on paper and will keep changing until those units are sold.
Common mistakes
- Treating unrealized gains as money already earned.
- Calculating PnL without fees, the spread or funding payments.
- Comparing dollar PnL across trades of very different sizes instead of looking at the return percentage.
Related calculators
This glossary is for education only and is not investment advice. Examples use hypothetical numbers.