pnl calculator

PnL Calculator (Profit & Loss)

Estimate gross PnL, net PnL, return on margin, and break-even exit price for long or short trades.

What is PnL?

PnL stands for Profit and Loss. It is one of the most important metrics in trading and investing because it tells you whether a position made money or lost money. A PnL calculator helps you quickly evaluate a trade before entering it, while it is open, and after you close it.

In simple terms, PnL measures the difference between how much you bought something for and how much you sold it for, adjusted for costs like trading fees, funding rates, and commissions.

Core PnL Formula

1) Gross PnL (before fees)

Long trade: (Exit Price - Entry Price) x Quantity x Multiplier

Short trade: (Entry Price - Exit Price) x Quantity x Multiplier

2) Net PnL (after fees)

Net PnL = Gross PnL - (Entry Fee + Exit Fee + Other Fees)

3) Return on Margin (ROM)

If leverage is used, the capital actually tied up in the trade is lower than the full position value. A useful metric is:

ROM = Net PnL / Margin Used x 100

Where Margin Used is approximately Position Notional / Leverage.

How to Use This PnL Calculator

  • Select position type: Long if you profit from price going up, Short if you profit from price going down.
  • Enter your trade prices: Entry and Exit.
  • Add size details: Quantity and contract multiplier.
  • Set leverage: Use 1x for spot-style calculation.
  • Include costs: Entry fee, exit fee, and other carrying costs.
  • Click Calculate: You will get gross PnL, total fees, net PnL, ROM, notional return, and break-even exit price.

Realized vs Unrealized PnL

Unrealized PnL

Unrealized PnL is your current paper gain or loss while the position remains open. It changes constantly with market price.

Realized PnL

Realized PnL is final. It is locked in when you close the position. This is what matters for account growth, taxes, and performance reporting.

Why Fees Matter More Than Most Traders Think

Small fees can make a large difference over many trades. If your strategy takes frequent entries and exits, transaction costs can turn a seemingly profitable system into a losing one. Always include:

  • Exchange or broker commissions
  • Spread/slippage costs
  • Funding or borrow rates (for leveraged/short products)
  • Platform or execution fees

Practical Risk Management Tips

  • Pre-calculate PnL before placing any trade.
  • Define a stop-loss based on acceptable loss, not emotion.
  • Use position sizing rules (e.g., risk 1%-2% of account per trade).
  • Track net PnL, not just gross wins.
  • Review performance by setup, market condition, and timeframe.

Example Scenarios

Example A: Long Position

You buy at $100, sell at $110, quantity is 10, multiplier is 1, and total fees are $8.

Gross PnL = (110 - 100) x 10 = $100

Net PnL = $100 - $8 = $92

Example B: Short Position

You short at $50, buy back at $45, quantity is 40, multiplier is 1, and total fees are $12.

Gross PnL = (50 - 45) x 40 = $200

Net PnL = $200 - $12 = $188

Final Thoughts

A good pnl calculator does more than report a number. It improves decision quality, helps you compare trade ideas, and builds discipline around costs and risk. Use it before every trade to check whether the potential reward justifies the downside and fees.

🔗 Related Calculators