Guides · Common questions

How to calculate profit and loss on a crypto trade

The formulas for profit and loss on a long and a short, how fees change the result, what leverage does to the percentage, and how to work out your break-even price.

6 min readCommon questions

Most exchanges show a profit and loss figure, often shortened to P&L or PnL, next to every position. It helps to know how that number is built, because the figure on the screen may or may not include fees, and the percentage may be measured against different things on different platforms. Once you can work it out yourself, you can check any trade in a minute.

The basic formula

Long P&L = (Exit price − Entry price) × QuantityQuantity is the number of coins. Position value ÷ entry price gives the quantity.

Short P&L = (Entry price − Exit price) × QuantityA short gains when the price falls, so the order of the two prices is reversed.

A long, before fees
Buy $1,000 of a coin at $50: 20 coins
Sell at $55
P&L = ($55 − $50) × 20 = +$100
Return on the position: $100 ÷ $1,000 = +10%
A short, before fees
Short $2,000 of a coin at $40: 50 coins
Buy back at $38
P&L = ($40 − $38) × 50 = +$100
Return on the position: $100 ÷ $2,000 = +5%

Adding fees

Exchanges charge a fee on the value traded, usually a small percentage. You pay it when you open and again when you close. On most platforms a taker order (one that fills at once against the book, such as a market order) pays more than a maker order (a limit order that rests in the book first).

Fee = Value traded × Fee rateCharged on the entry value and again on the exit value.

The same long, with a 0.1% fee each way
Entry fee: $1,000 × 0.1% = $1.00
Exit fee: 20 coins × $55 = $1,100 × 0.1% = $1.10
Net P&L: $100 − $1.00 − $1.10 = +$97.90
Net return on the position: +9.79%

On one trade the difference looks small. Over hundreds of trades, especially short-term ones with small targets, fees can decide whether the results are positive or negative. A trader aiming for a 0.5% move who pays 0.2% in total fees is giving away a large share of every winner.

Your break-even price

Because of fees, a trade closed exactly at the entry price loses money. The price has to move a little in your favor first. A quick estimate is the entry price plus the two fee rates added together.

Break-even (long) ≈ Entry × (1 + entry fee rate + exit fee rate)For a short, subtract instead: Entry × (1 − entry fee rate − exit fee rate). The spread you crossed adds a little more.

Break-even with 0.1% fees each way
Entry: $50.00
Break-even ≈ $50 × 1.002 = $50.10
A sell at $50.05 still loses a few cents per coin after fees

What leverage does to the numbers

Leverage does not change the dollar P&L of a position of a given size. It changes how much of your own money, the margin, backs that position. Many platforms show the percentage return on margin, which makes leveraged results look much larger.

The same $1,000 position at 10x
Margin put up: $100 (10x leverage)
Price $50 to $55: net P&L still +$97.90
Return on margin: $97.90 ÷ $100 = +97.9%
A 5% move the other way, before fees: −$50, or −50% of the margin

This is why a leveraged position can show a huge percentage gain or loss on an ordinary price move. Only the dollar amount and the share of your whole account tell you what the trade really did to you. With leverage, also keep in mind the liquidation price, where the exchange closes the position because the margin is nearly used up.

Funding on perpetual futures

Perpetual futures add one more line to the result: funding. Every few hours (every eight hours on many platforms), traders on one side pay traders on the other, depending on whether the contract trades above or below the spot price. A position held through several funding times can gain or lose a noticeable amount from funding alone. Most exchanges list funding payments in the transaction history rather than inside the position’s P&L, so add them up separately.

Realized and unrealized

Unrealized P&L
The profit or loss of an open position at the current price. It changes with every tick and is not yours until you close.
Realized P&L
The profit or loss locked in when you close all or part of a position, usually after fees.
Return on position
P&L divided by the position’s value. Comparable across trades of any leverage.
Return on margin
P&L divided by the margin you put up. Grows with leverage; easy to misread.

Measuring in R as well as dollars

Dollars tell you what happened to your account; R tells you how good the trade was relative to the risk you planned. R is the amount you stood to lose at your stop. A trade that risked $20 and made $50 is a +2.5R trade, whatever its size. Recording both lets you compare a small trade and a large one fairly.

Result in R = Net P&L ÷ Planned riskPlanned risk = the loss you would have taken at the stop, fees included.

A checklist for every closed trade

  1. Write down entry price, exit price and quantity.
  2. Work out the gross P&L with the long or short formula.
  3. Subtract the entry fee, the exit fee and any funding.
  4. Divide by the position value for the return on the position, and by your planned risk for the result in R.
  5. Record the trade in your journal with the reason for the exit.

Key takeaways

  • Long P&L = (exit − entry) × quantity; short P&L = (entry − exit) × quantity.
  • Fees are charged on both the entry and the exit, so break-even sits slightly beyond the entry price.
  • Leverage inflates the return on margin, not the dollar result of a given position size.
  • Funding on perpetual futures is a separate cost or credit; add it in.
  • Record results in R as well as in dollars to compare trades fairly.

Related guides

Practice it, without risking money.

The OREX Journal works out each trade’s profit or loss in dollars and as a percent of the margin, closed trades from the practice simulator arrive there on their own, and Insights adds up your results in R.

The OREX Academy turns topics like this one into short lessons with interactive charts, quizzes and drills in a practice simulator with $10,000 of virtual money. Your AI coach answers questions about them any time.

Start the 5-day free trial Card required for the trial; cancel online before it ends and you pay nothing. Education only, not financial advice.