Taxes · Capital gains and losses
Realized vs. unrealized gains: when a profit becomes taxable
What separates a paper gain from a realized one, why usually only sales are taxed, the exceptions, and a real SPY purchase traced from 2023 to 2026.
On this page
An investment that has risen in value has a gain. Until it is sold, that gain is unrealized: a "paper" gain that can grow, shrink or vanish with the next day's prices. When the investment is sold, or otherwise disposed of, the gain becomes realized: locked in as a dollar amount, and, in a taxable account, usually reportable on that year's return. The same goes for losses.
The distinction drives most of US investment tax. The tax code taxes realized gains and, with a few exceptions, leaves unrealized ones alone, which gives investors control over when tax is due. This lesson defines both, traces a real purchase of SPY from 2023 to 2026 through a partial sale, sets out the exceptions that tax gains without a sale, and explains where each figure shows up in Finabase.
Definitions
Cost basis is what was paid for an investment, including commissions, adjusted for events such as splits, return of capital or a wash sale; see Adjusted cost basis: splits, DRIPs, return of capital and spin-offs and Cost Basis.
The tax code's word for realization is "recognition": section 1001 says gain or loss on the sale or other disposition of property is the difference between the amount realized and the adjusted basis. Selling for cash is the usual disposition; exchanging one security for another, such as a share swap in a taxable merger, can be one too.
Once realized, a gain is short-term if the shares were held one year or less and long-term if held longer, and the two are taxed differently, as Capital gains tax on stocks: 2026 rates, holding periods and basis and Holding period rules: counting days, tacking and special cases explain.
Worked example: one purchase of SPY, one partial sale
An investor buys 40 shares of SPY, the S&P 500 ETF, at the December 2023 month-end close of $475.31: a cost basis of $19,012.
Two things stand out. The unrealized gain moved from $5,165 to $7,010 in ten months without any tax event; it could as easily shrink. And the investor chose the year in which $3,099 became taxable by choosing when to sell. That control is the main tax advantage of holding over trading.
The dividends SPY paid on the shares along the way are a separate stream: they were taxable in each year they were paid, as qualified dividends, whether taken in cash or reinvested. Reinvested dividends buy new shares with their own basis and their own holding period.
Why realization matters
- Timing. Deferring a sale defers the tax, and the untaxed gain keeps compounding. Over decades, the difference between paying tax on gains each year and paying once at the end is large.
- Rate. Holding past one year turns a short-term gain, taxed at ordinary rates up to 37%, into a long-term gain taxed at 0%, 15% or 20% for 2026.
- Offsetting. Realized losses offset realized gains, plus up to $3,000 of ordinary income a year; harvesting a loss means realizing it on purpose (Tax-loss harvesting in practice: what a loss is worth and when). Unrealized losses offset nothing.
- Death. Assets held until death generally get a basis equal to their value at death, so the unrealized gain is never taxed as income (Step-up in basis: inherited stock, spouses and the exceptions).
- Gifts. Giving appreciated shares to charity avoids realizing the gain at all.
When gains are taxed without a sale
Realization is the general rule, not a universal one:
- Section 1256 contracts (regulated futures, broad-based index options such as SPX, many currency contracts) are treated as sold at fair value on the last business day of the year. Open positions' gains and losses are taxed each year, 60% long-term and 40% short-term; see Section 1256 contracts: futures, index options and the 60/40 rule.
- Fund distributions. A mutual fund or ETF that sells holdings at a gain must pass the realized gain to shareholders, who owe tax even if they sold nothing and reinvested the distribution (Fund distributions and capital gains: why funds pay out, what it costs).
- Constructive sales. Locking in a gain without selling, for example by shorting the same stock "against the box", is treated as a sale under section 1259.
- Mark-to-market elections. Traders who elect section 475 treat all their positions as sold at year-end.
- Expatriation. Certain people giving up US citizenship are treated as selling everything the day before.
Proposals to tax unrealized gains of very wealthy households each year have been introduced in Congress; none applied for 2026.
Side by side
| Feature | Unrealized gain | Realized gain |
|---|---|---|
| When it exists | While the position is held | After a sale or other disposition |
| Taxed in a taxable account? | Generally no | Yes, in the year of the sale |
| Can it change? | With every price move | Fixed once realized |
| Offsets other gains? | No (unrealized losses neither) | Yes; net losses up to $3,000 a year of ordinary income |
| Reported on | Brokerage statements only | Form 1099-B, Form 8949, Schedule D |
| In SPY example | $7,010 on 25 shares, Oct 2026 | $3,099 on 15 shares, Dec 2025 |
Which to use when
Both numbers are true; they answer different questions.
- "How much am I up?" The total of realized and unrealized gains, plus income received, measures investment performance.
- "How much tax do I owe this year?" Only realized gains and losses (plus dividends and interest) for the year.
- "What would it cost to rebalance or switch funds?" The unrealized gain on what would be sold, times the rate it would face. Large unrealized gains make selling expensive, which is one reason to rebalance with new money or inside tax-deferred accounts.
- "Should I harvest a loss?" Look for unrealized losses, and watch the wash-sale rule (Wash sale rule: the 61-day window, basis adjustment and traps).
- Inside an IRA or 401(k) neither number matters for tax until money is withdrawn.
How Finabase does it
Finabase's Portfolio shows both figures for every position: market value, cost, average cost, unrealized gain on the shares held and realized gain on those sold. Realized gains are computed by matching each sale against the earliest purchases first (FIFO), adjusted for splits. The portfolio does not let you choose specific lots, does not split gains into short-term and long-term, and makes no wash-sale adjustment, so its realized figure is a guide; the broker's Form 1099-B is the number for the return. SPY's chart shows the prices used in the example, which come from a frozen snapshot of Finabase chart data.
Frequently asked questions
Do you pay taxes on unrealized gains?
Not in general, for stocks, ETFs and bonds held in a taxable account. Exceptions include section 1256 contracts marked to market at year-end, fund capital gain distributions and constructive sales.
When does an unrealized gain become realized?
When the investment is sold or otherwise disposed of, for example exchanged in a taxable merger. The trade date of the sale fixes the tax year.
Can unrealized losses reduce my taxes?
No. A loss must be realized, by selling, to offset gains or up to $3,000 of ordinary income, and the wash-sale rule disallows it if substantially identical shares are bought within 30 days before or after.
Are reinvested dividends unrealized gains?
No. They are income in the year paid, taxed even if reinvested. The shares they buy then have their own basis, and any later rise in those shares is an unrealized gain.
Summary
An unrealized gain is the rise in value of something still held; a realized gain is fixed by a sale and measured against cost basis. US federal tax generally reaches only realized gains, which lets investors choose when to pay. In the SPY example, 15 of 40 shares sold at the end of 2025 realized $3,099 of long-term gain, while the 25 kept carried an unrealized $7,010 by October 2026 that owed nothing. Futures marked to market, fund distributions and constructive sales are the main exceptions, and dividends are taxed when paid whatever happens to the shares.
Check your understanding
4 questions on this lesson. Each answer comes with the reason, and nothing is scored.
An investor holds shares bought for $8,000 now worth $11,000, and sold other shares this year for a $1,500 gain. How much capital gain is reportable for the year?
- $4,500
- $1,500, the realized gain
- $3,000, the unrealized gain
Show the answer
B. $1,500, the realized gain Only realized gains are reported. The $3,000 paper gain on shares still held owes nothing until they are sold.
Which of these is taxed even though the investor sold nothing?
- A rise in an S&P 500 ETF held all year
- An open SPX index option position at year-end, which section 1256 marks to market
- A fall in a stock held all year
Show the answer
B. An open SPX index option position at year-end, which section 1256 marks to market Section 1256 contracts are treated as sold at fair value on the last business day of the year. Ordinary stocks and ETFs are taxed only on sale.
An investor reinvests every SPY dividend. Are those dividends unrealized gains?
- Yes, until the shares are sold
- No; they are income in the year paid, and the shares they buy have their own basis
- Only if held more than a year
Show the answer
B. No; they are income in the year paid, and the shares they buy have their own basis Dividends are taxable when paid whether taken in cash or reinvested. Growth in the reinvested shares is then an unrealized gain.
Why can a large unrealized gain make rebalancing costly in a taxable account?
- Because brokers charge more to sell appreciated shares
- Because selling realizes the gain, which then becomes taxable that year
- Because unrealized gains are taxed when the portfolio is rebalanced, even without a sale
Show the answer
B. Because selling realizes the gain, which then becomes taxable that year Selling turns the paper gain into a realized one. Rebalancing with new money or inside a tax-deferred account avoids it.
Sources and further reading
- Internal Revenue Service — Publication 550 (2025), Investment Income and Expenses (sales and trades, basis, holding period)
- Internal Revenue Service — Topic no. 409, Capital gains and losses
- U.S. Code — 26 U.S.C. 1001: determination of amount of and recognition of gain or loss
- U.S. Code — 26 U.S.C. 1256: section 1256 contracts marked to market
- U.S. Code — 26 U.S.C. 1259: constructive sales treatment for appreciated financial positions
- Internal Revenue Service — Revenue Procedure 2025-32: 2026 long-term capital gain rate thresholds
- Finabase chart data — SPY month-end closes, January 2023 to October 2026 (frozen snapshot)
