Whether an investment gain is realized or unrealized determines whether you owe taxes on it right now. An unrealized gain is a paper profit that exists on paper but hasn't been locked in — if a stock you own has doubled in value but you haven't sold it, that's an unrealized gain. Once you sell the investment, the gain becomes realized, and that's when you owe capital gains tax. This means you have significant control over when you pay tax on investment gains simply by deciding when to sell. Conversely, unrealized losses also can't be claimed — you can only deduct capital losses once you actually sell the investment at a loss. Tax-loss harvesting is a strategy of intentionally selling positions with losses to realize those losses for tax purposes, often to offset realized gains elsewhere in your portfolio.