Tax-Loss Harvesting: How It Works
Tax-loss harvesting is a straightforward strategy: sell a security at a loss to realize that loss, offset it against realized capital gains, and reduce your annual tax bill. The mechanics are simple; the details—the wash-sale rule, holding periods, and loss carryforwards—demand precision. Executed thoughtfully, tax-loss harvesting can save thousands of dollars.
For the rate differential that makes harvesting valuable, see Short-Term vs Long-Term Capital Gains Rate; for broader planning, see Qualified Opportunity Zone Tax Benefits Explained.
The basic mechanism: offset gains with losses
You own 500 shares of Fund A, purchased at $50 per share ($25,000 total), now worth $40 per share ($20,000). You have an unrealized loss of $5,000. Elsewhere in your portfolio, you realized a $12,000 capital gain by selling Fund B.
You sell Fund A at $40, realizing the $5,000 loss. On your Schedule D, you report:
- Capital gains: $12,000
- Capital losses: $5,000
- Net gain: $7,000
You owe tax on only $7,000, not $12,000. Depending on your tax bracket and whether the gains are long-term, this might save you $700 to $1,400 in federal tax.
Critically, you immediately reinvest the $20,000 proceeds into a similar but not identical security—perhaps Fund C, which tracks the same index or serves the same role in your portfolio. This keeps your market exposure intact while realizing the tax loss.
Why this works: capital losses are powerful
Capital losses can offset capital gains dollar-for-dollar, regardless of holding period or rate. A long-term $1,000 loss offsets a long-term $1,000 gain or a short-term $1,000 gain, preventing that short-term gain from being taxed at ordinary income rates. In other words, harvesting losses from appreciated securities can shield short-term gains from being taxed at higher ordinary rates.
Additionally, if your capital losses exceed your capital gains in a year, you can deduct up to $3,000 of the excess loss against ordinary income. If you harvest $10,000 in losses but realize only $5,000 in gains, you can deduct $3,000 of ordinary income and carry forward the remaining $2,000 indefinitely into future years.
This ordinary income offset is where harvesting yields its greatest benefit for buy-and-hold investors. In a down market, a diversified portfolio may incur substantial losses. By realizing those losses strategically, you can reduce tax on your W-2 wages, consulting income, or other ordinary income.
The wash-sale rule: the critical trap
The IRS will not allow a loss if you buy a “substantially identical” security within 30 days before the sale or 61 days after (a 61-day “wash-sale window”). If you sell Fund A on January 15 and repurchase Fund A on February 10, the loss is disallowed. The basis of the repurchased shares is increased by the disallowed loss.
Example: You sell 100 shares at a $5,000 loss on January 15. You repurchase the same 100 shares on January 20 for $20,000. The IRS disallows the $5,000 loss, and your new basis becomes $25,000 ($20,000 + $5,000 disallowed loss). The loss does not disappear; it is deferred into your new holding.
“Substantially identical” is a technical term. The IRS will not accept minor variations—buying a different share class of the same company, or the same fund family’s index funds with slightly different ticker symbols, will not suffice. However, buying a different fund that tracks a similar index (e.g., selling a Russell 2000 fund and buying a different company’s Russell 2000 fund) is generally considered safe.
The wash-sale window creates a timing constraint: if you harvest a loss in December and want to maintain exposure while the wash-sale window expires, you must either (1) hold cash for 30 days post-sale, or (2) own a substantially different security for that window.
Holding period and loss characterization
A harvested loss carries the holding period of the original position—short-term or long-term. However, losses offset gains regardless of term. A short-term loss offsets a long-term gain just as effectively as a long-term loss. This symmetry is what makes harvesting powerful: you can harvest short-term losses (which arise from actively traded positions) to shield long-term gains (which might otherwise be taxed at preferential rates).
When you reinvest after harvesting, the holding period of the new position starts fresh from the reinvestment date.
Loss carryforwards and annual limits
If your net capital losses exceed $3,000 in a single year, the excess carries forward to the next year indefinitely. Suppose you harvest $15,000 in losses and realize $8,000 in gains. Your net loss is $7,000. You deduct $3,000 against ordinary income and carry forward $4,000.
In the following year, if you realize $6,000 in gains and no new losses, you offset $4,000 of the carryforward and deduct $2,000 against ordinary income. The carryforward rules are mechanical; excess losses are not wasted—they simply defer to later years.
This carryforward feature means that harvesting in a down market can provide tax relief across multiple years. An investor who realizes major losses in 2024 might offset 2024 gains plus ordinary income, then continue offset into 2025 and beyond.
Long-term vs. short-term loss harvesting
Investors often ask: should I harvest long-term or short-term losses first? Technically, there is no priority—losses offset gains and ordinary income regardless of term. However, strategically, harvesting short-term losses is often preferable if you also have short-term gains, because short-term gains are taxed at ordinary rates (often 20–37% effective rate including state tax). Harvesting a short-term loss to offset a short-term gain saves that full ordinary rate. By contrast, harvesting a loss to offset a long-term gain saves only the long-term rate (typically 15–20%), so the dollar savings is smaller.
In a year where you realize a large short-term gain, prioritize harvesting short-term losses to shield that gain from ordinary income rates.
Interaction with qualified opportunity zone investments
Tax-loss harvesting and opportunity zone investment are complementary strategies. You can harvest losses in a taxable brokerage account and reinvest proceeds into a Qualified Opportunity Fund within the 180-day window required to defer gains. The harvested loss reduces current-year tax, while the opportunity zone investment provides future deferral and exclusion. Together, they can significantly reduce lifetime tax on investment returns.
Practical execution and record-keeping
When harvesting, maintain clear records:
- Date of sale and purchase for each loss position
- Cost basis of the original position
- Sale price and realized loss amount
- Date and details of the reinvestment (to confirm wash-sale compliance)
Most brokers provide Form 1099-B, which reports your sale proceeds and cost basis. Cross-reference this with your records to ensure accurate reporting on Schedule D.
Automated systems (some robo-advisors, tax-loss harvesting services) handle harvesting mechanically, selling and reinvesting continuously to capture losses. These systems require careful configuration to respect your portfolio strategy and avoid tax-inefficient trades.
Common mistakes
Not waiting 31 days. Selling Fund A on December 31 and repurchasing on January 15 triggers the wash-sale rule. You must wait until at least January 30 to avoid disallowance.
Buying substantially identical securities. Selling a domestic large-cap index fund and buying another domestic large-cap fund with slightly different holdings may be treated as substantially identical if both track the same benchmark closely.
Forgetting carryforwards. Harvesting creates a loss that may exceed the year’s gains. Tracking multi-year carryforwards is essential to not “lose” deductions.
Over-harvesting into a cash drag. If you harvest without a reinvestment plan, you may sit in cash for weeks, missing market exposure—a risk especially pronounced in volatile or rising markets.
See also
Closely related
- Short-Term vs Long-Term Capital Gains Rate — why losses are especially valuable against short-term gains
- Cost Basis — determining the loss amount
- Schedule D — form for reporting losses and gains
- Qualified Opportunity Zone Tax Benefits Explained — reinvest harvested proceeds for additional benefit
- Wash Sale — the 61-day rule and its consequences
Wider context
- Tax Bracket Investor — ordinary income rates being offset
- Mutual Fund — common vehicles for harvesting
- ETF — tax-efficient alternative for reinvestment
- Hedge Fund — alternative strategies for loss realization