Crypto trading profit and loss (PnL) is the difference between what you received when closing a position and what you paid to open it, adjusted for all fees incurred during the trade. Calculating PnL correctly requires accounting for entry price, exit price, position size, trading fees (maker or taker), and, for perpetual contracts, funding rate payments accumulated while the position was open. This guide walks through spot PnL, leveraged perpetual PnL, fee-inclusive calculations, ROI versus absolute PnL, and multi-trade portfolio tracking with worked examples using real crypto pricing.
The Basic PnL Formula for Spot Trades
PnL for a spot trade equals the exit value minus the entry value, where each value is the price multiplied by the quantity traded, minus any fees paid on each side of the transaction. Getting this right requires separating gross PnL from net PnL and including maker or taker fees on both the buy and the sell.
The formula in its simplest form: PnL = (Exit Price - Entry Price) x Quantity - Total Fees. This works for long positions. If you bought 0.5 BTC at $62,000 and sold at $65,000, your gross PnL is ($65,000 - $62,000) x 0.5 = $1,500. But gross PnL is not what lands in your account. Fees reduce both sides of the trade, and ignoring them is the single most common calculation error beginners make.
To calculate net PnL accurately:
1. Entry cost: (Entry Price x Quantity) + Entry Fee
2. Exit proceeds: (Exit Price x Quantity) - Exit Fee
3. Net PnL: Exit Proceeds - Entry Cost
Using the same example with a 0.1% taker fee on both entry and exit:
Entry cost: ($62,000 x 0.5) + ($31,000 x 0.001) = $31,000 + $31 = $31,031
Exit proceeds: ($65,000 x 0.5) - ($32,500 x 0.001) = $32,500 - $32.50 = $32,467.50
Net PnL: $32,467.50 - $31,031 = $1,436.50
The difference between gross ($1,500) and net ($1,436.50) is $63.50 in fees. On a winning trade, this feels minor. On a breakeven trade, fees turn it into a loss. On a scalp targeting 0.3% profit, fees at 0.1% per side eat two-thirds of the gain before you even account for crypto slippage.
For short positions on spot markets (selling an asset you hold and buying it back later): PnL = (Sell Price - Rebuy Price) x Quantity - Total Fees. The math is identical, just with the direction reversed.
Perpetual Contract PnL With Leverage
Perpetual futures PnL calculation uses the same price-difference logic as spot, but the position value is larger than your deposited margin, and funding rate payments accumulate as an ongoing cost or credit over the life of the trade. You must subtract both trading fees and net funding paid from your gross price-difference PnL to arrive at the true net figure.
When reviewing how traders calculate their PnL on our platform, the most common error is ignoring funding payments and fees, which makes their perceived performance diverge from actual account balance changes over time.
The core formula for a leveraged long position: PnL = (Exit Price - Entry Price) x Contract Size - Trading Fees - Net Funding Paid. For a short position, reverse the price subtraction: (Entry Price - Exit Price). Leverage does not appear in the PnL formula directly because it determines your margin requirement, not your profit. A $10,000 position at 10x leverage uses $1,000 margin but generates the same dollar PnL as a $10,000 position at 1x. The difference is that your percentage return on margin is amplified.
Worked example: Long ETH perpetual at 10x leverage
Entry: $3,200 (position size: 3 ETH = $9,600 notional, margin deposited: $960)
Exit: $3,350 after 36 hours
Taker fee: 0.05% on entry and exit
Funding rate: +0.01% per 8-hour interval (longs pay shorts), 4.5 intervals during the hold
Calculation:
Gross PnL: ($3,350 - $3,200) x 3 = $450
Entry fee: $9,600 x 0.0005 = $4.80
Exit fee: $10,050 x 0.0005 = $5.03
Funding paid: $9,600 x 0.0001 x 4.5 = $4.32 (position value x rate x intervals)
Net PnL: $450 - $4.80 - $5.03 - $4.32 = $435.85
ROI on margin: $435.85 / $960 = 45.4%
Without fees and funding, the gross ROI would be $450 / $960 = 46.9%. The 1.5% difference matters less on a winning trade held for 36 hours, but if this position were held for 30 days at the same funding rate, funding alone would cost $9,600 x 0.0001 x 90 intervals = $86.40, eating nearly 20% of the gross profit. This is why understanding funding rates is not optional for perpetual traders.
I track my perpetual PnL per-trade in a spreadsheet that separates gross from net, and the funding column is what consistently surprises newer traders who hold positions for days. The numbers add up faster than people expect.
For a deeper breakdown of margin mechanics and liquidation risk, see the dedicated guide on margin trading.
Including Fees in Every PnL Calculation
Fees are not a footnote to PnL. They are a structural component that determines whether a trading edge is real or illusory, and failing to include them is the primary reason backtested strategies underperform in live trading. Three fee categories affect every crypto trade: maker/taker commissions, funding rate payments on perpetuals, and hidden costs like spread and slippage.
Three fee categories affect crypto trading PnL:
1. Trading fees (maker/taker). Most exchanges charge 0.02-0.10% for spot trades and 0.02-0.06% for perpetual futures (source: Bitget). Whether you pay maker or taker depends on your order type. Limit orders that rest on the book typically qualify for maker fees, while market orders that execute immediately pay the higher taker rate. On a $50,000 position, the difference between 0.02% maker ($10) and 0.06% taker ($30) is $20 per side, or $40 round-trip.
2. Funding rate payments. Exclusive to perpetual contracts, funding is exchanged between longs and shorts every 8 hours on most platforms (source: CoinMarketCap). Rates typically range from -0.01% to +0.10% per interval. At +0.03% per 8 hours on a $100,000 position, you pay $30 every 8 hours, or $90 per day. Over a week, that is $630 deducted from your PnL regardless of price movement.
3. Hidden costs. Spread (the gap between bid and ask), slippage (price impact from your order), and withdrawal fees all erode PnL. These are harder to quantify in advance but must be tracked post-trade. A full breakdown of these costs is covered in the guide on hidden trading fees.
Fee impact table by trade frequency:
Trade Style | Avg Trades/Week | Round-Trip Fee (0.1% taker) | Annual Fee Drag on $10K Capital |
|---|---|---|---|
Scalping | 50+ | $10 per $10K trade | $26,000+ (260%+) |
Day trading | 10-20 | $10 per $10K trade | $5,200-$10,400 |
Swing trading | 2-5 | $10 per $10K trade | $1,040-$2,600 |
Position trading | 1-2/month | $10 per $10K trade | $120-$240 |
These numbers assume full-capital deployment per trade. The point is clear: high-frequency strategies require razor-thin fees (maker rebates, VIP tiers) to remain viable. If your strategy averages 0.3% profit per trade and fees consume 0.2%, your real edge is 0.1%, and a few losers eliminate the entire account growth.
ROI vs Absolute PnL: Which Metric Matters
ROI (return on investment) expresses PnL as a percentage of capital deployed, while absolute PnL is the raw dollar figure gained or lost. Both metrics are necessary because they answer fundamentally different questions about trade quality, and confusing them or using only one leads to poor decision-making about position sizing and strategy viability.
ROI formula: ROI = (Net PnL / Capital Deployed) x 100%
Absolute PnL: The dollar (or USDT) amount gained or lost after fees.
Why both matter:
A $500 profit on a $1,000 position is 50% ROI. That same $500 on a $50,000 position is 1% ROI. The dollar gain is identical, but the risk-adjusted quality of the trade is vastly different.
Conversely, a 200% ROI on a $50 micro-position sounds impressive but produces $100 of actual profit, which may not justify the time and attention cost.
Capital deployed is not the same as margin. For leveraged trades, you must decide whether to calculate ROI on margin (the amount locked in the position) or on total capital at risk (which includes the maximum possible loss if no stop-loss is set). Most professional traders use ROI on risk capital: ROI = Net PnL / Amount Risked.
If your stop-loss limits the maximum loss to $200 on a trade that produces $600 net profit, your risk-adjusted ROI is 300%, regardless of whether your margin was $500 or $5,000. This connects directly to position sizing and risk-per-trade calculations.
When to use which:
Situation | Use ROI | Use Absolute PnL |
|---|---|---|
Comparing trade quality | Yes | No |
Portfolio growth tracking | No | Yes |
Evaluating strategy edge | Yes (on risk capital) | As secondary metric |
Tax reporting | No | Yes |
Setting performance targets | Both together | Both together |
For systematic performance tracking across multiple trades, see trading metrics that matter.
Multi-Trade Portfolio PnL Tracking
Portfolio PnL aggregates the net results of all positions, both open and closed, into a single performance view that tells you whether your trading activity is producing real returns. Tracking this correctly requires choosing a cost-basis method, separating realized from unrealized gains, and maintaining consistent records across every trade you take.
The aggregate formula: Portfolio PnL = Sum of All Realized PnL + Current Unrealized PnL
Realized PnL is locked in when a trade closes. Unrealized PnL fluctuates with open positions. Mixing these up creates a false picture of performance. A portfolio showing $5,000 in realized gains but $8,000 in unrealized losses is underwater, despite the closed-trade record looking profitable.
Cost-basis methods for multi-trade tracking:
When you buy the same asset multiple times at different prices, the method you use to assign cost to each sale affects your calculated PnL:
FIFO (First In, First Out): The oldest purchase price is used first. If you bought 1 ETH at $2,800 and later 1 ETH at $3,100, selling 1 ETH at $3,200 produces PnL of $3,200 - $2,800 = $400.
LIFO (Last In, First Out): The newest purchase price is used first. Same scenario: PnL = $3,200 - $3,100 = $100.
Average Cost: All purchases are averaged. Average cost = ($2,800 + $3,100) / 2 = $2,950. PnL = $3,200 - $2,950 = $250.
The method you choose affects reported PnL per trade and, in many jurisdictions, your tax obligations (source: Tokentax). FIFO is the most common default on exchanges and for tax reporting in the US and most of Europe.
Minimum fields for a portfolio PnL tracker:
Date and time of entry/exit
Asset and pair
Direction (long/short)
Entry price and exit price
Position size
Fees paid (entry + exit + funding)
Net PnL (dollar)
ROI on risk capital
Cumulative PnL running total
Record every trade in a structured trading journal immediately after closing. Reconstructing PnL from memory or exchange history weeks later introduces errors that compound.
Common PnL Calculation Mistakes
Most PnL tracking errors share a pattern: they make performance look better than reality by systematically excluding costs, ignoring losing trades, or mixing realized and unrealized figures. Identifying and correcting these mistakes before they accumulate prevents the false confidence that leads to oversized positions and blown accounts.
Mistake | What Goes Wrong | Correct Approach |
|---|---|---|
Ignoring fees | Gross PnL overstates true profit by 0.1-0.2% per trade | Always calculate net PnL including all fees |
Forgetting funding rates | Multi-day perp holds appear more profitable than they are | Track funding payments per position |
Mixing realized and unrealized | Unrealized gains counted as "profit" before closing | Report them separately; only realized is locked in |
Wrong cost basis | Multiple entries at different prices assigned arbitrarily | Choose FIFO, LIFO, or Average and apply consistently |
Ignoring losing trades | Only tracking winners inflates win rate and average PnL | Record every trade, especially losses |
Denominating in wrong currency | PnL in BTC looks positive while USD value dropped | Choose one denomination (usually USD/USDT) and stick with it |
Not accounting for spread/slippage | Limit order PnL looks better than actual market-order fills | Use actual fill prices from exchange, not chart prices |
From a platform standpoint, the PnL discrepancies traders raise most often trace back to funding payments and fee-asset conversions that were excluded from their manual calculations, not to any error in the exchange's accounting.
The denomination trap deserves special attention. If you buy 1 ETH at $3,000 and sell at $3,150 (a $150 profit in USD), but you measure PnL in BTC and BTC rose 8% during the same period, your ETH trade actually lost value in BTC terms. Choose your accounting denomination upfront and do not switch mid-assessment.
Another subtle error: calculating ROI on margin instead of on total risk for leveraged positions. A 10x leveraged trade that gains 5% on notional shows 50% ROI on margin, but if your stop-loss was set at 2% below entry (risking 20% of margin), your risk-adjusted ROI is actually 5% / 2% = 2.5R, which is a more honest measure of trade quality.
Worked Examples With Live Crypto Pricing
These examples use representative 2025-2026 price levels for BTC and ETH to demonstrate complete PnL calculations from entry through exit, including all fee components and the final ROI figure a trader would record in their journal. Each example follows the exact formula sequence covered in previous sections so you can replicate the process on your own trades (source: CoinGecko).
Example 1: Spot BTC swing trade (winner)
Buy 0.25 BTC at $64,800 (limit order, maker fee 0.02%)
Sell 0.25 BTC at $68,200 after 5 days (limit order, maker fee 0.02%)
Entry cost: (0.25 x $64,800) + ($16,200 x 0.0002) = $16,200 + $3.24 = $16,203.24
Exit proceeds: (0.25 x $68,200) - ($17,050 x 0.0002) = $17,050 - $3.41 = $17,046.59
Net PnL: $843.35
ROI on capital: $843.35 / $16,203.24 = 5.2%
Example 2: Perpetual ETH short (loser)
Short 5 ETH at $3,400, 5x leverage (margin: $3,400, notional: $17,000)
Stop-loss triggers at $3,520 after 18 hours
Taker fee: 0.05% entry and exit
Funding: -0.005% per 8h (shorts receive), 2 intervals
Calculation:
Gross PnL: ($3,400 - $3,520) x 5 = -$600
Entry fee: $17,000 x 0.0005 = $8.50
Exit fee: $17,600 x 0.0005 = $8.80
Funding received: $17,000 x 0.00005 x 2 = +$1.70
Net PnL: -$600 - $8.50 - $8.80 + $1.70 = -$615.60
ROI on margin: -$615.60 / $3,400 = -18.1%
Example 3: Multi-trade portfolio week (3 trades)
Trade | Asset | Direction | Net PnL | ROI on Risk |
|---|---|---|---|---|
1 | BTC spot | Long | +$843.35 | +5.2% |
2 | ETH perp | Short | -$615.60 | -18.1% |
3 | BTC perp long | Long | +$220.00 | +11.0% |
Total realized PnL for the week: $843.35 - $615.60 + $220.00 = +$447.75
Win rate: 2/3 = 66.7%
Average win: $531.68 | Average loss: $615.60
Profit factor: $1,063.35 / $615.60 = 1.73
A profit factor above 1.5 indicates a viable edge. Below 1.2, fees and variance will likely erode the strategy over time. Track these aggregate metrics weekly in your journal template.
Frequently Asked Questions
What is the difference between realized and unrealized PnL?
Realized PnL is the profit or loss locked in after you close a position. It cannot change because the trade is complete. Unrealized PnL is the paper gain or loss on positions still open, fluctuating with every price tick. You only convert unrealized to realized by closing the trade. Many traders make the mistake of treating unrealized gains as spendable profit, then watch those gains reverse. Until you exit, the number is theoretical.
Do I need to include funding rates when calculating perpetual PnL?
Yes. Funding rates are a direct cost (or credit) that accumulates every 8 hours on most exchanges and directly reduces or increases your net PnL. At typical rates of 0.01-0.03% per interval, a $50,000 position held for one week pays $35-$105 in funding alone. Excluding funding from your calculation overstates profitable trades and understates losing ones, creating a false picture of strategy performance that breaks down over time.
How do I calculate PnL when I entered the same position at multiple prices?
Use a consistent cost-basis method. FIFO assigns the oldest purchase price to the first sale. LIFO assigns the newest. Average cost uses the mean of all entry prices. Example: you bought 1 BTC at $60,000 and 1 BTC at $64,000, then sold 1 BTC at $66,000. FIFO PnL = $6,000. LIFO PnL = $2,000. Average cost PnL = $3,000. Pick one method and apply it to every trade for consistency and tax compliance.
Should I track PnL in USD or in crypto?
Track in one consistent fiat-denominated unit (USD or USDT) for performance assessment and tax reporting. Crypto-denominated PnL can be misleading because you might profit in ETH terms while losing in USD terms if the base asset drops. Some traders additionally track BTC-denominated returns to measure whether active trading outperforms simply holding Bitcoin, but USD should remain the primary accounting unit.
What is a good profit factor for crypto trading?
Profit factor is total gross profits divided by total gross losses. Above 1.5 indicates a meaningful edge after fees. Between 1.2 and 1.5 is marginal and vulnerable to fee changes or slight strategy degradation. Below 1.2 is likely unprofitable once all costs are included. Elite systematic traders target 2.0 or higher, but anything consistently above 1.5 across 50 or more trades suggests a real, repeatable edge worth scaling.
Researched and written by the Blofin Academy editorial team with AI-assisted drafting. Primary sources include BloFin exchange documentation (fee schedules, perpetual contract specifications, funding rate mechanics); Binance fee schedule and funding rate data; CoinGecko historical price data for worked examples. 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.
