Research/Education/Realized vs Unrealized PnL in Crypto Trading (With Examples)
# Trading

Realized vs Unrealized PnL in Crypto Trading (With Examples)

BloFin Academy04/07/2026

Realized PnL is profit or loss locked in after closing a position; unrealized PnL is the floating profit or loss on a position still open, calculated against a reference price (usually mark price for perpetuals). The distinction matters because your exchange uses unrealized PnL to compute equity and trigger liquidations, while only realized PnL changes your withdrawable balance. This guide covers the formulas for both, walks through spot and perpetual examples including fees and funding, explains partial-close mechanics, and identifies the mistakes that cause traders to misread their actual performance.


What Realized and Unrealized PnL Mean

Realized PnL is your final, locked-in profit or loss from a trade that has been closed, either fully or partially. Once the position closes, that number is permanently fixed and cannot change regardless of what the market does afterward. It moves to your withdrawable balance.

Unrealized PnL is what you would gain or lose if you closed your open position right now at the current reference price. It moves continuously with the market and only converts to realized PnL when you execute a close. Think of realized PnL as cash in your account and unrealized PnL as a number on a screen that can still go to zero.

Exchanges separate these two figures because your account needs to track what is actually withdrawable (realized) versus what exists only as exposure (unrealized). Your balance reflects realized results. Your equity reflects balance plus unrealized PnL, and equity is what the liquidation engine watches. Confusing the two leads to scenarios where traders believe they are profitable while their equity is draining toward liquidation.

The moment unrealized becomes realized is called a realization event:

  • Full close: Selling your entire position or closing the full contract.

  • Partial close: Reducing position size; only the closed portion realizes PnL.

  • Liquidation: Forced closure when equity falls below maintenance margin.

  • Settlement: Contract expiration for dated futures.

Until one of these events occurs, your PnL is paper only.


Core PnL Formulas for Long and Short Positions

The math is direction-dependent. Entry price, exit price (or current price for unrealized), and position size are all you need.

Long position (you bought, expecting price to rise):

  • Unrealized PnL = (Current Price - Average Entry Price) x Position Size

  • Realized PnL = (Exit Price - Average Entry Price) x Position Size - Total Fees

Short position (you sold, expecting price to fall):

  • Unrealized PnL = (Average Entry Price - Current Price) x Position Size

  • Realized PnL = (Average Entry Price - Exit Price) x Position Size - Total Fees

PnL percentage depends on your denominator:

  • Return on notional = PnL / (Entry Price x Position Size)

  • Return on margin = PnL / Initial Margin Deposited

Perpetual platforms typically display return on margin, which amplifies the displayed percentage by the leverage multiplier. A 2% price move at 10x shows as 20% return on margin. Always verify which denominator your exchange uses before comparing performance across platforms.


Worked Example: Spot Trade With Fees

Spot PnL is the simplest case. You buy an asset, hold it, and sell.

Across our platform, a recurring pattern we observe is traders treating unrealized PnL as locked-in profit, then watching it evaporate during a reversal because they never defined the point at which paper gains become real exits.

Setup:

  • Buy 0.1 BTC at $45,000

  • Fee rate: 0.1% taker on entry and exit

  • Entry fee: $45,000 x 0.1 x 0.1% = $4.50

  • Total cost basis: $4,500 + $4.50 = $4,504.50

While holding (price at $48,000):

  • Unrealized PnL = ($48,000 - $45,000) x 0.1 = $300

  • This is paper profit. Fees are not deducted from unrealized display.

After selling at $47,500:

  • Gross proceeds = $47,500 x 0.1 = $4,750

  • Exit fee: $4,750 x 0.1% = $4.75

  • Net proceeds = $4,750 - $4.75 = $4,745.25

  • Realized PnL = $4,745.25 - $4,504.50 = $240.75

The simple price-difference calculation suggests $250 profit, but fees consumed $9.25. On smaller percentage moves or higher-frequency strategies, this fee drag compounds into a meaningful performance gap. For a step-by-step walkthrough of calculating net PnL across different position types, see how to calculate crypto PnL.


Worked Example: Perpetual Futures With Mark Price and Funding

Perpetual contracts add two complications: mark price as the reference for unrealized PnL, and funding payments that affect net profitability without closing the position.

