Guide
How to calculate crypto PnL: realized and unrealized
PnL means profit and loss. It tells you how much a trade made or lost. This guide shows the simple formulas for spot and futures, with fees included.
Want the answer without the math? Use the crypto PnL calculator.
Realized and unrealized PnL
- Unrealized PnL is the result of a trade that is still open. It changes with the price.
- Realized PnL is the result after you close the trade. It is final and lands in your balance.
How to calculate spot PnL
On spot you buy a coin and sell it later.
- Find your quantity: amount spent ÷ entry price.
- Find the gross result: quantity × (exit price − entry price).
- Find the fees: entry value × entry fee, plus exit value × exit fee.
- Net PnL = gross result − fees.
- Return in % = net PnL ÷ (amount spent + entry fee) × 100.
Example. You buy 1,000 USDT of BTC at 50,000 and sell at 55,000. Fees are 0.1% each way. You hold 0.02 BTC. The gross result is 100 USDT. Fees are 1.00 + 1.10. Net PnL is 97.90 USDT, a return of about 9.78%.
How to calculate futures PnL
Futures let you go long (profit when price rises) or short (profit when price falls). Leverage makes the position bigger than your margin.
- Position size = margin × leverage. Quantity = position size ÷ entry price.
- Long: gross = quantity × (exit − entry). Short: gross = quantity × (entry − exit).
- Fees = quantity × entry × entry fee + quantity × exit × exit fee.
- Net PnL = gross − fees.
- ROE % = net PnL ÷ margin × 100.
Example (long). 100 USDT margin, 10x, entry 50,000, exit 52,000, fee 0.055% each way. Position size is 1,000 USDT. Net PnL is 38.88 USDT and ROE is 38.88%.
Example (short). Same setup, but you short at 50,000 and close at 48,000. Net PnL is 38.92 USDT and ROE is 38.92%.
Leverage changes ROE, not the PnL in USDT. The same move with less leverage needs more margin for the same result.
Break-even price
This is the price where fees are covered and you end at zero.
- Long: entry × (1 + entry fee) ÷ (1 − exit fee)
- Short: entry × (1 − entry fee) ÷ (1 + exit fee)
In the long example above, break-even is about 50,055.
What this math leaves out
Futures also pay or receive funding while a position is open. Exchanges count it in their own PnL, so their number can differ a little from yours.
Steps
- Pick spot or futures.
- Find your quantity from the amount and entry price.
- Multiply quantity by the price change to get the gross result.
- Subtract the entry and exit fees to get net PnL.
- Divide net PnL by what you put in to get return or ROE.
Note: Examples are for learning only. This is not financial advice.
A public portfolio shows balance history, including deposits and withdrawals. Learn more
FAQ
Questions
What does PnL mean in crypto?
PnL means profit and loss. It shows how much a trade or an account made or lost.
What is the difference between realized and unrealized PnL?
Unrealized PnL is for open trades and moves with the price. Realized PnL is fixed once you close the trade.
How do fees change my PnL?
You pay a fee when you open and when you close. Both come out of your result, so small wins can turn into small losses.
What is ROE in futures?
ROE is your net PnL divided by the margin you used. With leverage it moves much faster than the price.
Does leverage change my PnL?
For the same position size, no. Leverage changes how much margin you need, so it changes ROE.
Why is my exchange PnL different from my own math?
Exchanges also count funding fees and may use average prices across several fills. Small gaps are normal.