Skip to content
  1. Home
  2. Guides
  3. Crypto futures P&L
Guide

How to calculate crypto futures P&L including fees and funding

A long and a short worked through to eight decimal places, maker vs taker fees, funding payments – and what each exchange import includes.

Short answer

Crypto futures P&L = (exit − entry) × size for a long, (entry − exit) × size for a short, minus the entry fee, minus the exit fee, minus funding paid plus funding received. Example: a long of 0.5 BTC from 60,000 to 61,200 makes 600.00 USDT gross; a 0.02% maker entry fee (6.00) and a 0.055% taker exit fee (16.83) leave 577.17 USDT, and three funding payments bring it to 572.0235 USDT. Fees are charged on the position value at each side; funding on the position value at the mark price at each funding time, so leverage changes neither.

A long, worked through

StepUSDTFormula
Gross P&L600.00000000(61,200 − 60,000) × 0.5
Entry fee (maker 0.02%)−6.000000000.5 × 60,000 × 0.02%
Exit fee (taker 0.055%)−16.830000000.5 × 61,200 × 0.055%
Net after fees577.17000000gross − fees
Funding 1 (rate +0.010%)−3.020000000.5 × 60,400 × +0.010%
Funding 2 (rate +0.012%)−3.654000000.5 × 60,900 × +0.012%
Funding 3 (rate −0.005%)+1.527500000.5 × 61,100 × −0.005%
Net after fees and funding572.02350000net − funding paid + funding received
Risk (stop 59,400)300.00000000|60,000 − 59,400| × 0.5
R+1.92 R / +1.91 Rnet ÷ risk (without / with funding)

Illustration with example rates; your exchange’s fee tier and the actual funding rates decide. Computed with Edgetrail’s formulas and shown to eight decimal places.

The formulas

  • Gross P&L = (exit − entry) × size × point value for a long; (entry − exit) × size × point value for a short. Linear USDT perpetuals have a point value of 1 per coin.
  • Fee = position value × fee rate, on entry and on exit. A limit order that rests in the book usually pays the lower maker rate; a market order or a triggered stop pays the taker rate.
  • Funding payment = position value at the mark price × funding rate, at every funding time the position is open. A positive rate means longs pay shorts; a negative rate, shorts pay longs (as described in Binance: Introduction to Binance Futures Funding Rates, checked on 22 October 2026; Binance’s default interval is every 8 hours).
  • Net P&L = gross − entry fee − exit fee − funding paid + funding received.
  • R = net P&L ÷ (|entry − stop| × size). Leverage changes the margin, not the P&L or the R.

The same move as a short, and with one fee rate

A short of 0.5 BTC from 60,000 to 59,100 with a stop at 60,600 and 0.055% per side: gross (60,000 − 59,100) × 0.5 = 450.00 USDT, fees 32.7525 USDT, net 417.2475 USDT, R = +1.39 R. The long above with 0.055% on both sides instead of a maker entry would net 566.6700 USDT – the maker entry saved 10.50 USDT.

Why eight decimal places

Small-cap coins trade at prices like 0.00001234. A long of 50,000,000 units from 0.00001234 to 0.00001301 with 0.055% per side: gross = 0.00000067 × 50,000,000 = 33.50 USDT; entry fee 0.33935000, exit fee 0.35777500; net 32.80287500 USDT; risk 18.00 USDT; R = +1.82 R. Rounding prices or fees to two decimals here changes the result. Edgetrail keeps sums at eight decimal places and shows amounts under 1 with as many decimals as they need.

What Edgetrail includes, by source

SourceWhat Edgetrail books as the resultFeesFunding
Bybit (API or export file)Closed P&L as Bybit reports it, one trade per closing orderincluded; opening + closing fee shown as informationincluded in Bybit’s closed P&L
OKX (API, perpetuals)Realised P&L of each closed positionincludedincluded in OKX’s realised P&L
Binance USDⓈ-M (API)Realised P&L of the fills minus commissions, one trade per closing orderdeducted, entry fee split pro rata; fees paid in BNB stay unknownnot included – Binance books it separately
Hyperliquid (wallet address)Closed P&L of the fills minus fees, one trade per closing orderdeducted, entry fee split pro ratanot included
CSV with a P&L columnThat column, unchangedcolumn shown as informationonly if your exchange includes it in that column
Manual, calculated from pricesGross − fees from your entry, exit, size and fee modeamount or percent per sideno separate field – add it to the exit fee, or a received payment as a negative fee
ReplayR against the initial stopnot includednot included

From Edgetrail’s import code as of 22 October 2026. Binance and OKX imports reach back up to 90 days per request.

Getting funding right in your journal

  1. Check whether your exchange’s closed or realised P&L includes funding. Bybit describes its closed P&L as net of opening, closing and funding fees (Bybit help: FAQ – P&L calculation), and OKX defines realised P&L as pnl + fee + fundingFee (OKX API: Get positions history), both checked on 22 October 2026. Binance’s and Hyperliquid’s fill P&L do not include funding.
  2. If it does, log that number “from the exchange” and you are done – fees and funding are already in.
  3. If it does not, add up the funding from the exchange’s funding history for the holding period and add it to the exit fee of the trade (or enter a net payment you received as a negative fee).
  4. For backtests in replay, remember that results are in R without fees and funding; positions held across several funding times on perpetuals carry that cost in live trading.

The exchange-specific import steps are on Bybit, Binance, OKX and Hyperliquid; everything else goes through the CSV import. A position closed in several orders is one trade with several exits, as shown in how to journal partial exits; what funding costs over a holding period, the funding fee calculator works out. All formulas are on the methodology page.

Updated:

Logging a closed trade in Edgetrail: the exchange’s P&L, with entry, exit and size optional
Logging a closed trade in Edgetrail: the exchange’s P&L, with entry, exit and size optional

Frequently asked questions

How do you calculate PnL on crypto futures?

For a long: (exit − entry) × size; for a short: (entry − exit) × size. Then subtract the entry and exit fees and the funding you paid, and add any funding you received.

Does leverage change my futures P&L?

No. P&L depends on price difference and size; leverage only changes how much margin the exchange holds. It changes how quickly you reach liquidation, not the profit of a given move.

Is funding included in the closed P&L?

It depends on the exchange: Bybit’s closed P&L and OKX’s realised P&L include it, while Binance books funding separately from the realised P&L of trades. Edgetrail imports each number as the exchange defines it.

How is the funding fee calculated?

Position value at the mark price times the funding rate, at each funding time the position is open. With a positive rate longs pay shorts; with a negative rate shorts pay longs.

Keep reading

$24 a month · $199 a year · $99 once as a Founder (50 spots) · later $249 Lifetime. The first 14 days are free, no credit card.

All prices

Ready to face your numbers?

Log your first trade in minutes. 14 days free, no credit card.

Try free for 14 days
No credit card · Export any time · 14-day money-back