Unrealized vs Realized Gains: When Do You Owe Taxes?
⚡ Key Takeaways
- Unrealized gains (paper gains) occur when an investment increases in value but you have not sold — they are not taxable until you sell
- Realized gains occur when you sell an investment for more than your cost basis — the gain becomes taxable in the year of the sale
- The distinction between unrealized and realized gives you powerful tax planning control over when you trigger taxable events
- Year-end tax harvesting strategies use the timing of realized gains and losses to minimize annual tax liability
- Unrealized losses can be strategically realized through tax-loss harvesting to offset realized gains elsewhere in your portfolio
What Are Unrealized vs. Realized Gains?
The difference between unrealized gains and realized gains is one of the most important tax concepts in investing. An unrealized gain exists only on paper — your stock is worth more than you paid, but you have not sold it, so no taxable event has occurred. A realized gain happens the moment you sell — the profit becomes real, reportable, and subject to capital gains tax.
Think of it this way: if you bought 100 shares of Microsoft at $200 and they are now trading at $400, you have a $20,000 unrealized gain. Your brokerage statement shows a profit, your portfolio looks great, but the IRS does not care. You owe zero taxes on that $20,000 until you sell. The moment you click "sell" and the trade executes, that gain becomes realized, and you owe capital gains taxes on $20,000 for that tax year.
This distinction gives investors a powerful lever: you control when you pay taxes by controlling when you sell.
How Unrealized Gains Work
Unrealized gains (also called paper gains or unrealized appreciation) represent the increase in value of investments you still hold. They appear in your portfolio's profit/loss column but have no immediate tax consequence.
Unrealized Gain = Current Market Value − Cost Basis
Example:
Purchase: 500 shares of NVDA at $120 = $60,000 (cost basis)
Current price: $800 per share
Current market value: 500 × $800 = $400,000
Unrealized gain: $400,000 − $60,000 = $340,000
Tax owed on this unrealized gain: $0
Unrealized gains fluctuate with market prices. Your $340,000 unrealized gain could shrink to $200,000 after a market correction or grow to $500,000 during a rally. None of these fluctuations trigger taxes. Only the sale creates a taxable event.
This principle extends to unrealized losses as well. If your stock drops below your purchase price, you have an unrealized loss. You cannot deduct that loss on your taxes until you sell the shares and realize it.
Key characteristics of unrealized gains:
- They exist only on paper and can evaporate in a downturn
- They do not appear on your tax return
- They grow tax-free as long as you hold the position (tax-deferred compounding)
- They do not count toward your income for tax bracket purposes
- At death, unrealized gains in taxable accounts receive a stepped-up basis, potentially eliminating the tax entirely for heirs
How Realized Gains Work
A realized gain occurs when you sell or dispose of an investment for more than your cost basis. The gain is "realized" — it becomes a concrete, measurable profit that the IRS requires you to report and pay taxes on.
Selling is the most common way to realize a gain, but other events also trigger realization:
- Selling shares on an exchange
- Exchanging one investment for another (including crypto-to-crypto swaps)
- Using cryptocurrency to purchase goods or services
- Receiving cash in a merger or acquisition
- Gifting appreciated stock to a non-charitable recipient (in some cases)
- Distributions from certain funds that include realized capital gains
Realized Gain = Sale Proceeds − Cost Basis − Selling Costs
Example:
Sale: 500 shares of NVDA at $800 = $400,000
Cost basis: $60,000
SEC fee: $2.50
Realized gain: $400,000 − $60,000 − $2.50 = $339,997.50
If held over 1 year: Taxed at long-term rate (0%, 15%, or 20%)
If held under 1 year: Taxed at short-term rate (ordinary income rate, up to 37%)
The holding period determines whether the realized gain is classified as short-term or long-term, which dramatically affects the tax rate applied.
The Tax Advantage of Unrealized Gains
Keeping gains unrealized provides a significant tax advantage through tax-deferred compounding. When you do not sell, you avoid triggering taxes, which means 100% of your gains remain invested and continue to compound.
Consider two investors who each start with $100,000 and earn 10% per year for 20 years:
Investor A buys and holds, never selling. After 20 years, the investment grows to $672,750 (unrealized). When they finally sell, they pay long-term capital gains tax of 15% on the $572,750 gain, netting approximately $586,838.
Investor B sells and repurchases every year, realizing gains annually. Assuming a 15% tax rate on each year's gain, the effective annual return drops to approximately 8.5% after taxes. After 20 years, the portfolio grows to only about $511,700.
The difference — roughly $75,000 — represents the value of tax-deferred compounding. By keeping gains unrealized for as long as possible, Investor A earned significantly more despite paying the same tax rate.
Pro Tip
This tax-deferred compounding effect is one of the strongest arguments for long-term, buy-and-hold investing. Every time you sell and rebuy, you lose a portion of your capital to taxes. Warren Buffett has famously held positions for decades partly because of this "free loan" from the government — you use money you would otherwise owe in taxes to generate additional returns.
Unrealized Losses: The Other Side
Just as unrealized gains are not taxable, unrealized losses are not deductible. You cannot claim a loss on your tax return for a stock that has declined unless you sell it.
However, unrealized losses represent a tax asset that you can strategically deploy through tax-loss harvesting. By selling a losing position to realize the loss, you can use that loss to offset realized gains elsewhere in your portfolio, reducing your total tax bill.
Realized losses are deductible against realized gains with no limit. If your total realized losses exceed your total realized gains, you can deduct up to $3,000 of net losses against ordinary income per year ($1,500 if married filing separately). Excess losses carry forward to future tax years indefinitely.
Year-End Tax Planning Strategies
The distinction between unrealized and realized gains is the foundation of effective year-end tax planning. Here are the most common strategies.
Gain Deferral
If you are considering selling a profitable position in December, waiting until January pushes the realized gain into the next tax year, deferring the tax payment by more than 12 months. This is especially valuable if you expect to be in a lower tax bracket next year (due to retirement, career changes, or other income shifts).
Loss Harvesting Before Year-End
Review your portfolio in November and December for positions with unrealized losses. By selling them before December 31, you realize losses that offset gains taken earlier in the year. Be mindful of the wash sale rule — you cannot repurchase the same or substantially identical security within 30 days before or after the sale.
Controlling Your Tax Bracket
If you have flexibility in when to realize gains, you can manage your total taxable income to stay below key thresholds. For 2024, single filers with taxable income below $47,025 pay 0% long-term capital gains tax. Married filers have a threshold of $94,050. Realizing gains strategically to stay below these levels can result in truly tax-free investing.
2024 Long-Term Capital Gains Tax Brackets (Single Filers):
0%: Taxable income up to $47,025
15%: Taxable income $47,026 to $518,900
20%: Taxable income above $518,900
Plus potential 3.8% Net Investment Income Tax (NIIT) for income above $200,000 (single) or $250,000 (married filing jointly)
Offsetting Short-Term with Long-Term
If you have significant short-term capital gains (taxed at your ordinary income rate, potentially 32-37%), you can harvest losses to offset them specifically. Since short-term gains are taxed at higher rates, each dollar of loss offsetting a short-term gain saves more in taxes than offsetting a long-term gain.
How Realized Gains Affect Your Tax Bracket
Realized capital gains add to your adjusted gross income (AGI), which can push you into a higher tax bracket and trigger additional taxes and phase-outs.
Large realized gains can:
- Push you into a higher long-term capital gains bracket (from 0% to 15%, or 15% to 20%)
- Trigger the 3.8% Net Investment Income Tax (NIIT) if your modified AGI exceeds $200,000 (single) or $250,000 (married)
- Increase your Medicare Part B and Part D premiums through IRMAA surcharges
- Reduce or eliminate eligibility for certain tax credits and deductions that phase out at higher income levels
- Affect financial aid eligibility for families with college-age children (reported on the FAFSA)
These cascading effects mean the true cost of realizing a large gain can be higher than just the capital gains tax rate. Planning large asset sales across multiple tax years can significantly reduce the total tax burden.
Special Cases and Exceptions
Several scenarios blur the line between unrealized and realized gains.
Mutual Fund Capital Gains Distributions
When a mutual fund sells holdings within the fund, it passes realized capital gains to shareholders as distributions. You owe taxes on these gains even though you did not sell anything. This is one of the disadvantages of actively managed mutual funds in taxable accounts compared to index funds or individual stocks, where you control when gains are realized.
Mark-to-Market for Day Traders
Traders who elect Section 475 mark-to-market accounting under trader tax status treat all positions as if they were sold at fair market value on the last day of the tax year. This converts all unrealized gains and losses into realized ones, eliminating the distinction. The benefit is that losses are fully deductible without the $3,000 limitation, but the cost is that you lose the ability to defer gains.
Retirement Accounts
In IRAs, Roth IRAs, and 401(k)s, the distinction between unrealized and realized gains is irrelevant while money remains in the account. You can buy and sell freely without triggering capital gains taxes. Taxes only apply when you take distributions (for traditional accounts) or never apply at all (for Roth accounts after meeting requirements).
Pro Tip
Place your highest-turnover strategies in tax-advantaged accounts (IRAs, 401(k)s) where frequent trading does not trigger taxes. Keep your long-term, low-turnover holdings in taxable accounts where you benefit from lower long-term capital gains rates and the ability to harvest losses. This approach, called asset location, complements your asset allocation strategy.
Building a Tax-Aware Investment Process
Integrating unrealized/realized gain management into your investment process does not require constant attention. Follow these principles:
Before buying: Consider the account type. Tax-inefficient investments (high-turnover funds, REITs, bonds) belong in tax-advantaged accounts. Tax-efficient investments (index funds, long-term stock holdings) work well in taxable accounts.
While holding: Monitor unrealized gains and losses. Positions with large unrealized gains become increasingly costly to sell due to taxes. Factor this "tax cost" into any decision to rebalance or switch investments.
Before selling: Evaluate the tax impact. Can you use specific lot identification to minimize the gain? Can you offset the gain with harvested losses? Would waiting a few days or weeks change the holding period from short-term to long-term?
At year-end: Conduct a comprehensive portfolio review. Harvest losses to offset gains. Ensure you have not accidentally triggered wash sales. Consider whether deferring any planned sales to January would benefit your tax situation.
Frequently Asked Questions
Do I owe taxes on stocks I have not sold?
No. Unrealized gains are not taxable. You only owe capital gains taxes when you sell (realize the gain). This applies to stocks, ETFs, bonds, real estate, and most other investments. The one exception is mutual fund distributions, where the fund may pass through realized gains to you even if you did not sell your shares.
Can unrealized losses offset realized gains?
No. Only realized losses can offset realized gains on your tax return. You must sell the losing position to turn an unrealized loss into a deductible realized loss. However, be aware of the wash sale rule, which prevents you from deducting the loss if you repurchase the same security within 30 days.
What happens to unrealized gains when I die?
Under current U.S. tax law, unrealized gains in taxable accounts receive a stepped-up basis at death. Your heirs inherit the investments at their fair market value on the date of death, effectively eliminating the unrealized gain and the associated tax liability. This is one of the most significant tax planning considerations for estate planning.
Are unrealized gains included in my income for tax purposes?
No. Unrealized gains do not appear on your tax return and do not count toward your adjusted gross income. They do not affect your tax bracket, your eligibility for deductions or credits, or your Medicare premiums. Only realized gains from actual sales are included in your taxable income.
Should I avoid selling stocks just to defer taxes?
Tax deferral is valuable, but it should not override sound investment decisions. If a stock's fundamentals have deteriorated or your portfolio allocation is dangerously concentrated, selling despite the tax consequences may be the right choice. Never hold a declining investment purely to avoid taxes on a gain that is shrinking or turning into a loss.
Disclaimer
This is educational content, not financial advice. Trading involves risk, and you should consult a qualified financial advisor before making any investment decisions. Past performance does not guarantee future results.
Frequently Asked Questions
What is the best way to get started with trading taxes?
Start by reading this guide thoroughly, then practice with a paper trading account before risking real capital. Focus on understanding the concepts rather than memorizing rules.
How long does it take to learn unrealized vs realized gains?
Most traders can grasp the basics within a few weeks of study and practice. However, developing consistency and proficiency typically takes several months of active application.