Setup:

  • Long 1 ETH perpetual at $2,500 entry

  • Leverage: 10x (initial margin deposited = $250)

  • Mark price: $2,600

  • Last traded price on chart: $2,620

  • Holding period: 24 hours

  • Funding rate: 0.01% per 8-hour interval (longs pay shorts)

Unrealized PnL (uses mark price, not last price):

  • Unrealized PnL = ($2,600 - $2,500) x 1 = $100

  • Return on margin = $100 / $250 = 40%

The chart shows $2,620, which would imply $120 profit, but the exchange uses mark price ($2,600) for the display. This $20 gap confuses traders constantly. Mark price is an oracle-derived fair value designed to prevent manipulation from thin order books.

Funding cost over 24 hours (3 intervals):

  • Funding per interval = $2,500 x 0.01% = $0.25

  • Total funding paid = $0.25 x 3 = $0.75

Net PnL if closed now:

  • Trading PnL (unrealized): $100.00

  • Entry fee (0.05% taker): -$1.25

  • Exit fee (0.05% taker): -$1.30

  • Funding paid: -$0.75

  • Net PnL: $96.70

In high-funding environments (0.03%+ per 8h during euphoric markets), a $50,000 position costs roughly $45/day in funding alone. That is $1,350/month, which can erode significant percentages of trading gains on longer holds.


Partial Close, Scaling In, and Average Entry

When you add to a position or partially close, the numbers shift in ways that confuse many traders.

Scaling in (average entry recalculation):

You buy 1 ETH at $2,000 then buy 1 more ETH at $2,200.

New Average Entry = (1 x $2,000 + 1 x $2,200) / 2 = $2,100

All unrealized PnL now references $2,100 as the cost basis for the entire 2 ETH position.

Partial close (only closed portion realizes):

You sell 1 ETH at $2,300:

  • Realized PnL on closed portion = ($2,300 - $2,100) x 1 = $200

Remaining position:

  • Size: 1 ETH

  • Average entry: still $2,100 (unchanged)

  • Current price: $2,300

  • Unrealized PnL: ($2,300 - $2,100) x 1 = $200

The partial close locked in $200 realized. The remaining 1 ETH keeps the same $2,100 average entry and carries $200 unrealized. Partial closes never change your average entry for what remains open.


Costs That Reduce True Net PnL

Gross PnL from price movement rarely equals your net result. Multiple costs compress your actual take-home:

Cost

Where It Applies

Typical Range

Trading fees

All trades

0.01%-0.1% per side

Funding payments

Perpetuals only

0.01%-0.1% per 8h

Borrow interest

Margin trades

Variable, hourly

Slippage

Market orders

0.05%-2% depending on depth

Spread

All market orders

Varies by pair liquidity

Fee impact on a round-trip trade:

At 0.05% taker on a $10,000 position: entry fee $5 + exit fee $5 = $10 total. That means any trade capturing less than 0.1% price movement is net-negative after fees alone.

Funding compounding:

I have watched positions sit in profit for days while net PnL slowly eroded because funding was running 0.05% per interval during a leverage-heavy market. The displayed unrealized PnL looked green, but the account equity told a different story. Always check the "total costs" or "realized PnL" tab, not just the position display.

Checklist for true net PnL:

  • Entry and exit trading fees

  • Funding payments (perpetuals)

  • Borrow interest (margin)

  • Spread between bid/ask at execution

  • Slippage on market orders


Balance vs Equity vs Margin: What the Liquidation Engine Watches

These four numbers govern your account risk, and confusing them is the most common cause of unexpected liquidation.

Balance: Withdrawable funds from realized trades only. Does not include unrealized positions.

Equity: Balance + Unrealized PnL - Pending Costs. This is the number that matters for survival. The liquidation engine monitors equity, not balance.

Used Margin: Capital locked as collateral for open positions.

Available Margin: Equity - Used Margin. What you can commit to new positions.

Why liquidation happens "unexpectedly":

  • Balance: $1,000

  • Position: 10x long BTC

  • Unrealized PnL: -$900

  • Equity: $1,000 - $900 = $100

  • Maintenance margin required: $150

Despite $1,000 in "balance," equity ($100) is below maintenance ($150). Liquidation triggers and realizes the full loss. Traders who watch balance instead of equity get blindsided regularly.

The fix: monitor equity relative to maintenance margin, not balance relative to position size. Most exchanges show a margin ratio or liquidation price. Use it. For details on how mark price determines the exact liquidation trigger, see the dedicated guide.


