TradePortfolio

PnL Calculator

Calculate realized profit and loss for leveraged crypto trades including fees.

$
$
$
×
%
%
Gross PnL
+$400.00
Fees
−$7.00
Net PnL
+$393.00
Net %
+3.93%
ROE
+39.30%

Formula

Gross PnL — Long

Where Quantity = Position Size / Entry Price. For short positions, reverse the subtraction: (P_entry − P_exit).

Net PnL (after fees)

f_entry is the maker/taker fee rate on open, f_exit on close. Fees are charged on the full position size, not just margin.

Return on Equity (ROE)

Margin = Position Size / Leverage. ROE measures return relative to the capital you actually committed.

Examples

Example 1: 10x Long BTC: $50,000 → $52,000
  • Position Size = $10,000, Leverage = 10×, Margin = $1,000
  • Quantity = $10,000 / $50,000 = 0.2 BTC
  • Gross PnL = 0.2 × ($52,000 − $50,000) = +$400
  • Entry fee (0.02% maker) = $10,000 × 0.0002 = $2.00
  • Exit fee (0.05% taker) = $10,000 × 0.0005 = $5.00
  • Net PnL = $400 − $2 − $5 = +$393
Net PnL: +$393 | ROE: +39.3% on $1,000 margin
Example 2: 20x Short ETH: $3,200 → $3,000
  • Position Size = $5,000, Leverage = 20×, Margin = $250
  • Quantity = $5,000 / $3,200 = 1.5625 ETH
  • Gross PnL = 1.5625 × ($3,200 − $3,000) = +$312.50
  • Entry fee (0.02%) = $5,000 × 0.0002 = $1.00
  • Exit fee (0.05%) = $5,000 × 0.0005 = $2.50
  • Net PnL = $312.50 − $1.00 − $2.50 = +$309
Net PnL: +$309 | ROE: +123.6% on $250 margin
Example 3: 5x Long SOL: $150 → $145 (losing trade)
  • Position Size = $2,000, Leverage = 5×, Margin = $400
  • Quantity = $2,000 / $150 = 13.33 SOL
  • Gross PnL = 13.33 × ($145 − $150) = −$66.67
  • Entry fee (0.02%) = $2,000 × 0.0002 = $0.40
  • Exit fee (0.05%) = $2,000 × 0.0005 = $1.00
  • Net PnL = −$66.67 − $0.40 − $1.00 = −$68.07
Net PnL: −$68.07 | ROE: −17.0% on $400 margin

Key Concepts

What is PnL?

PnL stands for "Profit and Loss." In crypto trading, it represents the financial result of a trade — the difference between what you paid to enter and what you received when exiting, minus any fees. Unrealized PnL is for open positions; realized PnL is after closing.

What is ROE?

Return on Equity (ROE) measures your profit as a percentage of the margin you actually put up, not the total position size. With 10x leverage and a 5% price move in your favor, your ROE would be 50% — even though the underlying asset only moved 5%.

How Fees Affect Your PnL

Every trade incurs fees twice — once to open and once to close. Maker fees (limit orders) are typically lower than taker fees (market orders). On a leveraged position, fees are charged on the full position size, not just your margin, so they have an outsized impact on net returns.

Long vs Short Positions

A long position profits when the price goes up — you buy low and sell high. A short position profits when the price goes down — you sell high and buy back lower. The PnL calculation mirrors in both cases, but the direction of profit reverses.

Leverage and PnL

Leverage multiplies both your gains and losses proportionally. A 2% favorable move at 25x leverage yields a 50% ROE. However, the same 2% move against you results in a 50% loss on your margin. Leverage does not change your dollar PnL — only your ROE.

Maker vs Taker Fees

Maker orders add liquidity to the order book (limit orders) and pay lower fees, typically 0.01-0.02%. Taker orders remove liquidity (market orders) and pay higher fees, typically 0.04-0.06%. Fee tiers decrease with higher trading volume on most exchanges.

How to Calculate Crypto Trading PnL

Profit and loss in leveraged crypto trading depends on four key factors: your entry price, exit price, position size, and trading fees. The gross PnL is calculated from the price difference multiplied by the quantity of contracts or tokens, while net PnL subtracts the fees incurred on both opening and closing the position.

Understanding the difference between PnL and ROE is critical for evaluating trade performance. A $500 profit on a $1,000 margin (50% ROE) looks very different from a $500 profit on a $10,000 margin (5% ROE), even though the dollar amount is the same. ROE accounts for capital efficiency.

Always factor in fees when planning trades. On high-leverage positions, fees can significantly eat into profits or amplify losses. For example, a round-trip taker fee of 0.1% on a 50x leveraged position means you're paying 5% of your margin in fees alone.

Frequently Asked Questions

Does this include funding fees?

This calculator accounts for trading fees (maker/taker) on entry and exit. It does not include funding rate payments, which accrue over time on perpetual futures. Use the Funding Rate Calculator for that.

What's the difference between PnL and ROE?

PnL is the absolute dollar amount you gained or lost. ROE (Return on Equity) is the percentage return relative to your margin. With leverage, ROE is amplified — a 1% price move at 10x leverage equals a 10% ROE, but the dollar PnL is the same regardless of leverage.

Why does leverage not change my dollar PnL?

Leverage lets you open a larger position with less margin, but the position size in dollar terms is what determines PnL. If you open a $10,000 position, a 5% move yields $500 whether you used $10,000 at 1x or $1,000 at 10x. Leverage only affects your ROE and liquidation risk.

Should I use maker or taker fees?

Use taker fees (typically 0.04-0.06%) if you enter and exit with market orders. Use maker fees (typically 0.01-0.02%) for limit orders. If you enter with a limit order and exit with a market order, use maker for the entry fee and taker for the exit fee.