Realised vs unrealised profit: separate sold shares from open holdings
Follow one partial-sale example through realised P&L, remaining unrealised P&L, fees, and a cash-and-value reconciliation.
By HoldingsTracker Pro · Organization author
Product documentation and worked examples for the HoldingsTracker Pro browser extension. No investment recommendations.
Published · Updated
Realised profit or loss belongs to the portion of an investment that has been closed. Unrealised profit or loss belongs to a position still held and valued at a selected price. You can have a realised gain and an unrealised loss in the same security at the same time.
Neither number alone describes a complete account return. Cash balances, charges, dividends, deposits, withdrawals, and the reporting period still matter. The delivery-equity examples here exclude leverage and use fictional transactions, with assumptions stated so the arithmetic can be checked.
Start with a partial sale
Buy 100 fictional Harbor Manufacturing shares at ₹200 each. Total purchase value is ₹20,000. Later, sell 40 shares at ₹230, leaving 60 shares. Assume the remaining shares are currently marked at ₹190 and ignore charges initially.
| Item | Calculation | Result |
|---|---|---|
| Cost of sold shares | 40 × ₹200 | ₹8,000 |
| Sale proceeds | 40 × ₹230 | ₹9,200 |
| Gross realised P&L | ₹9,200 − ₹8,000 | ₹1,200 |
| Cost of remaining shares | 60 × ₹200 | ₹12,000 |
| Current remaining value | 60 × ₹190 | ₹11,400 |
| Gross unrealised P&L | ₹11,400 − ₹12,000 | −₹600 |
The combined economic gain on this simplified set of transactions is ₹1,200 − ₹600 = ₹600. Verify independently: sale proceeds of ₹9,200 plus remaining value of ₹11,400 equal ₹20,600, which is ₹600 above the original ₹20,000 outlay.
The current holdings screen may only display the remaining ₹600 loss. That does not erase the earlier realised gain. Equally, the ₹1,200 realised gain does not guarantee the remaining position will recover.
A sale does not create extra profit by changing labels
Immediately before the sale, suppose all 100 shares were marked at ₹230. The unrealised gain would be ₹3,000. Selling 40 shares at exactly that price would transfer ₹1,200 into realised gain and leave ₹1,800 unrealised, before costs.
The combined gain would still be ₹3,000, not ₹4,200. Counting the original unrealised total plus the new realised result double-counts the sold shares. Only the later move from ₹230 to ₹190 on the remaining 60 shares reduces that combined gain by ₹2,400 to ₹600.
Add charges without mixing conventions
Now assume ₹30 in buy-side costs for the original purchase and ₹40 in costs on the sale. For this educational reconciliation only, allocate purchase costs by quantity: ₹12 to the 40 sold shares and ₹18 to the remaining 60.
Net realised P&L becomes ₹9,200 − ₹8,000 − ₹12 − ₹40 = ₹1,148. The remaining unrealised result on a purchase-cost-inclusive basis is ₹11,400 − ₹12,018 = −₹618. Combined, that is ₹530, before future exit costs and income tax.
A second check uses cash and value: ₹9,160 net sale receipts + ₹11,400 marked holdings − ₹20,030 initial outlay = ₹530. This allocation convention is not a claim about the exact presentation in a broker or a tax report. See P&L after charges for definitions and double-counting checks.
Read the specific report, not just the label
With several purchase lots, identifying sold cost requires a matching method. Zerodha describes FIFO for remaining holdings averages. The single-lot example avoids that extra complexity.
Also distinguish delivery holdings from funds-page and derivatives calculations. Zerodha's funds-page explanation concerns trading positions and margin availability; its displayed unrealised figure is not interchangeable with a delivery portfolio's marked gain. Choose the correct segment and period in the P&L report.
What a current tracker cannot infer
Today's open holdings cannot reveal every previously closed trade. HoldingsTracker Pro's current insights do not provide portfolio history, a realised-trades ledger, or tax reporting. Use the worked examples above to distinguish a hypothetical sale from an unrealised position; neither reconstructs completed trades. Use the broker's records for completed transactions, help for product questions, and the snapshot guide for the limits of point-in-time data. HoldingsTracker Pro is independent of Zerodha. This is educational arithmetic, not investment recommendations, tax advice, or a calculation of your taxable gains.
Primary sources
Sources support the broker-specific context. Worked examples use fictional inputs and independent arithmetic, not investment recommendations.