BuyMeWhiskey
🇺🇸 US

How is trading P&L calculated?

GlobalPublished · Written by BuyMeWhiskey Editorial Team · How we check facts

Trading P&L measures the gain or loss created by a position after considering entry and exit values, position size and relevant costs. The exact formula changes for long, short, derivative and multi-fill trades.

Write the trade as quantities, prices, direction and costs before calculating P&L; that prevents sign errors when a position contains multiple fills or fees.

Investor.gov investing basics

Run your own numbers: Compound interest and savings calculator.

Long-trade P&L starts with the price difference

For a simple long equity position, the gross price P&L is the number of shares multiplied by the difference between the exit price and the entry price. If the exit price is higher, the price contribution is positive; if the exit is lower, it is negative.

The formula is straightforward, but traders often make mistakes because they calculate from account value instead of position value. The trade should first be represented as a quantity multiplied by price. Only then should fees, commissions, financing or other adjustments be added.

Short trades reverse the direction

A short position benefits from a price decline. The gross P&L is therefore quantity multiplied by entry price minus exit price. Forgetting that sign reversal is one of the easiest ways to produce a plausible-looking but wrong answer.

Short positions can also carry borrow costs or other charges that do not appear in the raw entry-versus-exit calculation. A trader who wants an account-level net P&L must include those costs separately.

Realized and unrealized P&L are not the same

Unrealized P&L describes the change in the value of an open position relative to its cost basis or marked entry price. Realized P&L is associated with a completed sale or other closing transaction. Brokerage statements may show both, but their tax treatment and accounting presentation are not identical.

For US taxpayers, the tax basis and holding period can matter when an investment is sold. A trading screen that says “+500” is not by itself a tax calculation.

Multiple fills need weighted thinking

Suppose a trader buys the same stock in several executions at different prices. There is no single entry price until those fills are combined under the broker’s accounting method. A simple average can describe an economic average cost, but the tax-lot basis and the broker’s realised P&L may depend on which lots were sold.

This is why a reliable P&L worksheet keeps each fill or lot instead of overwriting history with one manually typed price.

Derivatives add contract multipliers

Futures, options and other derivatives often use a multiplier. A one-point movement in the quoted price may represent much more or much less than one currency unit per contract. The contract specification must therefore be part of the P&L formula.

For an option, premium paid, premium received, contract size and commissions all influence the net result. A charting platform can show a mark-to-market number without showing every economic cost.

Net P&L belongs after costs

Trading costs can include commission, exchange fees, financing, borrow charges and the spread between execution prices. High turnover can make these small amounts significant. For a clean post-trade report, calculate gross P&L first, then list each cost as a separate line.

That structure makes errors easier to find and lets you compare strategies on a consistent basis.

For a serious trading book, reconcile the result to statements rather than trusting a single screen field. A clean process records the opening position, each fill, corporate actions, fees and the final closing position. That creates an audit trail when the broker and internal calculation disagree.

For strategy research, keep gross trading P&L separate from the effects of leverage and account funding. A strategy can look strong before financing but weak after carrying costs, while another can have modest price movement yet produce a useful result because capital was deployed efficiently.

Illustrative long-trade P&L
Gross gain$300Trading costs-$12Net P&L$288

Worked example

Illustrative trading example: Lena buys 100 shares of a stock at $25 per share and later sells them at $28. The gross price gain is 100 × ($28 − $25) = $300. She then pays $12 in combined commissions and transaction costs.

  • Gross P&L: 100 × ($28 − $25) = $300.
  • Net P&L: $300 − $12 = $288.

If the trade were short instead, the price formula would reverse: 100 × ($25 − $28) = −$300 before costs. That example shows why the first step in a P&L calculation is identifying whether the position was long or short.

The same method scales to larger trades: keep the quantity and price calculation separate from commissions, borrow and financing so each component can be reviewed independently.

What is the basic P&L formula for a long stock trade?#

For a simple long position, multiply the number of shares by the exit price minus the entry price. After that gross result is calculated, subtract commissions and other trading costs to arrive at a more useful net figure. The formula is simple, but the inputs must be taken from the actual fills and not from rounded chart prices.

How do I calculate P&L on a short trade?#

A simple short-stock formula is quantity multiplied by entry price minus exit price. A price decline produces a positive gross result for the short position. Borrow charges and trading costs must then be considered when working out the net result.

What is unrealized P&L?#

Unrealized P&L is the change in value of an open position compared with its relevant cost or marked entry value. It can move continuously with the market and becomes realized when the position is closed, although accounting and tax rules can differ by situation.

Why does my broker show a different P&L from my spreadsheet?#

The broker may include commissions, financing, dividends, currency conversion, lot selection or mark-to-market assumptions that your spreadsheet leaves out. Compare the transaction-level records rather than trying to reconcile only the final total. That is especially useful when one position has several fills or when corporate actions changed the economic position during the holding period.

Do options use the same P&L formula as shares?#

The idea is similar, but options add contract size, premium and other mechanics. A quoted option price usually represents something other than one share of exposure, so the contract multiplier must be included in the calculation. For a derivative, the contract specification can be as important as the quoted price because one point may represent multiple currency units per contract.

Does trading P&L equal the taxable gain on my tax return?#

Not necessarily. Trading P&L is an economic measurement, while tax reporting depends on basis, holding period, wash-sale rules, security type and the tax treatment of the account and transaction. Use the broker’s tax records and IRS guidance for filing decisions.

Keep reading

Next question →Why does the law of one price not always hold?

Sources

  1. Investor.gov: Investing basics
  2. Investor.gov: Types of stock orders
  3. FINRA: Time parameters and qualifiers for stock orders
  4. IRS: Publication 550 — Investment Income and Expenses

Figures were checked against these sources before publication. If a rule changes, we update the page and show the new date.

General information, not personal financial advice. Rules depend on your circumstances; check the official source or speak to a regulated adviser before acting.