What is the difference between realized and unrealized gains?

An unrealized gain is the rise in value of an investment you still own, measured against its cost basis. It becomes a realized gain, usually taxable that year, when you sell, swap or otherwise dispose of the asset, and the holding period then sets the rate.

By Sonic Wallet Editorial Team· Updated · 7 min read

Key takeaways

  • An unrealized gain is the amount by which an investment you still hold is worth more than its cost basis, and US tax generally ignores it. The gain becomes realized, and normally taxable that year, when you sell, swap or otherwise dispose of the asset; holding it more than one year at that point qualifies the gain for the lower long-term rates.
  • Selling 150 of 300 fund shares at $55 realizes only the gain on the shares sold: $2,250 if the oldest lot goes first, or $450 if the newer, costlier lot is named, with the rest of the $2,700 total left unrealized.
  • Shares bought on February 3, 2026 become long-term only with a sale on February 4, 2027 or later, because the holding period starts the day after the trade date and must exceed one year.
  • A few rules tax gains without a sale: section 1256 contracts such as regulated futures are marked to market at year-end, shorting a stock you own at a profit can be a constructive sale, and covered expatriates are treated as selling everything the day before expatriation.
  • Selling below basis turns an unrealized loss into a realized one that offsets gains and up to $3,000 of ordinary income a year, but buying substantially identical shares within 30 days before or after the sale triggers the wash sale rule.

An unrealized gain is the amount by which an investment you still own is worth more than its cost basis, and an unrealized loss is the shortfall when it is worth less. Both exist only on paper and can grow, shrink or reverse with every price move. The gain or loss becomes realized when you dispose of the asset, usually by selling it, and under US federal tax rules that is ordinarily the moment it counts: a brokerage balance that rose 20% this year owes no tax on that rise until something is sold. This entry reflects the rules as of November 2, 2026; tax law changes, so ask a tax professional how it applies to you. The stocks hub covers investing in shares more broadly.

How are realized and unrealized gains calculated?

Both measure value against the same adjusted cost basis: market value for shares still held, and net sale proceeds for shares already sold.

Unrealized gain or loss = market value of shares held − their adjusted cost basis
Realized gain or loss = net proceeds of shares sold − their adjusted cost basis

Basis starts as the price paid plus buying costs and moves with splits, return-of-capital payments and reinvested dividends, as the cost basis entry shows. Every dollar a position has gained since purchase sits in exactly one of the two columns. Selling moves gain from the unrealized column to the realized one without changing the total, so a partial sale leaves part of the gain behind on the shares you keep. A position's total return counts both, plus any income. Market value is the share count times the latest price, the figure on stock price pages for listed shares, while a realized result is fixed on the trade date and ignores later price moves.

When does an unrealized gain become taxable?

An unrealized gain becomes taxable when it is realized, normally by a sale or an exchange, and it belongs to the tax year of the trade date.

EventRealizes a gain or loss?Note
Selling shares, fund units or coinsYesCounted on the trade date, not the settlement date
Swapping one crypto asset for anotherYesPublication 550 lists digital asset exchanges as taxable
A fund selling holdings at a profitYes, for the fundNet gains usually reach you as a taxable distribution
A security becoming completely worthlessYesTreated as sold on the last day of the tax year
A price rise, a stock split or a move between your own accountsNoBasis and holding period carry on
Giving shares awayNoThe recipient generally takes over your basis
Holding until deathNoThe heirs' basis resets to the value at death

A few rules tax gains with no sale at all. Section 1256 contracts, which include regulated futures and nonequity options, are treated as sold at market value on the last business day of the year, with 60% of the result counted as long-term and 40% as short-term whatever the holding period. Shorting a stock you already own at a profit, known as shorting against the box, can be a constructive sale that realizes the gain on the spot. Under section 877A, a covered expatriate is treated as selling all property the day before expatriation, with the resulting gain reduced by an exclusion of $910,000 for 2026, under Revenue Procedure 2025-32.

