P&L Calculation: How to Work Out Trade Profit
Last updated September 4, 2026

To calculate profit and loss on a trade, multiply the price change by the number of units and subtract your costs. For a long position, profit or loss is (exit minus entry) times units; for a short, it is (entry minus exit) times units. Subtracting fees and slippage turns a theoretical figure into your real, realized result.
Key takeaway
Long P&L = (Exit minus Entry) x Units minus Fees. Short P&L = (Entry minus Exit) x Units minus Fees. The direction of subtraction flips between longs and shorts, but the structure is identical. Costs, commissions, spread, and slippage, always reduce the result, so a trade that looks profitable on paper can be smaller or negative once they are counted.
How to calculate P&L: the formula
P&L is short for profit and loss, and there is a small family of P&L formulas depending on what you are measuring. The three you use most often are realized P&L, unrealized P&L, and P&L as a percentage:
- Realized P&L (a closed position):
(Exit Price - Entry Price) x Units - Feesfor a long, or(Entry Price - Exit Price) x Units - Feesfor a short. - Unrealized P&L (an open position): the same formula, but with the current market price in place of the exit price. It is a paper figure that moves every tick until you close.
- P&L percentage:
(P&L / Capital in Position) x 100, which expresses the result relative to the money you committed.
Here is one worked example. You buy 100 shares at 50 dollars and the price is now 56 dollars. Your unrealized P&L is (56 minus 50) times 100, which is 600 dollars on paper. If you sell at 56 and pay 2 dollars in fees, your realized P&L is 600 minus 2, or 598 dollars. As a percentage of the 5,000 dollars you put in (100 shares at 50), that realized P&L is 598 divided by 5,000 times 100, roughly 12 percent. The sections below break down each part of these P&L formulas in turn.
What is the profit and loss formula?
Profit and loss (P&L) on a trade is the money you make or lose from a price move on your position. The core formula multiplies how far price moved by how many units you held. For a long position, where you buy first and sell later, you profit when the exit price is above the entry.
Long P&L = (Exit Price - Entry Price) x Units - Fees
Short P&L = (Entry Price - Exit Price) x Units - Fees
The only difference for a short, where you sell first and buy back later, is that the subtraction flips: you profit when the exit (your buy-back) is below your entry (your sell). In both cases you multiply by units and subtract round-trip fees. Getting the sign right is the most common slip, so anchor on the rule that profit always means the favorable direction for your position. For the mechanics of selling first, see short selling explained.
A worked example (long and short)
Take a long trade first. You buy 100 shares at 50 dollars and sell at 56 dollars, paying 2 dollars total in commissions. The price moved 6 dollars in your favor across 100 shares.
Long P&L = (56 - 50) x 100 - 2 = 600 - 2 = $598 profit
Now a short. You short 100 shares at 56 dollars and buy them back at 50 dollars, again paying 2 dollars in fees. Because you profit when price falls, you subtract the exit from the entry.
Short P&L = (56 - 50) x 100 - 2 = 600 - 2 = $598 profit
Both make 598 dollars because price moved 6 dollars in the direction each position wanted. If the short had instead risen to 62, the result would be (56 minus 62) x 100 minus 2 = minus 602 dollars, a loss. The arithmetic is symmetric; only the favorable direction differs.
How do fees and slippage change the result?
The clean formula gives a theoretical P&L; your real result is smaller because of costs. Three reduce it: commissions, the bid-ask spread, and slippage, the gap between the price you expected and the price you actually got. On the worked example, 2 dollars of commission barely dented a 600 dollar move, but on small, frequent trades these costs dominate.
Slippage deserves special attention because it is invisible until it bites. A market order in a fast or illiquid market can fill several cents away from the quote, and on a short hold that can erase the edge entirely. As Investopedia notes, slippage tends to be worst around news and at the open and close. Scalpers feel it most; longer-horizon traders least. Always subtract realistic round-trip costs before judging whether a strategy is profitable.
A strategy that looks profitable in backtests can be a net loser live once spread, commissions, and slippage are counted. The more frequently you trade, the larger these costs loom relative to your average move.
Realized vs unrealized P&L
There are two kinds of P&L, and confusing them leads to bad decisions. Unrealized P&L is the paper gain or loss on a position you still hold, measured at the current market price; it fluctuates every tick and is not money in your account. Realized P&L is what you lock in when you close the trade; only then does the gain or loss become actual cash.
The distinction matters psychologically as much as financially. A large unrealized gain can evaporate before you sell, and an unrealized loss is not a real loss until you either close or your thesis breaks. Disciplined traders judge results by realized P&L over many trades, not by the swings of open positions, which is one reason a trading journal records closed-trade outcomes rather than peak paper gains.
How does leverage change P&L?
Leverage does not change the dollar P&L of a price move; it changes what that dollar figure means relative to your own capital. The position's gain or loss is still (exit minus entry) times units, but because you funded only a fraction of the position with your own money, the same dollars represent a much larger percentage swing on your deposit. A 6 dollar move on a position you control with leverage hits your equity far harder than the headline suggests.
Suppose you control a 10,000 dollar position with 2,000 dollars of your own capital (5:1 leverage). A favorable move that produces 600 dollars of P&L is a 6 percent gain on the position but a 30 percent gain on your 2,000 dollar stake. The same 600 dollar loss is a 30 percent hit to your capital. The dollar P&L formula is unchanged; leverage simply magnifies the percentage return, in both directions, on the money you actually put up.
This is why P&L and leverage must be read together. A trade with a modest dollar loss can still be a severe percentage loss on a leveraged account, and on a margin account a large enough loss can exceed your deposit entirely. Always translate a position's dollar P&L back to a percentage of your own capital, not the position size, to see the real impact. Our leverage and margin explained guide covers the full math.
How do you turn P&L into a percentage return?
Dollar P&L tells you the absolute outcome; percentage return tells you how efficiently you used capital, which is what you compare across trades and accounts. Divide the dollar result by the capital committed to the position, then multiply by 100.
Return % = (P&L / Capital in Position) x 100
In the long example, 598 dollars of profit on a 5,000 dollar position (100 shares at 50) is a 12 percent return before fees. Expressing results as percentages, or better, as R-multiples relative to the amount you risked, lets you compare a small trade to a large one fairly and feeds directly into your expectancy math. For the broader companion calculators, see the Bullynx tools hub.
R-multiples deserve a closer look because they normalize results in a way percentages do not. If you risked 100 dollars on a trade (your entry-to-stop distance times your size) and made 300, that is a 3R win regardless of the account size or the position's dollar value. Tracking trades in R lets you compare a small account's trades to a large one's, judge whether your winners are genuinely outrunning your losers, and compute expectancy directly. It is the cleanest language for talking about P&L across different trades and is worth recording alongside the raw dollar figure.
Why your real P&L never matches the chart
Every P&L figure you can read off a chart is a best case, and the gap is systematic rather than random. An AI chart reader such as Bullynx analyses a screenshot, which contains traded prices only: it can mark the level you entered near and the level you exited near, and compute the difference. It cannot see your actual fills.
The difference between the two is everything on this page: the spread you crossed on the way in and again on the way out, commissions, slippage on both fills, financing on a leveraged position held overnight, currency conversion on a foreign listing, and the tax treatment of the result. Each is small, and together they are the reason a strategy that looks marginally profitable on chart prices is often flat or negative in the account. Compute your P&L from your broker's confirmations, not from the chart, and if you want a fair comparison across trades of different sizes, convert the result into R-multiples relative to what you risked.
Educational only. Not financial advice. P&L calculations describe outcomes after the fact; they do not predict price. Examples use illustrative numbers and ignore taxes, which also affect your net result.
Frequently asked questions
- How do you calculate profit and loss on a trade?
- For a long trade, profit or loss equals (exit price minus entry price) times the number of units, minus fees. For a short trade, it is (entry price minus exit price) times units, minus fees. A positive result is a profit; a negative one is a loss.
- How is profit and loss different for a short trade?
- On a short, you profit when price falls, so you subtract the exit from the entry rather than the other way around. The formula flips the order of entry and exit, but you still multiply by units and subtract costs.
- Do fees and slippage affect P&L?
- Yes. Commissions, the bid-ask spread, and slippage all reduce your realized profit or widen your loss. Always subtract round-trip fees and account for slippage, since the price you get often differs slightly from the price you wanted.
- What is the difference between realized and unrealized P&L?
- Unrealized P&L is the paper gain or loss on an open position at the current price. Realized P&L is locked in once you close the trade. Only realized P&L reflects actual money in or out of your account.
- What is the formula for P&L?
- Realized P&L on a closed long is (exit price minus entry price) times units minus fees; on a short it is (entry price minus exit price) times units minus fees. Unrealized P&L uses the same formula with the current price in place of the exit. P&L percentage is P&L divided by the capital in the position, times 100.
- How do I calculate percentage return on a trade?
- Divide the dollar profit or loss by the capital you put into the position, then multiply by 100. A 200 dollar profit on a 2,000 dollar position is a 10 percent return before fees.
- What is the P&L calculation formula?
- For a long position, P&L equals (exit price minus entry price) times units, minus costs. For a short, it is (entry price minus exit price) times units, minus costs. Costs means commissions, the spread crossed on both sides, slippage, and any financing on a leveraged position held overnight.
- What is the difference between realized and unrealized P&L?
- Unrealized P&L is the paper result of a position still open, marked at the current price and changing every tick. Realized P&L is the result once the position is closed, computed from actual fills and net of costs. Only realized P&L is a fact; unrealized is an estimate that can be marked at the bid, the ask or the mid depending on your platform.
About this byline
Markets & product research
The Bullynx editorial team researches and reviews the trading concepts, indicators, and tools we write about. Our articles are educational and are reviewed for accuracy before publishing. They are not financial advice.
The calculator gets you the number. Lynx reads the chart. Upload a chart screenshot and Lynx AI reads the structure and the levels, so the number you just calculated has a setup behind it.
Keep reading
- Breakeven Price: Formula, Fees and Averaging DownFree Tools
- Compound Interest in Trading: Formula and MathFree Tools
- Pip Value Explained: Forex Sizing Made EasyFree Tools
- Position Size Calculator: Size a Trade by RiskFree Tools
- Risk Reward Ratio Break-Even Win Rate: 1:2 Needs 33%Free Tools
- Rule of 72: Estimate Doubling Time FastFree Tools
Educational only. Not financial advice. NFA. Bullynx is not a registered investment adviser or broker-dealer. Trading and investing involve significant risk of loss. Read the full risk disclosure or how this article was researched and reviewed.