All posts

Risk Management6 min read

How to Calculate Trading P&L With Partial Exits

Learn to calculate trading P&L with partial exits using a fill-by-fill ledger, reconcile fees, and express the final result consistently in R.

By TerraTrade Team

Notebook ledger listing several trade exits beside a calculator and price chart

Start with the fills, not an average#

When you scale out, a trade does not have one exit price. Each partial close realizes a result against the entry price for the quantity closed. To calculate trading P&L with partial exits, record each close separately, include its costs, and then add the rows together.

That gives you one net realized result in dollars for the completed position. You can express it in R by dividing that same net result by a stated initial-risk amount. Keeping the calculation at the fill level makes the result auditable and helps explain how the trade finished without confusing it with open-position P&L or performance across a sample of trades. A broker’s displayed realized P&L may also depend on its reporting and lot-matching conventions, so reconcile your journal with confirmations or statements when needed. Realized P&L | IBKR Glossary | IBKR Campus Reporting Guide Better Understanding Your Brokerage Account Statement | Investor.gov

Calculate gross P&L for each exit#

For a linear instrument, calculate each exit’s gross P&L against the entry price and multiply by the quantity closed and the instrument’s value per price unit. For a stock, that value is typically one dollar per share for each one-dollar price move. For futures, use the contract’s applicable multiplier or tick-value convention; a contract is not equivalent to one share. CME’s futures example likewise calculates the price move in dollars per contract and applies the number of contracts. Calculating Futures Contract Profit or Loss

The sign follows the direction of the trade: a higher exit price adds gross P&L to a long, while a lower exit price adds gross P&L to a short. Costs are subtracted regardless of direction. Include commissions and other transaction costs that apply to the trade, using a consistent accounting convention. Realized P&L reporting may include fees and commissions. Realized P&L | IBKR Glossary | IBKR Campus

  • Long: (exit price − entry price) × quantity closed × value per price unit.
  • Short: (entry price − exit price) × quantity closed × value per price unit.
  • Net for each row: gross P&L − that exit’s costs − its allocated share of entry costs.
  • Trade net realized P&L: add the net P&L from all exit rows.

Suppose a long trade opens 100 shares at $50.00, with a $5.00 entry commission. Three exits close 40 shares at $55.00, 30 at $53.00, and the final 30 at $48.00. Assume a $2.00 exit fee for each fill and allocate the entry commission by quantity closed: $2.00, $1.50, and $1.50. The figures below are illustrative arithmetic, not a forecast or recommendation.

ExitQuantity closedExit priceGross P&LExit feeAllocated entry feeNet realized P&L
140 shares$55.00+$200.00$2.00$2.00+$196.00
230 shares$53.00+$90.00$2.00$1.50+$86.50
330 shares$48.00−$60.00$2.00$1.50−$63.50
Total100 shares—+$230.00$6.00$5.00+$219.00

Convert the net result into R#

To report the completed trade in R, divide the net realized dollars by a clearly defined initial-risk amount:

Net R = net realized P&L ÷ initial risk in dollars

For the example, assume the planned stop is $47.00. Before fees, price risk is ($50 − $47) × 100 shares = $300. If your journal defines initial risk as including the $5 entry commission, the denominator is $305 and the result is $219 ÷ $305, or about +0.72R. If it defines initial risk before fees, the result is $219 ÷ $300, or +0.73R. Both calculations use the same net realized result; they differ because the denominator convention differs.

Choose and label one convention for the journal. Avoid comparing a fee-adjusted numerator with an unlabeled, differently defined denominator. If your original risk changes under your own tracking rules, record the rule and the amount used rather than silently changing the denominator after the trade.

Use this sequence to build a ledger that another person—or you months later—can audit. Transaction details and costs can appear in brokerage records, and Investor.gov advises reviewing account statements against trade confirmations. Better Understanding Your Brokerage Account Statement | Investor.gov

  1. Record the opening quantity, entry price, direction, and instrument value per price unit. For futures, verify the contract’s applicable multiplier or tick value rather than treating a contract like a share. Calculating Futures Contract Profit or Loss
  2. Enter each partial close on its own row: quantity, execution price, and applicable exit costs.
  3. Calculate gross P&L for each exit using the long or short formula.
  4. Allocate entry costs across rows if you need row-level net results. Confirm the allocated amounts add back to the full entry cost.
  5. Sum gross P&L, exit fees, and entry fees separately, then calculate the single net realized result.
  6. Confirm that total quantity closed matches the opening quantity for a fully closed trade. If it does not, identify the remaining open quantity instead of labeling the whole trade complete.
  7. Divide net realized dollars by your stated initial-risk amount to calculate net R. Record the fee convention used in that denominator.
  8. Compare the journal’s executions and costs with trade confirmations or account statements; investigate differences in quantities, prices, fees, or lot matching. Better Understanding Your Brokerage Account Statement | Investor.gov

A blended exit price can be useful as a summary, but it cannot replace a ledger when the goal is to audit individual fills, fees, or realized P&L by exit. Preserve the underlying rows even if your journal also displays a weighted average.

  • Using a simple average of exit prices without weighting by quantity. In the example, 40 shares exit at one price and 30 at each of two others; each price did not apply to the same amount.
  • Counting the entry commission on every exit row without allocating it. That would deduct the same cost more than once.
  • Leaving out exit fees, or using different cost conventions across trades.
  • Treating a futures contract’s price movement as if it were a one-share move. Contract size and tick value affect the dollar result. Calculating Futures Contract Profit or Loss
  • Assuming your journal’s lot matching must equal the broker’s. When there are multiple opening lots, reporting methods such as FIFO, LIFO, average cost, or specific-lot matching can affect reported realized P&L. Reporting Guide
  • Calling a position fully realized when some quantity remains open. Keep the remaining position separate from the closed quantity.

Frequently asked questions#

Do I calculate each partial exit separately?

Calculate each close against the entry price using the quantity closed and the instrument’s value per price unit. Add the row results, then subtract applicable entry and exit costs. For futures, use the relevant contract multiplier or tick-value convention. Calculating Futures Contract Profit or Loss Realized P&L | IBKR Glossary | IBKR Campus

Can I use one average exit price?

You may use a weighted average exit price as a summary, but keep the individual exit rows to audit quantities, execution prices, and costs. An unweighted average can misstate the result when the exits have different quantities.

Should my R denominator include commissions?

Either convention can be used for a journal if it is stated and applied consistently. Divide the same net realized dollar result by the specified initial-risk amount, and label whether that denominator includes costs.

Why might my journal differ from my broker’s realized P&L?

Broker reporting can depend on lot-matching and reporting conventions. For multiple opening fills, compare the journal with the broker’s transaction records and use a clearly documented matching method. Reporting Guide Better Understanding Your Brokerage Account Statement | Investor.gov

The takeaway#

A sound scaled-exit record is a small reconciliation: each exit’s quantity, price, gross result, and costs; one summed net dollar result; and an R figure tied to a disclosed initial-risk convention. Retain the fill-level detail so the total can be checked against the broker record.

Sources#

Your journal writes posts like this about you.

Connect a broker and TerraTrade turns your own trades into the findings that matter.