Skip to content

Calculator

PnL and ROE calculator

How it works

PnL is the price change between entry and exit times the position size, less trading fees. For a short, a falling price is a profit. ROE divides that PnL by the initial margin, so the same trade shows a larger ROE at higher leverage while the dollar result stays the same.

Side

Use the mark price for an open position.

Taker or maker fee; charged on entry and on exit.

Results

Net PnL

+$412.79
ROE
+58.97%
PnL before fees
+$420.00
Fees, entry and exit
$7.21
Initial margin
$700.00
Price change
+6.00%

The formula

long PnL   = (exit − entry) × size − fees
short PnL  = (entry − exit) × size − fees
fees       = fee rate × size × (entry + exit)
margin     = entry × size ÷ leverage
ROE        = PnL ÷ margin

The ROE an exchange shows on an open position usually leaves out trading fees, so it can be a little higher than the net ROE here. Linear contracts (USDT- and USDC-margined) pay PnL in the quote currency, which is what this calculator assumes.

Worked example

You buy 2 ETH at 3,500.00 with 10× leverage and sell at 3,710.00. The price rose 6.00%, so the gross profit is $420.00. Fees of 0.05% on both sides cost $7.21, which leaves +$412.79.

The position locked $700.00 of margin, so ROE is +58.97%. At 20× leverage the same trade locks $350.00 and shows +117.94% ROE, but the profit in dollars is the same.

Frequently asked questions

What is the difference between PnL and ROE?

PnL is the profit or loss in money. ROE (return on equity) is that PnL divided by the initial margin, as a percentage. Two traders with the same PnL can show very different ROE if they used different leverage.

Why does higher leverage give a higher ROE?

Higher leverage locks less margin for the same position, so the same PnL is a larger share of that margin. The dollar result does not change, and the liquidation price moves closer to entry.

Is this realized or unrealized PnL?

Both use the same arithmetic. Put the current mark price in the exit field for unrealized PnL, or the fill price of the closing order for realized PnL.

Does PnL include funding?

Not here. Funding is a separate payment while the position is open. Add it with the funding cost calculator to get the full result of a trade held through funding times.

Results are estimates for planning. Exchanges add fees, funding and tier rules of their own; check the order preview on your venue before you trade. Nothing here is investment advice.

Trade every venue from one tab.

Binance, OKX, Bybit, and Hyperliquid with news, charts, and one-command orders. Included with Ninja Squad Pro membership.