Whether the Constitution requires realization is unsettled. In Moore v. United States, decided June 20, 2024, the Supreme Court upheld a one-time tax on American shareholders' portions of a foreign company's undistributed income, and wrote that it did not decide whether an income tax requires realization.

What makes a realized gain short-term or long-term?

The holding period on the day of sale decides it: more than one year is long-term, and one year or less is short-term.

Count from the day after the purchase's trade date through the sale's trade date, ignoring settlement. Shares bought on February 3, 2026 become long-term with a sale on February 4, 2027 or later, while a sale on February 3, 2027 is still short-term. For 2026, long-term gains are taxed at 0% up to $49,450 of taxable income (single) or $98,900 (married filing jointly); 15% above that; 20% above $545,500 (single) or $613,700 (joint), and short-term gains join wages at the ordinary rates of 10%, 12%, 22%, 24%, 32%, 35% and 37%, with the top rate applying above $640,600 of taxable income for single filers and $768,700 for married couples filing jointly. An unrealized gain has no rate yet. Brokerage screens often tag open lots as short- or long-term by today's date, and the tag can change before you sell.

How does selling part of a position split the gain?

A partial sale realizes the gain only on the shares sold, so which lots count as sold decides how much of the total becomes taxable now.

Worked example: Selling 150 of 300 fund shares on November 2, 2026

You hold 300 shares of an index fund priced at $55, in two lots.

LotBoughtSharesBasisValue at $55Unrealized
AMay 12, 2023200$8,000$11,000+$3,000, long-term
BFebruary 3, 2026100$5,800$5,500−$300, short-term
Total300$13,800$16,500+$2,700

You sell 150 shares for $8,250, with no commission.

Shares treated as soldRealized nowStill unrealized
150 from lot A, oldest first$8,250 − $6,000 = $2,250 long-term gain$450: +$750 on 50 lot A shares, −$300 on lot B
All of lot B plus 50 from lot AA $300 short-term loss and a $750 long-term gain, netting to $450$2,250 on 150 lot A shares
  • At a 15% long-term rate, the first choice costs $2,250 × 0.15 = $337.50 and the second $450 × 0.15 = $67.50
  • The $270 difference is deferred, not erased: the 150 lot A shares kept in the second case still carry $2,250 of gain
  • Either way, realized plus unrealized gain still adds up to $2,700

Unless you name lots when you sell, shares are generally treated as sold oldest first, although the 1099-B instructions let a broker use average cost as its default for fund shares. Capital gains tax on stocks compares the lot methods and works through the brackets.

How can unrealized losses be harvested?

Selling an investment below its basis realizes the loss, which first offsets realized gains and then up to $3,000 of ordinary income a year.

In the example, lot B could be sold on its own to bank a $300 short-term loss against other gains. The limit on the income offset is $3,000 a year against ordinary income ($1,500 if married filing separately), and unused losses carry forward to later years. The catch is the wash sale rule: buying substantially identical shares within 30 days before or after the sale (a 61-day window) disallows the loss for now and adds it to the new shares' basis. The tax loss harvesting guide covers the strategy and the wash sale rule guide the timing. For crypto, Publication 550 frames the rule around stock or securities, and H.R. 9172 and H.R. 10357 would apply the wash-sale rule to digital assets; neither had passed the House as of November 1, 2026; crypto tax loss harvesting has the detail.

Where do you see realized and unrealized gains?

Account screens show unrealized gains on open positions and realized gains in a year-to-date report, while tax forms show only realized results.

  • Brokerage and exchange apps list unrealized gain or loss by position or lot, often labelled unrealized P&L, and keep a separate report of gains and losses realized during the year.
  • Tax forms. Form 1099-B and Form 1099-DA report sales of securities and digital assets, so they carry realized results only; Form 1099-DA explained covers the crypto version. Box 2a of Form 1099-DIV reports gains a fund realized and paid out.
  • Bank balance sheets. FDIC-insured banks held $326.7 billion of unrealized losses on securities at the end of June 2026, 5.5% of the securities' amortized cost, according to the FDIC's Quarterly Banking Profile for the second quarter. Of that, $216.9 billion sat in held-to-maturity securities and $109.8 billion in available-for-sale securities.
  • A paper loss turning real. On March 8, 2023, Silicon Valley Bank announced it had sold $21 billion of available-for-sale securities and was booking a $1.8 billion after-tax loss. More than $40 billion of deposits left the next day, and the bank failed on March 10, as the Federal Reserve's April 2023 review recounts.

