Concepts

What Is an Unrealized Gain or Loss?

An unrealized gain is profit on paper. A realized gain is profit you locked in by selling. Here is the difference, why it matters, and how each is taxed.

4 min readUpdated Sep 16, 2026

An unrealized gain is profit that exists only on paper: your holding is worth more than you paid, but you haven't sold. A realized gain is profit you locked in by selling. Same money on screen — completely different in what it means.

That green or red number in your brokerage app is almost always the unrealized one.

The difference in one line

Unrealized is what you would make if you sold right now. Realized is what you did make when you sold. Everything else follows from that.

Both are measured from your cost basis — what you originally paid. No basis, no gain figure.

Worked exampleFrom unrealized to realized

You own 20 shares of MSFT with a cost basis of $400 each ($8,000). The price is now $450.

  • Market value: 20 × $450 = $9,000
  • Unrealized gain: $9,000 − $8,000 = $1,000 — on paper, nothing banked.

You sell all 20 at $450. That same $1,000 is now realized.

Your net worth did not change at the instant of the sale. What changed is that the profit stopped being reversible.

What an unrealized loss is

The mirror image, and worth naming because it behaves the same way. If those MSFT shares fell to $360 instead, you would be sitting on an unrealized loss of 20 × ($400 − $360) = $800. Nothing has happened yet. Hold, and the price may recover; sell, and the loss is realized.

Note

Unrealized figures move every time the market does. Yours changed while you were reading this paragraph — which is precisely why a number you pasted into a spreadsheet last month is not your unrealized gain.

Why the distinction matters

Three practical consequences.

Tax generally applies to realized gains, not unrealized ones. You can sit on a large unrealized gain for years without a taxable event, and selling is what creates one. How much and at what rate depends on the account type, how long you held, and your own situation.

Your real return blends both. Banked profits from what you have sold, plus paper profits on what you still hold. A tracker showing only market value hides the realized half entirely, so your return looks like whatever you happen to own today.

Decisions read differently. "Locking in a gain" sounds prudent and is also a tax event. Holding is neither prudent nor imprudent by itself — it just leaves the gain reversible.

Warning

Rules on how gains are taxed vary by account type, holding period, and where you live, and they change. This article explains what the terms mean, not what you should do — take your own position to a tax professional.

How to calculate an unrealized gain

Three numbers, one subtraction:

StepFigure
1Market value = shares × current price
2Cost basis = shares × price you paid
3Unrealized gain = market value − cost basis

Step 2 is where it goes wrong for most people. If you bought the same holding more than once, "the price you paid" is a blend of every purchase, not the most recent one. Our cost basis calculator works out that blend, or read how the averaging methods differ. An unrealized gain is a dollar figure over however long you have held; the annualized return calculator expresses it as a rate per year. Once you sell, the stock profit calculator gives the realized figure — commissions netted out, and correct even if you only sold part.

StoxDeck keeps basis and market value side by side, so the unrealized figure is always current. Build your first deck →

Seeing both at once

Most tools show one number and call it your return. A portfolio is only honest when it shows unrealized gains on what you still hold and realized gains from what you have already sold — measured from real cost basis rather than a price you typed in once.

That is the view StoxDeck gives you on every load, and it is a large part of why people stop maintaining a spreadsheet.