DEV Community

ELI5: What’s the difference between *realized* vs *unrealized* P/L?

I’m building an open-source portfolio dashboard and keep tripping over how to explain P/L in a way that actually clicks for newcomers.

ELI5 ask:

How would you explain the difference between realized profit/loss and unrealized profit/loss to a 10-year-old?

Constraints (to keep it simple):

  • Use one short analogy (max 2–3 sentences).
  • Bonus if you can show a tiny numeric example (e.g., “bought at 10, now 12…”).

A couple of things that confuse people we talk to:

  • “If I didn’t sell, why does the number go up/down?”
  • “Fees & FX: do they belong in realized, unrealized, or both?”

Drop your best analogy below — I’ll pin the clearest one and credit you in our in-app help text 🙌

Top comments (2)

Collapse
 
abraham_arellanotavara_7 profile image
Abraham Arellano Tavara

Great question!

Here's my take: Unrealized P/L is like having a rare trading card that's worth $100 today (you paid $10) — you're up $90 on paper, but you can't actually spend that money until you sell it. Realized P/L is when you actually sell: those gains hit your wallet and become real money.
The confusion comes from people thinking "why does my balance change if I haven't sold?" — unrealized is just showing your current score based on today's prices, while realized is your final score for closed positions.

For your dashboard, here's a quick example: bought 10 shares @ $10 ($100 total), now worth $12 each = +$20 unrealized. Sell 5 shares → +$10 realized, +$10 unrealized (on the remaining 5).

As for fees/FX: trading fees should reduce your realized P/L when you execute (they're part of your actual cost/proceeds), while FX rates will naturally affect both — current rates impact unrealized value, and the actual conversion rate at sale determines realized P/L.

I would say side-by-side views work great — unrealized keeps users engaged, realized keeps expectations grounded.

Would love to see what you build! 🚀

Collapse
 
pocketportfolio profile image
22s Pocket Portfolio Pocket Portfolio

👏 Great answer, Abraham — love the scoreboard vs wallet framing.

To extend it with the exact maths we use in Pocket Portfolio:

  • Buy 10 @ $10 with a $1 fee → cost basis per share = $10.10.
  • Price moves to $12unrealised = (12 − 10.10) × 10 = $19.00 (before any sale).
  • Sell 5 @ $12 with a $1 fee:

    • Proceeds = $60 − $1 = $59
    • Basis on 5 = 5 × $10.10 = $50.50
    • Realised P/L = $59 − $50.50 = $8.50
    • Remaining 5 have unrealised = (12 − 10.10) × 5 = $9.50

Fees & FX (how PP treats it):

  • Fees are allocated into basis on buy, and reduce proceeds on sell ⇒ they hit realised when you execute.
  • If portfolio currency ≠ trade currency: unrealised uses today’s FX to mark; realised uses the execution FX from the fill (so your history doesn’t drift when FX moves later).

And to keep trust high, every number in PP has an Explain drawer (fills → fees/taxes → FX lots → splits/DRIPs → P/L math). Plus our upcoming Price Pipeline Health card shows when quotes are fresh or on fallback — no silent 0.00s.

If helpful, I can share a tiny CSV + screenshot so folks can see realised vs unrealised side-by-side using the same example.