Common PnL Mistakes and How to Avoid Them

Mistake

Cause

Fix

"My PnL doesn't match the chart"

Exchange uses mark price; you are watching last price

Check which reference price your platform uses for unrealized PnL

"My balance didn't change by my realized PnL amount"

Funding, interest, or fee rebates posted separately

Review full transaction history, not just trade PnL

"My PnL% looks wrong"

Platform shows return on margin, not return on notional

Confirm the denominator (margin vs full position value)

"I was profitable but got liquidated"

Cross-margin sharing equity across positions; one large loss drained collateral

Monitor per-position equity or use isolated margin

"Partial close reset my numbers"

Average entry recalculates on add; partial close separates realized from unrealized

Understand that average entry stays fixed on partial close

"Unrealized PnL dropped without a price move"

Mark price adjusted, or funding/interest debited

Check oracle price feed and recent account debits

Mark price exists specifically to prevent wick hunting, where thin order books allow artificial spikes that trigger liquidations. If your unrealized PnL seems wrong during a volatility spike, mark price is likely protecting you from manipulation.


PnL Quick Reference

Core formulas:

  • Long PnL: (Exit - Entry) x Size

  • Short PnL: (Entry - Exit) x Size

  • Average Entry: (Qty1 x Price1 + Qty2 x Price2) / Total Qty

  • Equity: Balance + Unrealized PnL - Pending Costs

  • Net PnL: Gross PnL - Fees - Funding +/- Interest

Realization events: Full close, partial close, liquidation, settlement.

Key principles:

  • Unrealized PnL uses mark price on perpetuals, not last traded price

  • Partial close realizes only the closed portion; average entry stays fixed for remainder

  • Equity (not balance) determines liquidation

  • PnL% may show return on margin (amplified by leverage), not return on total position value

  • Funding debits/credits happen every 8 hours and affect equity without closing positions


Frequently Asked Questions

What is the simplest difference between realized and unrealized PnL?

Realized PnL is money locked in after you close a trade. It cannot change regardless of what the market does next. Unrealized PnL is the floating number on your open position that moves with every price tick. It becomes realized only when you execute a close, partial close, or get liquidated. Treating unrealized gains as real money is one of the fastest ways to make poor risk decisions.

Why does my unrealized PnL differ from what the chart shows?

Most perpetual platforms calculate unrealized PnL using mark price, an oracle-derived fair value, while charts display last traded price. During volatile periods, mark price can lag or differ from last price by 0.5-2%. This gap is intentional. It prevents thin order book manipulation from artificially triggering liquidations. Check your exchange documentation to confirm which reference price is used for your unrealized PnL display.

Do fees appear in unrealized or realized PnL?

Fees hit at execution and appear in realized PnL only. Most exchanges exclude fees from the unrealized PnL display, which means your actual exit value will be lower than the unrealized number suggests. For traders taking many small positions at high frequency, this gap between displayed unrealized and actual realizable value compounds significantly over hundreds of trades, making fee-aware position sizing essential.

How does funding affect PnL on perpetuals?

Funding is a separate realized cashflow that debits or credits your account every 8 hours without closing your position. It does not appear in "unrealized PnL" on most platforms but absolutely affects your equity and net profitability. In overheated markets where funding rates spike above 0.03% per interval, holding costs can consume a substantial portion of trading gains within days.

Can I get liquidated while showing positive unrealized PnL?

Yes, though it is rare. With cross-margin, one position's large unrealized loss can drain equity from another position's collateral. Your total portfolio might show net positive unrealized PnL, but if equity drops below maintenance margin on the losing side, liquidation triggers. Isolated margin prevents this by ring-fencing each position's collateral, though it also means each position liquidates independently without access to other funds.

 



Researched and written by the Blofin Academy editorial team with AI-assisted drafting. Primary sources include BloFin exchange documentation on PnL calculation and margin mechanics; Binance Academy PnL and margin guides (https://academy.binance.com/en/glossary/unrealized-profit-and-loss); CME Group education on futures P&L (https://www.cmegroup.com/education/courses/introduction-to-futures.html). All facts independently verified against cited documentation current as of April 2026.

 

This article is for informational purposes only and does not constitute financial advice. Cryptocurrency trading involves substantial risk of loss. Past performance does not guarantee future results. Always conduct your own research and consider your financial situation before trading. BloFin does not guarantee the accuracy of third-party data referenced herein.