How to Use Realized Losses to Offset Capital Gains
No investor likes to see red on their portfolio dashboard, but losses are an inevitable part of the market cycle. Fortunately, the U.S. tax code turns realized losses into a strategic tool: you can use them to offset capital gains, dramatically reducing your taxable investment income. By deliberately selling underperforming assets at a loss, a tactic known as tax-loss harvesting, you can neutralize taxable gains from your winners and even shelter up to $3,000 of ordinary income each year.
However, using losses effectively requires more than just selling losers at year-end. You must understand the difference between short-term and long-term treatment, the wash sale rule, and the strict netting order the IRS imposes. When executed correctly, a realized loss becomes an immediate tax asset that can lower your current bill or be carried forward to offset capital gains in future years.
In this comprehensive guide, you will learn exactly how realized losses offset capital gains, including a step-by-step breakdown of the netting calculation, the $3,000 ordinary income deduction, and the capital loss carryover mechanism. Whether you are a DIY trader managing a brokerage account or working with a financial advisor, these principles will help you keep more of your returns.
Quick Answer

You can use realized losses to offset capital gains dollar for dollar, first matching short-term gains with short-term losses and long-term gains with long-term losses. Any remaining net loss can offset the other type. If total capital losses exceed total capital gains, deduct up to $3,000 from ordinary income, carrying forward any unused losses.
Understanding Realized Losses and Capital Gains

What Is a Realized Loss?
A realized loss occurs when you sell an investment for less than your cost basis. The loss is “realized” because you have actually closed the position, converting a paper decline into a definitive loss for tax purposes. Until you sell, any drop in value is merely an unrealized loss and cannot be used to offset capital gains. Common sources of realized losses include stocks, bonds, mutual funds, ETFs, and even certain real estate transactions.
What Is a Capital Gain?
A capital gain is the profit from selling a capital asset above its cost basis. The IRS categorizes gains as either short-term (held one year or less) or long-term (held more than one year). Short-term capital gains are taxed at ordinary income tax rates, which can range from 10% to 37%. Long-term capital gains benefit from preferential rates of 0%, 15%, or 20%, depending on your taxable income. Because of this rate difference, the way you offset capital gains with losses can have a significant impact on your after-tax result.
How to Offset Capital Gains with Realized Losses

The IRS mandates a specific netting procedure when you apply realized losses to offset capital gains. This process ensures that short-term losses first reduce short-term gains—which are taxed at higher rates—and long-term losses first reduce long-term gains. After applying losses within the same holding-period category, any excess can be used to offset capital gains of the other type. This maximizes the tax benefit by preserving the favorable long-term rate whenever possible.
The Step-by-Step Netting Process
1. Net short-term gains and losses: Subtract your total short-term losses from your total short-term gains. If the result is a net short-term gain, it will be taxed at ordinary rates. If it is a net short-term loss, proceed to step 2.
2. Net long-term gains and losses: Subtract your total long-term losses from your total long-term gains. A net long-term gain will be taxed at the preferential capital gains rates. A net long-term loss moves to step 3.
3. Combine the results: If one category shows a net loss and the other a net gain, you can offset the gain with the loss. For example, a net short-term loss of $5,000 can reduce a net long-term gain of $10,000, leaving $5,000 of long-term gain to be taxed.
4. Overall net loss: If after combining you still have an overall net capital loss, you can deduct up to $3,000 from ordinary income (or $1,500 if married filing separately). Any remainder carries forward to the next tax year.
Why the Order Matters
Because short-term gains are taxed at higher ordinary income rates, using short-term losses to offset capital gains of the short-term variety first saves more tax dollars. If you have a net short-term loss after netting, applying it against a net long-term gain still helps you reduce the long-term gain, but you might have preferred to keep the long-term gain if you could have applied the short-term loss against ordinary income instead. Understanding this priority allows you to better time your loss harvesting.
Tax-Loss Harvesting: Turning Losses Into Tax Savings

Tax-loss harvesting is the practice of intentionally selling securities at a loss to realize a capital loss that can offset capital gains. Investors often execute this strategy near year-end, but it can be done throughout the year. The key is to identify positions that have fallen below their cost basis and to sell them, thereby realizing the loss. You can then immediately reinvest in a similar—but not substantially identical—asset to maintain market exposure without triggering the wash sale rule.
Avoiding the Wash Sale Rule
The wash sale rule (IRC Section 1091) disallows a loss deduction if you buy the same or a “substantially identical” security within 30 days before or after the sale date. This 61-day window can easily trip up tax-loss harvesting. If a wash sale occurs, the disallowed loss is added to the cost basis of the replacement shares, deferring the tax benefit. To safely offset capital gains, ensure you either wait 31 days before repurchasing or buy a similar but not substantially identical ETF or security.
The $3,000 Ordinary Income Deduction

If your total capital losses exceed your total capital gains for the year, the IRS allows you to deduct the excess—up to $3,000—from your ordinary income on your tax return ($1,500 for married filing separately). This deduction applies after you have fully offset capital gains, reducing your adjusted gross income (AGI). For example, if you have $10,000 in capital losses and only $4,000 in capital gains, you can use $4,000 to offset the gains, and then deduct $3,000 from ordinary income. The remaining $3,000 of loss carries over to the following year. This deduction is a direct subsidy for taking losses, making it a valuable tax-planning tool even when you have no capital gains to offset.
Capital Loss Carryover Rules

