Formulas
Realized = (sale price − cost basis) × quantity sold − costsFloating = (current price − cost basis) × quantity held- On a trading account:
floating result = equity − balance
Cost basis depends on the accounting method: the average price of all purchases, or FIFO, where the earliest purchase is sold first.
Example: average price vs FIFO
You bought 0.5 BTC at $60,000 and 0.5 BTC at $70,000, so the average price is $65,000. You sold 0.4 BTC at $75,000, and the current price is $72,000. Fees are left out of the example.
| Method | Realized | Floating (0.6 BTC) | Total |
|---|---|---|---|
| Average price | 0.4 × (75,000 − 65,000) = $4,000 | 0.6 × (72,000 − 65,000) = $4,200 | $8,200 |
| FIFO | 0.4 × (75,000 − 60,000) = $6,000 | 43,200 − (0.1 × 60,000 + 0.5 × 70,000) = $2,200 | $8,200 |
The method only changes how much of the result counts as realized and how much as floating. The total is the same: 0.6 × 72,000 + 0.4 × 75,000 − 65,000 = $8,200. More on cost basis in crypto portfolio tracking: cost basis, FIFO and return.
How to read it
- Floating profit is not money earned yet: the price can come back.
- A floating loss already reduces account equity — the basis for equity drawdown and, at a broker, for the margin level.
- On an exchange, Closed P&L is the realized result of a closed position net of fees and funding; how to export the history is covered in Bybit trade history.
Common mistakes
- Judging the day by the balance while positions in the red are open.
- Refusing to close a loss «because it is only on paper»: it has already hit equity.
- Reconciling realized results with an exchange or a report that uses a different cost basis method.
- Forgetting fees, swap and funding in the realized result.
Realized and floating results in Davinchu
Above the table on the «Accounts» page sit the «PnL today» tile (trades closed since the start of the day, with swap and commission) and the «Floating PnL» tile — Equity − Balance across the accounts of the tab. On the account page «Balance» and «Equity» stand side by side: equity is the balance plus the floating P&L of open positions.
In a portfolio (the «Investments» tab) «Total P/L» = unrealized + realized P/L + income − fees, and the «What the result is made of» block breaks it into parts. The coin screen shows «Locked in by sales» and «On paper (unrealized)». The «Accounting method» in the portfolio settings — «Average» or FIFO — affects only realized P/L and the average after partial sales.
Frequently asked questions
Does a floating loss count toward drawdown?
Toward equity drawdown, yes: equity includes the floating result of open positions. Balance drawdown does not see it.
Why is realized P/L different under average price and FIFO?
The two methods decide differently which purchases were sold. The overall total is the same; only the split between realized and floating changes.