How are realized gains different from recognized gains and distributions?

A realized gain is the result of a disposal; a recognized gain is the part the tax code counts as income that year, and usually the two match.

TermMeaningTaxed this year?
Unrealized gainValue above basis on an asset you still ownNo, apart from the exceptions above
Realized gainAmount realized above basis after a sale or exchangeUsually
Recognized gainRealized gain that must be included in incomeYes
Realized but not recognizedGain on an exchange the code defers, such as a like-kind swap of investment real estateNo, deferred to a later sale
Disallowed lossRealized loss blocked by the wash sale ruleNo, added to the replacement shares' basis
Capital gains distributionGains a fund realized and paid outYes, as long-term gain

Publication 544 says a gain or loss realized from a sale or exchange is usually recognized, then lists the exchanges where it is not. The like-kind rule now covers only real property held for business or investment, so it no longer shelters a trade of one stock or coin for another.

What mistakes do people make with realized and unrealized gains?

The common errors are expecting tax on paper gains, or missing the events that quietly realize them.

  • Assuming reinvesting avoids tax. Selling one fund and buying another the same day still realizes the gain on the first.
  • Treating a crypto swap as tax-free. Trading one coin for another disposes of the first, at its dollar value on the day.
  • Overlooking fund distributions. A fund can realize and pay out gains in a year when you sold nothing and its price fell.
  • Selling a day early. A sale on the one-year anniversary of the purchase is still short-term.
  • Waiting for a collapsed stock to hit zero. Until it is completely worthless, a deduction requires a sale.
  • Rebuying too soon after harvesting. A purchase inside the wash sale window defers the very loss you meant to use.

Frequently asked questions

Do you pay tax on unrealized gains?+

Generally no. Stocks, funds and crypto held in a taxable account are taxed when a gain is realized. The exceptions include section 1256 contracts marked to market at year-end, constructive sales and the expatriation tax on covered expatriates.

Is swapping one cryptocurrency for another a realized gain?+

Yes. IRS Publication 550 lists an exchange of one digital asset for another among taxable transactions, so a swap realizes the gain or loss on the coin you gave up, measured by the dollar value of what you receive.

What happens to unrealized gains when the owner dies?+

Under current law they are never taxed as income. Heirs generally take the market value on the date of death as their cost basis, so only growth after the death is taxed when they sell, although a large estate may owe estate tax.

Can you deduct an unrealized loss on a stock that has collapsed?+

Not while it keeps any value. A security that becomes completely worthless during the year is treated as sold on the last day of that tax year, which realizes the loss; otherwise you must sell to claim it.

Why do fund shareholders owe tax on gains they did not realize themselves?+

A fund that sells holdings at a profit usually pays out the net gains, and each shareholder reports a share as a capital gain distribution, taxed as long-term however briefly the fund shares were held.

Sources

  1. Publication 550 (2025), Investment Income and Expenses, IRS
  2. Publication 544, Sales and Other Dispositions of Assets, IRS
  3. Expatriation tax, IRS
  4. Revenue Procedure 2025-32 (2026 inflation adjustments), section 4.38, IRS
  5. Moore v. United States, No. 22-800 (June 20, 2024), Supreme Court of the United States
  6. Quarterly Banking Profile, Second Quarter 2026, FDIC
  7. Review of the Federal Reserve's Supervision and Regulation of Silicon Valley Bank (April 2023), Federal Reserve Board
  8. Instructions for Form 1099-B (2026), IRS
  9. IRS releases tax inflation adjustments for tax year 2026, including amendments from the One, Big, Beautiful Bill (IR-2025-103), IRS
  10. Topic no. 409, Capital gains and losses, IRS
  11. H.R.10357: Digital Asset Tax Certainty Act, all actions, Congress.gov

Related guides