Unused capital losses do not expire. After you have applied losses to offset capital gains in the current year and taken the $3,000 ordinary income deduction, any leftover loss is carried forward to future tax years indefinitely. The carryover retains its character: short-term losses remain short-term and long-term losses remain long-term. In the carryover year, you apply these losses in the same netting order, first within their own holding period and then across categories. Proper record-keeping is essential—your brokerage will report carryover amounts on Form 1099-B, but you should track them on Schedule D and Form 8949 as well.
For example, assume in 2024 you have a $15,000 net capital loss after netting, consisting of $10,000 short-term and $5,000 long-term. You have no capital gains, so you deduct $3,000 from ordinary income. The remaining $12,000 carries forward: $10,000 as short-term loss carryover and $2,000 as long-term loss carryover. In 2025, if you have $6,000 in short-term gains and $4,000 in long-term gains, you first apply the short-term carryover: $6,000 ST gain – $10,000 ST loss carryover = $4,000 net ST loss. That $4,000 net ST loss then offsets your $4,000 LT gain, leaving no gains. You then can deduct another $3,000 from ordinary income, and carry the remaining $1,000 ST loss to 2026. This illustrates how carried losses continue to offset capital gains year after year.
Calculating Your Net Capital Gain or Loss

To determine exactly where you stand, use Schedule D (Form 1040) and Form 8949. Start by listing all transactions, separating short-term and long-term. Total your short-term proceeds and costs to find the net short-term gain or loss. Do the same for long-term. Then perform the netting as described: if you have a net short-term loss, combine it with net long-term gain; if you have a net long-term loss, combine it with net short-term gain. The resulting figure is your net capital gain or loss. If it is a net gain, it will be taxed at the applicable rates. If a net loss, you can deduct up to $3,000 from ordinary income, carrying over the rest. Tax software automates this, but understanding the calculation helps you plan intentionally to offset capital gains.
Common Mistakes When Using Losses to Offset Capital Gains

Even experienced investors make errors. The most frequent include triggering a wash sale by repurchasing too soon, forgetting to account for the $3,000 deduction limit, misclassifying a security as short-term when the holding period was actually longer, and failing to net gains and losses in the prescribed order. Another mistake is not harvesting losses at all, missing the chance to offset capital gains and reduce current tax liability. Always double-check your dates, keep a trading journal, and consult IRS Publication 550 for detailed guidance.
Strategic Tips for Maximizing the Tax Benefit

To get the most out of your realized losses, integrate tax-loss harvesting into your year-round portfolio management. Monitor for concentrated positions with large gains that could be offset by harvesting losses elsewhere. Consider selling losing positions in December to realize the loss, but remember to wait until after the ex-dividend date for dividend-paying stocks if you want to avoid complicated dividend capture rules. If you anticipate being in a higher tax bracket next year, you may want to delay realizing gains and instead use losses to offset capital gains now or carry them forward strategically. Always align tax strategies with your overall investment goals—don’t sell a quality asset solely for a tax break if it no longer fits your plan.
FAQ

Can I use realized losses to offset capital gains from previous years?
No, realized capital losses can only offset capital gains in the current tax year or be carried forward to future years. They cannot be applied retroactively to prior-year gains. The carryforward mechanism ensures the tax benefit is not lost but simply deferred.
How does the wash sale rule affect my ability to offset capital gains?
If you repurchase a substantially identical security within 30 days before or after the sale, the loss is disallowed for the current year. The disallowed amount adjusts the cost basis of the new shares, delaying the tax deduction until you sell those shares in a non-wash-sale transaction.
What is the difference between offsetting capital gains and deducting from ordinary income?
Offsetting capital gains means you apply capital losses against capital gains dollar for dollar, eliminating the tax on those gains entirely. If losses exceed gains, the excess can be deducted from ordinary income up to $3,000 per year, reducing your overall taxable income at your marginal rate.
Do I have to realize losses to use them?
Yes. Only realized losses (sales that have actually occurred) can be used to offset capital gains. Unrealized losses on paper do not affect your tax return. You must execute a sale to lock in the loss for tax purposes.
Can short-term losses offset long-term capital gains?
Absolutely, after you first net short-term losses against short-term gains. Any remaining net short-term loss can then be applied to offset long-term capital gains, reducing the amount of gain taxed at the favorable long-term rate.
What happens if my capital loss carryover exceeds my future gains?
The carryover does not expire. You continue to apply it each year, first offsetting capital gains, then deducting up to $3,000 from ordinary income, and carrying the remainder forward indefinitely until it is fully used.
Realized losses are not just a financial setback—they are a valuable tax asset when you know how to use them. By strategically selling underperforming positions, you can offset capital gains in the current year, lower your ordinary income by up to $3,000, and carry forward any excess loss into future years. The netting rules, wash sale restrictions, and carryover mechanics may seem complex, but mastering them puts you firmly in control of your tax bill. Whenever you face market volatility, remember that a well-timed loss can save you real money, turning red ink into a brighter after-tax future.