What Is PnL? Meaning, Formula, and Examples in Trading

PnL stands for Profit and Loss, the gain or loss on a trading position, calculated as the selling price minus the buying price and transaction fees. Realized PnL appears once the asset is sold, while unrealized PnL can still change with the market price. A positive result means profit, a negative result means loss.
In crypto trading, a green portfolio does not always mean you have actually made a profit. The gain may still be unrealized, may not include fees yet, or may change quickly as prices move. By understanding PnL, you can evaluate your strategy, manage risk, and judge whether your trading results really match your expectations.
Key Points
- PnL stands for Profit and Loss, a metric used to measure trading performance.
- Positive PnL means the position is profitable, while negative PnL means it is losing value.
- Realized PnL is profit or loss after an asset has been sold.
- Unrealized PnL is the potential profit or loss from a position that is still open.
- The basic PnL formula is selling price minus buying price.
- Transaction fees, gas fees, and price volatility should be included for a more accurate result.
- PnL is calculated differently in spot and futures, mainly because futures use leverage.
Why Does PnL Matter in Crypto Trading?
Understanding Profit and Loss (PnL) is essential for objectively assessing how well your investment strategy works. PnL acts like a compass that clarifies portfolio performance amid market swings. By analyzing PnL, you can make better-informed decisions.
Key functions of PnL:
- Strategy evaluation: seeing which trading patterns work and which need adjusting.
- Risk management: spotting potential losses before they grow, for example with stop loss and crypto trading risk management.
- Decision-making: deciding the right time to buy, sell, or hold, including when to apply a take profit strategy.
- Tax reporting: accurate PnL records are required for tax compliance in most jurisdictions.
Read also: Understanding the HODL Crypto Strategy for Long-Term Investment
Read also: Trader adalah: Defining the Role and Types of Traders
Two Types of PnL You Need to Know
1. Realized PnL
Realized PnL is the confirmed gain or loss after a position is closed, meaning the asset has been sold. This number is final.
2. Unrealized PnL
Unrealized PnL is the potential gain or loss based on the current market price, while the position is still open. This number keeps changing with the market, and only becomes real when you sell.
The difference is shown in the table below.
| Aspect | Realized PnL | Unrealized PnL |
|---|---|---|
| When it appears | After the asset is sold and the position is closed | While the position is still open and the asset has not been sold |
| Can it change? | No, the figure is final | Yes, it keeps changing with the market price |
| Example | Buy 0.01 BTC for Rp14,000,000, then sell for Rp14,700,000. The gross PnL of +Rp700,000 is locked in. | Buy 0.01 BTC for Rp14,000,000, and it is now worth Rp14,500,000. The unrealized PnL is +Rp500,000, and it can change if the price moves. |
How to Calculate Crypto PnL
Basic PnL formula: PnL = Selling Price - Purchase Price
For percentage: PnL (%) = [(Selling Price - Purchase Price) / Purchase Price] x 100
This formula does not include fees yet. For a more accurate result, calculate net PnL:
Net PnL = (Sale Proceeds - Sell Fee) - (Purchase Value + Buy Fee)
Example: Realized PnL with Fees (in Rupiah)
This example is an illustration only, not a prediction, and the 0.1% fee per transaction is just an assumption for the example, not Mobee's fee. Suppose you buy 0.01 BTC at Rp1,400,000,000 per BTC, then sell it at Rp1,470,000,000 per BTC.
| Item | Calculation | Result |
|---|---|---|
| Purchase value | 0.01 BTC x Rp1,400,000,000 | Rp14,000,000 |
| Buy fee (0.1%) | 0.1% x Rp14,000,000 | Rp14,000 |
| Total cost | Rp14,000,000 + Rp14,000 | Rp14,014,000 |
| Sale value | 0.01 BTC x Rp1,470,000,000 | Rp14,700,000 |
| Sell fee (0.1%) | 0.1% x Rp14,700,000 | Rp14,700 |
| Net sale proceeds | Rp14,700,000 - Rp14,700 | Rp14,685,300 |
| Gross PnL (before fees) | Rp14,700,000 - Rp14,000,000 | +Rp700,000 (+5.00%) |
| Total fees | Rp14,000 + Rp14,700 | Rp28,700 |
| Net PnL | Rp14,685,300 - Rp14,014,000 | +Rp671,300 |
| Net PnL (%) | Rp671,300 / Rp14,014,000 x 100 | about +4.79% |
Note the difference: the gross PnL of Rp700,000 becomes Rp671,300 after fees, so about 4.1% of the gross profit goes to fees. The net PnL percentage is calculated on the total cost (purchase value plus the buy fee), so it is 4.79%, not 5.00%. The more often you trade, the bigger the effect of fees on your final result.
Example: Unrealized PnL
Same position: 0.01 BTC bought at Rp1,400,000,000 per BTC (total cost Rp14,014,000 including the buy fee). The price of BTC is now Rp1,450,000,000 per BTC and you have not sold.
- Current position value: 0.01 x Rp1,450,000,000 = Rp14,500,000.
- Unrealized PnL before fees: Rp14,500,000 - Rp14,000,000 = +Rp500,000 (+3.57%).
- Estimated net PnL if sold now: sell fee 0.1% x Rp14,500,000 = Rp14,500, so Rp14,500,000 - Rp14,500 - Rp14,014,000 = +Rp471,500 (about +3.36%).
If the price falls to Rp1,350,000,000 per BTC, your position is worth Rp13,500,000 and the unrealized PnL becomes -Rp500,000 (-3.57%) before fees. This is not yet a real loss. The loss only becomes realized if you sell at that price.
Three PnL Calculation Methods
- FIFO (First In, First Out): the first asset purchased is considered sold first. Best suited for long-term investors.
- LIFO (Last In, First Out): the most recently purchased asset is considered sold first. Results differ from FIFO depending on price trends.
- Average Cost: calculates the average price across all purchases. This is the most widely used method, especially for DCA (Dollar Cost Averaging) strategies.
Average Cost example: you buy 0.01 BTC at Rp1,400,000,000 per BTC, then another 0.01 BTC at Rp1,500,000,000 per BTC. The average cost is Rp1,450,000,000 per BTC. If you sell 0.01 BTC at Rp1,600,000,000, your PnL = 0.01 x (Rp1,600,000,000 - Rp1,450,000,000) = +Rp1,500,000 before fees.
PnL in Spot vs Futures
PnL can be calculated in two types of markets that work differently. This section only explains the concepts, not any particular product feature.
Spot. You buy the actual asset, and PnL is calculated from the difference between the selling and buying price times the amount of the asset, minus fees. The worked example above is spot PnL. Because you pay the full value of the asset, the largest possible loss in theory is the entire amount you put in, which happens if the asset price falls to zero.
Futures. You open a derivative contract that follows the price of the asset, without owning the asset. A position can be long (profits if the price rises) or short (profits if the price falls). PnL is calculated from the difference between the entry and exit price times the position size, minus fees and other costs such as the funding fee on perpetual contracts. Futures usually use leverage, meaning the position is enlarged with borrowed funds. Leverage magnifies gains and losses in the same proportion. If losses approach your margin, the position can be liquidated (force-closed) and the margin can be lost.
| Aspect | Spot | Futures |
|---|---|---|
| What you hold | The actual asset | A contract that follows the asset's price |
| Position direction | Usually buy, then sell | Can be long or short |
| PnL formula | (Selling price - buying price) x amount of asset - fees | Long: (exit price - entry price) x position size. Short: (entry price - exit price) x position size. Then subtract fees and funding fees |
| Leverage | None | Usually available, magnifies gains and losses |
| Main risk | The asset price falls | The price moves against you, plus liquidation risk |
Because futures carry higher risk, learn crypto trading risk management first before opening a leveraged position.
Factors That Affect Crypto PnL
Common variables that beginner traders often overlook:
- Transaction fees: trading fees, withdrawal fees, and network gas fees must be included in your calculation.
- Volatility: rapid price movements can shift unrealized PnL dramatically within hours.
- Holding period: long-term and short-term strategies produce very different PnL profiles.
Read also: Flexi Earn: How to Earn Passive Crypto Income Without Lock-ups
Conclusion
PnL is the primary standard in cryptocurrency trading. Understanding the difference between realized and unrealized PnL, and choosing a calculation method that suits your strategy, is the first step toward managing your portfolio in a more systematic and informed way.
Track Your PnL on Mobee
Once you understand the formula and the difference between realized and unrealized PnL, the next step is to track the numbers regularly. If you use Mobee, the guide to the Profit and Loss feature in the Mobee app explains how to see the profit or loss of your portfolio.
Mobee is operated by PT CTXG Indonesia Berkarya, which is licensed and supervised by OJK. If you do not have the app yet, install the Mobee App and try it yourself.
FAQ
What does PnL stand for?
PnL stands for Profit and Loss. In trading, PnL shows the result of a position: positive means profit, negative means loss.
What is PnL in crypto trading?
PnL, or Profit and Loss, is a metric that measures profit or loss from crypto trading and investing activity. A positive PnL means the position is profitable, while a negative PnL means it is losing value.
What is the difference between realized and unrealized PnL?
Realized PnL is profit or loss that has already occurred because the asset has been sold. Unrealized PnL is potential profit or loss based on the current market price while the position is still open.
What is unrealized PnL?
Unrealized PnL is the paper profit or loss on a position that is still open. It is calculated from the current market price and keeps changing with the price. It becomes realized PnL only after the asset is sold.
What is the PnL formula?
The basic PnL formula is selling price minus buying price. To calculate the PnL percentage, divide the price difference by the buying price, then multiply the result by 100%.
Why is PnL important?
PnL is important because it helps traders evaluate strategies, measure risk, and understand whether their trading activity is actually profitable. Without understanding PnL, traders may misread portfolio performance.
Do fees affect PnL?
Yes. Trading fees, withdrawal fees, and gas fees can reduce final PnL. These costs should be included in the calculation to get a more accurate profit or loss figure.
Does unrealized PnL mean I have made a profit?
Not yet. Unrealized PnL only shows potential profit or loss based on the current market price. It becomes realized only when the asset is sold and the position is closed.
Sources
- How is Profit & Loss (P&L) calculated? Accessed in 2026. Crypto.com.
- What Is Profit and Loss (PnL) in Crypto? Accessed in 2026. CoinEx.
Disclaimer
This content is intended to provide additional information to readers. The worked examples in this article are illustrations only and not predictions of results. Always conduct your own research before investing. All buying, selling, and investment activities in crypto assets are entirely the reader's responsibility.



