X (formerly Twitter)
https://x.com/XXKK_OFFICIAL
New Coins
Net PnL Calculator For Perpetuals Including Fees And Funding
If you've ever closed a perp trade "in profit" and still saw a smaller balance increase, your calculator is missing something. A reliable perpetual pnl calculator must account for trading fees on both sides and funding transfers that hit at set timestamps.
This guide shows an exchange-neutral net PnL model you can paste into a spreadsheet. You'll also get clear sign rules, break-even formulas, and two complete worked examples (one long, one short) with net PnL and ROE.
What net PnL really means on perpetuals (and why gross PnL isn't enough)
An AI-created infographic showing the key inputs and outputs for net PnL on perpetual futures.
Start with a simple truth: gross PnL is only the price move times your position size. Perps add two "silent" PnL drivers:
Fees: You usually pay an entry fee and an exit fee. Maker and taker rates can differ, and fee tiers vary by venue and volume. Because fees are charged on notional, they scale with size, even if your margin is small.
Funding: Funding is a trader-to-trader payment that helps keep the perp near its reference price. When funding is positive, longs pay shorts. When funding is negative, shorts pay longs. The interval is often 8 hours, but it depends on the contract, so you must input the number of funding events you held through. For a neutral reference, compare definitions in the Perpetuals funding rates documentation.
Net PnL is what you keep after all of it:
If you want your spreadsheet to match exchange history, treat fees and funding as cash flows, not "small adjustments."
Also choose your price reference on purpose. Unrealized PnL and funding are commonly mark-price based, while your fills happen at last price. That mismatch is a major reason balances don't "feel" consistent. If you want a platform-style explanation of that mismatch, see realized vs unrealized PnL on XXKK.
For contract mechanics examples (linear vs inverse, funding timing), the BitMEX perpetual guide examples are also a useful cross-check.
Spreadsheet-ready net PnL formulas (fees + funding), with sign conventions
A good net calculator starts by fixing sign rules. Use one consistent convention and don't mix it mid-sheet.
Variables (linear, USDT-margined perps)
Use this small set, then add detail only if you need it:
Variable
Meaning
Unit / format
Side
+1 for Long, -1 for Short
number
Qty
Position size in base coin
BTC, ETH, etc.
P0
Average entry price
quote per coin
P1
Average exit price
quote per coin
FeeIn
Entry fee rate
decimal (0.0006 = 0.06%)
FeeOut
Exit fee rate
decimal
L
Position multiple (for ROE)
number
FundRate_k
Funding rate for event k
decimal
Mark_k
Mark price at funding event k
quote per coin
Core formulas (copy-paste friendly)
Gross PnL (linear perp)GrossPnL = Side * Qty * (P1 - P0)
Trading fees (charged on notional at each fill price)EntryFee = FeeIn * Qty * P0ExitFee = FeeOut * Qty * P1TotalFees = EntryFee + ExitFee
Funding cash flow (positive means you receive)For each funding event k:FundingCF_k = (-Side) * (Qty * Mark_k) * FundRate_kThen sum them:TotalFundingCF = SUM(FundingCF_k)
Gotcha: many traders accidentally treat positive funding as "good for longs." In standard perp conventions, positive funding is a cost for longs and a credit for shorts.
Net PnLNetPnL = GrossPnL - TotalFees + TotalFundingCF
Initial margin (simple estimate, isolated-style)InitMargin = (Qty * P0) / L
ROE (net)ROE = NetPnL / InitMargin
Break-even exit price (useful sanity check)
If you already know TotalFundingCF for the hold period:
Long break-evenP1_BE = (P0*(1+FeeIn) - (TotalFundingCF/Qty)) / (1-FeeOut)
Short break-evenP1_BE = (P0*(1-FeeIn) + (TotalFundingCF/Qty)) / (1+FeeOut)
Funding and fees differ by venue, tier, order type, and contract. On many platforms you can preview the next funding time and rate. If you want a practical "where to check" workflow, see where to find perpetual funding rates. For funding cost intuition, WOOX also has a clear write-up on calculating funding fees in a trading plan.
Worked examples (long and short), then a quick mistake checklist
An AI-created illustration of a trader checking a spreadsheet-based net PnL calculation.
Example A: Long BTCUSDT, fees + funding reduce (but don't erase) profit
Assume:
Side = +1, Qty = 0.20 BTC
P0 = 50,000, P1 = 51,000
FeeIn = 0.0006 (0.06% taker), FeeOut = 0.0006
Held through 3 funding events, each at FundRate_k = +0.0001 (0.01%)
Use Mark_k ≈ 50,500 for all three events (simple estimate)
L = 10
Calculations:
Component
Formula
Result (USDT)
Gross PnL
0.20*(51,000-50,000)
200.00
Entry fee
0.0006*0.20*50,000
-6.00
Exit fee
0.0006*0.20*51,000
-6.12
Funding (3 events)
SUM((-1)*(0.20*50,500)*0.0001)
-3.03
Net PnL
Gross - Fees + Funding
184.85
Initial margin
(0.20*50,000)/10
1,000.00
ROE (net)
184.85/1,000
18.49%
Example B: Short ETHUSDT, funding sign matters more than people expect
Assume:
Side = -1, Qty = 5 ETH
P0 = 3,000, P1 = 2,880
Entry is maker: FeeIn = 0.0002 (0.02%), exit is taker: FeeOut = 0.0006 (0.06%)
Held through 2 funding events, each at FundRate_k = -0.00015 (-0.015%)
Use Mark_k ≈ 2,940
L = 5
Calculations:
Component
Formula
Result (USDT)
Gross PnL
(-1)*5*(2,880-3,000)
600.00
Entry fee
0.0002*5*3,000
-3.00
Exit fee
0.0006*5*2,880
-8.64
Funding (2 events)
SUM((+1)*(5*2,940)*(-0.00015))
-4.41
Net PnL
Gross - Fees + Funding
583.95
Initial margin
(5*3,000)/5
3,000.00
ROE (net)
583.95/3,000
19.47%
Because funding is negative here, shorts pay, so funding reduces the short's net result.
Common mistakes (quick checklist)
Wrong funding sign: Remember, positive funding is usually paid by longs, negative funding is usually paid by shorts.
Forgetting the exit fee: Round trips have two fee legs.
Using L to scale PnL: Leverage (position multiple) changes margin and ROE, it doesn't multiply price PnL by itself.
Mixing mark and last: Funding and liquidation checks often use mark. Fills use last. Keep your model consistent.
Using the wrong unit: Qty is in base coin for linear perps, not "contracts" unless your contract spec says so.
If your net PnL swings wildly around funding times, also review liquidation buffer and margin rules. A practical pre-trade routine is to estimate your liquidation level first, like in this guide on how to calculate futures liquidation price.
Conclusion
A correct perpetual pnl calculator is simple but strict: compute gross PnL, subtract entry and exit fees, then add funding cash flows with the right sign. Once those pieces are in place, ROE becomes a clean margin-based measure, not a guess.
Finally, use platforms that take user protection seriously, with strong security, data privacy controls, and a compliance-first approach, and still keep your own checks tight before every trade.
Feb 25, 2026
Share:
Table of Contents
If you've ever closed a perp trade "in profit" and still saw a smaller balance increase, your calculator is missing something. A reliable perpetual pnl calculator must account for trading fees on both sides and funding transfers that hit at set timestamps.

This guide shows an exchange-neutral net PnL model you can paste into a spreadsheet. You'll also get clear sign rules, break-even formulas, and two complete worked examples (one long, one short) with net PnL and ROE.
What net PnL really means on perpetuals (and why gross PnL isn't enough)

An AI-created infographic showing the key inputs and outputs for net PnL on perpetual futures.
Start with a simple truth: gross PnL is only the price move times your position size. Perps add two "silent" PnL drivers:
- Fees: You usually pay an entry fee and an exit fee. Maker and taker rates can differ, and fee tiers vary by venue and volume. Because fees are charged on notional, they scale with size, even if your margin is small.
- Funding: Funding is a trader-to-trader payment that helps keep the perp near its reference price. When funding is positive, longs pay shorts. When funding is negative, shorts pay longs. The interval is often 8 hours, but it depends on the contract, so you must input the number of funding events you held through. For a neutral reference, compare definitions in the Perpetuals funding rates documentation.
Net PnL is what you keep after all of it:
If you want your spreadsheet to match exchange history, treat fees and funding as cash flows, not "small adjustments."
Also choose your price reference on purpose. Unrealized PnL and funding are commonly mark-price based, while your fills happen at last price. That mismatch is a major reason balances don't "feel" consistent. If you want a platform-style explanation of that mismatch, see realized vs unrealized PnL on XXKK.
For contract mechanics examples (linear vs inverse, funding timing), the BitMEX perpetual guide examples are also a useful cross-check.
Spreadsheet-ready net PnL formulas (fees + funding), with sign conventions
A good net calculator starts by fixing sign rules. Use one consistent convention and don't mix it mid-sheet.
Variables (linear, USDT-margined perps)
Use this small set, then add detail only if you need it:
| Variable | Meaning | Unit / format |
|---|---|---|
Side |
+1 for Long, -1 for Short |
number |
Qty |
Position size in base coin | BTC, ETH, etc. |
P0 |
Average entry price | quote per coin |
P1 |
Average exit price | quote per coin |
FeeIn |
Entry fee rate | decimal (0.0006 = 0.06%) |
FeeOut |
Exit fee rate | decimal |
L |
Position multiple (for ROE) | number |
FundRate_k |
Funding rate for event k
|
decimal |
Mark_k |
Mark price at funding event k
|
quote per coin |
Core formulas (copy-paste friendly)
Gross PnL (linear perp)GrossPnL = Side * Qty * (P1 - P0)
Trading fees (charged on notional at each fill price)EntryFee = FeeIn * Qty * P0ExitFee = FeeOut * Qty * P1TotalFees = EntryFee + ExitFee
Funding cash flow (positive means you receive)For each funding event k:FundingCF_k = (-Side) * (Qty * Mark_k) * FundRate_kThen sum them:TotalFundingCF = SUM(FundingCF_k)
Gotcha: many traders accidentally treat positive funding as "good for longs." In standard perp conventions, positive funding is a cost for longs and a credit for shorts.
Net PnLNetPnL = GrossPnL - TotalFees + TotalFundingCF
Initial margin (simple estimate, isolated-style)InitMargin = (Qty * P0) / L
ROE (net)ROE = NetPnL / InitMargin
Break-even exit price (useful sanity check)
If you already know TotalFundingCF for the hold period:
-
Long break-even
P1_BE = (P0*(1+FeeIn) - (TotalFundingCF/Qty)) / (1-FeeOut) -
Short break-even
P1_BE = (P0*(1-FeeIn) + (TotalFundingCF/Qty)) / (1+FeeOut)
Funding and fees differ by venue, tier, order type, and contract. On many platforms you can preview the next funding time and rate. If you want a practical "where to check" workflow, see where to find perpetual funding rates. For funding cost intuition, WOOX also has a clear write-up on calculating funding fees in a trading plan.
Worked examples (long and short), then a quick mistake checklist

An AI-created illustration of a trader checking a spreadsheet-based net PnL calculation.
Example A: Long BTCUSDT, fees + funding reduce (but don't erase) profit
Assume:
-
Side = +1,Qty = 0.20 BTC -
P0 = 50,000,P1 = 51,000 -
FeeIn = 0.0006(0.06% taker),FeeOut = 0.0006 - Held through 3 funding events, each at
FundRate_k = +0.0001(0.01%) - Use
Mark_k ≈ 50,500for all three events (simple estimate) L = 10
Calculations:
| Component | Formula | Result (USDT) |
|---|---|---|
| Gross PnL | 0.20*(51,000-50,000) |
200.00 |
| Entry fee | 0.0006*0.20*50,000 |
-6.00 |
| Exit fee | 0.0006*0.20*51,000 |
-6.12 |
| Funding (3 events) | SUM((-1)*(0.20*50,500)*0.0001) |
-3.03 |
| Net PnL | Gross - Fees + Funding |
184.85 |
| Initial margin | (0.20*50,000)/10 |
1,000.00 |
| ROE (net) | 184.85/1,000 |
18.49% |
Example B: Short ETHUSDT, funding sign matters more than people expect
Assume:
-
Side = -1,Qty = 5 ETH -
P0 = 3,000,P1 = 2,880 - Entry is maker:
FeeIn = 0.0002(0.02%), exit is taker:FeeOut = 0.0006(0.06%) - Held through 2 funding events, each at
FundRate_k = -0.00015(-0.015%) - Use
Mark_k ≈ 2,940 L = 5
Calculations:
| Component | Formula | Result (USDT) |
|---|---|---|
| Gross PnL | (-1)*5*(2,880-3,000) |
600.00 |
| Entry fee | 0.0002*5*3,000 |
-3.00 |
| Exit fee | 0.0006*5*2,880 |
-8.64 |
| Funding (2 events) | SUM((+1)*(5*2,940)*(-0.00015)) |
-4.41 |
| Net PnL | Gross - Fees + Funding |
583.95 |
| Initial margin | (5*3,000)/5 |
3,000.00 |
| ROE (net) | 583.95/3,000 |
19.47% |
Because funding is negative here, shorts pay, so funding reduces the short's net result.
Common mistakes (quick checklist)
- Wrong funding sign: Remember, positive funding is usually paid by longs, negative funding is usually paid by shorts.
- Forgetting the exit fee: Round trips have two fee legs.
-
Using
Lto scale PnL: Leverage (position multiple) changes margin and ROE, it doesn't multiply price PnL by itself. - Mixing mark and last: Funding and liquidation checks often use mark. Fills use last. Keep your model consistent.
-
Using the wrong unit:
Qtyis in base coin for linear perps, not "contracts" unless your contract spec says so.
If your net PnL swings wildly around funding times, also review liquidation buffer and margin rules. A practical pre-trade routine is to estimate your liquidation level first, like in this guide on how to calculate futures liquidation price.
Conclusion
A correct perpetual pnl calculator is simple but strict: compute gross PnL, subtract entry and exit fees, then add funding cash flows with the right sign. Once those pieces are in place, ROE becomes a clean margin-based measure, not a guess.
Finally, use platforms that take user protection seriously, with strong security, data privacy controls, and a compliance-first approach, and still keep your own checks tight before every trade.
Crypto Portfolio Allocation In India Using A Simple INR Model
Crypto Staking Tax In India 2026 With Simple INR Examples
Share:

BSA Token in 2026: Features and Binance Listing Facts
Interest in the BSA token is picking up in 2026 for a simple reason: traders want to know if it h...
May 9, 2026

BILL Coin Price Analysis and Market Outlook for 2026
A BILL coin price analysis looks at three things, where the coin trades, why it moves, and what m...
May 9, 2026

BSA Coin Contract Details and a Realistic 2026 Price Forecast
Most readers want two things before touching BSA coin: the contract details and a forecast that d...
May 9, 2026
Trade anytime, anywhere!
Start your crypto journey here.
LEARN MORE

