How PnL and ROE are calculated
On a USDT-margined linear perpetual, every coin of position size gains or loses one USDT for every USDT the price moves. Fees are charged as a percentage of the position’s value, once when you open and once when you close.
size in coins = USDT value ÷ entry
gross PnL, long = size × (exit − entry)
gross PnL, short = size × (entry − exit)
fees = fee × size × (entry + exit)
net PnL = gross PnL − fees
margin = size × entry ÷ leverage
ROE = net PnL ÷ margin
Exchanges usually show ROE on the position screen before fees, so the calculator gives both figures. When leverage is filled in, it also estimates the liquidation price with a 0.5% maintenance rate and warns you if the exit you entered lies past it, because that exit could never have happened.
A worked example
Illustrative numbers only
A 0.5 BTC long opened at 60,000 and closed at 61,200 with 10x leverage, paying 0.05% per side.
- Gross PnL0.5 × (61,200 − 60,000) = 600 USDT
- Fees0.0005 × 0.5 × (60,000 + 61,200) = 30.30 USDT
- Net PnL600 − 30.30 = 569.70 USDT
- Margin at 10x0.5 × 60,000 ÷ 10 = 3,000 USDT
- ROE569.70 ÷ 3,000 = 18.99%
- Price move+2%
The fees look small next to 600 USDT, but each one is charged on the full position value, about 30,000 USDT. On a move of 0.1%, from 60,000 to 60,060, the same position makes 30 USDT gross and pays about 30 in fees, so the trade comes out flat.
Common mistakes
- Reading ROE as profit. ROE is profit divided by margin. The example’s 18.99% ROE at 10x is the same 569.70 USDT that would show as about 1.9% at 1x, where the margin is the full 30,000.
- Forgetting the exit fee. The position screen shows unrealised PnL before the closing fee. Count both sides, as above, before you call a small move a win.
- Exits past liquidation. At 10x a long from 60,000 is liquidated near 54,270 with a 0.5% maintenance rate, so an exit at 54,000 never happens; the position is already closed and the margin is gone. The liquidation price calculator gives the line for your own rate.
- Mixing up size units. Exchanges take order size in coins, in USDT value or in contracts that each stand for a fixed number of coins. Convert to coins or to USDT value before you enter the size here.
- Judging a closed trade by PnL alone. Measure the result against the 1R set before the trade. An 80 USDT loss on a trade that risked 100 at the stop stayed inside the plan. The same loss on a trade sized to risk 40 usually means price ran past the invalidation level and the stop was moved or never placed, or the stop filled far past its price. The position size calculator gives the 1R in USDT.
Questions
Why is my ROE so much bigger than the price move?
ROE is measured against the margin, and the margin is the notional divided by leverage. At 10x the margin is a tenth of the position, so the same profit is ten times larger as a share of it.
Are funding payments included?
No. Perpetuals exchange funding between longs and shorts at set intervals, every eight hours on many pairs, and over a long hold it adds up. Your exchange’s funding history has the real figure.
Should I enter the maker or the taker fee?
The one you actually pay. Market and stop orders usually pay the taker rate, while limit orders that rest on the book usually pay the lower maker rate. If entry and exit pay different rates, enter the average of the two; the result stays close as long as the two prices are near each other.
Does this work for coin-margined contracts?
No. Coin-margined (inverse) contracts settle profit and loss in the coin and use a different formula. This calculator is for USDT-margined linear contracts, where PnL is paid in USDT.
Other calculators
- Position size calculatorHow many coins to trade so a stop-out costs what you planned.
- Liquidation price calculatorWhere an isolated long or short gets liquidated at your leverage.
- Risk/reward calculatorThe R of each target, the blended R and the break-even rate.