Tax-loss harvesting before December 31, 2026, can reduce the federal taxes U.S. investors owe on realized investment gains. But a sale that looks tax-efficient in December can lose its immediate deduction if substantially identical securities are bought within the IRS wash-sale window, including in early January 2027. The key is to coordinate the sale, replacement investments, and activity across accounts.
What Tax-Loss Harvesting Actually Does
Tax-loss harvesting means selling an investment in a taxable brokerage account for less than its adjusted cost basis, creating a realized capital loss. That loss can offset realized capital gains, subject to federal netting rules. A paper loss on a position you still hold does not accomplish this; the position generally must be sold.
The strategy is not a guarantee of a lower total lifetime tax bill. Selling changes your portfolio, and a replacement bought at a lower price may produce a larger taxable gain when you eventually sell it. Trading costs, market exposure, and state tax rules also matter. For the broader role of taxes in an investing plan, see how investment taxes affect financial planning.
The Wash-Sale Rule Covers 30 Days Before and After a Loss Sale
Under IRS Publication 550, a wash sale generally occurs when an investor sells stock or securities at a loss and acquires substantially identical stock or securities during the 30 days before or 30 days after the sale. The sale date itself is included, creating a 61-calendar-day period. Acquiring certain contracts or options to buy the securities can also trigger the restriction.
The rule does not make the transaction illegal. Instead, it generally disallows the affected loss as a current deduction. When replacement securities are purchased in a taxable account, the disallowed amount normally increases their adjusted cost basis, postponing recognition until a later qualifying disposition.
A $2,000 Wash-Sale Example
Suppose an investor buys 100 shares at $100 each, then sells them for $80 each, realizing a $2,000 loss. Ten days later, the investor buys back 100 substantially identical shares at $82, spending $8,200. The $2,000 loss cannot be deducted immediately; instead, the basis of the replacement shares becomes $10,200, or $102 per share. The holding period of the original shares generally carries over. These calculations assume no commissions or other basis adjustments.
If only 40 of the 100 shares were repurchased within the window, the matching portion of the loss, $800, would generally be disallowed, while the remaining $1,200 could still qualify as a realized loss. This share-matching distinction is important for investors who make frequent partial purchases.
December 31, 2026: Watch the January 2027 Trap
For a typical calendar-year individual who sells a publicly traded stock on an established exchange, the trade date generally determines the tax year of the gain or loss, even when settlement occurs in the following year. Publication 550 explains the trade-date rule. An order placed but not executed before year-end does not establish a 2026 sale.
For example, if an investor sells a stock at a loss on December 31, 2026, acquisitions of substantially identical securities from December 1, 2026, through January 30, 2027 fall inside the wash-sale window. Assuming there were no earlier matching purchases, January 31, 2027, is the first calendar day outside the post-sale 30-day window. Market trading availability may push an actual stock repurchase to the next trading session.
A January repurchase can therefore undermine a December tax plan. The 30-day clock does not reset on January 1. Investors planning to keep similar market exposure should consider the restrictions before putting a sell order into the market.
Five Common Wash-Sale Mistakes
- Buying first, selling later: A purchase made during the 30 days before the loss sale can trigger the rule, even if the investor makes no further purchases afterward.
- Ignoring other accounts: An identical purchase through a second brokerage account may qualify as a wash sale even if neither broker flags it. The IRS also specifically identifies purchases by a spouse or a corporation the taxpayer controls.
- Repurchasing inside an IRA or Roth IRA: The rule can apply when substantially identical shares are bought inside one of these retirement accounts. Unlike an ordinary taxable-account wash sale, the disallowed loss generally cannot be added to the IRA’s tax basis, so the tax benefit may be permanently lost.
- Leaving dividend reinvestment on: An automatic dividend reinvestment that buys matching shares during the window can affect the deduction, even when the reinvested amount is small.
- Assuming a different ETF ticker solves everything: Two funds can have different tickers and still raise a substantially-identical question. The IRS does not provide a blanket safe harbor for every swap between ETFs following similar indexes.
These limits are grounded in the IRS Schedule D instructions and Publication 550. Options and short sales can involve additional complexities. Investors also need to distinguish directly held cryptocurrency, generally taxed as property, from digital assets that are legally securities, including certain tokenized securities to which wash-sale rules may apply.
How Much Tax Can Harvested Losses Save?
Consider a simplified investor with $9,000 of realized long-term capital gains and $6,500 of allowable long-term losses in 2026. The resulting net gain is $2,500. At an assumed 15% federal long-term capital gains rate, offsetting $6,500 of gains would reduce the federal capital gains tax attributable to those gains by $975. The illustration ignores state tax, net investment income tax, and interactions with other tax items.
Illustrative calculation: $9,000 realized long-term gains; $6,500 allowable long-term losses; $2,500 remaining net gain; $975 federal tax reduction at an assumed 15% rate.
If total allowable losses exceed all capital gains, an individual can generally deduct up to $3,000 of the remaining net capital loss against ordinary income each year, or $1,500 if married filing separately. The unused amount carries forward to subsequent tax years. For example, an $8,000 net capital loss with no gains could produce a $3,000 ordinary-income deduction in 2026 and a $5,000 carryforward, subject to the taxpayer’s circumstances. See IRS Topic 409.
Short-term gains and losses are netted separately from long-term items before the remaining amounts are combined. That can materially change the tax benefit because short-term net gains generally face ordinary-income rates. The correct calculation starts with realized transactions and any loss carryovers, not simply the biggest red number on a portfolio screen.
A Practical Year-End Tax-Loss Harvesting Checklist
- Review realized results: Check 2026 gains, losses and any prior-year loss carryforward across all taxable brokerage accounts.
- Confirm the tax lot: Identify which shares are being sold and verify their adjusted basis, purchase date and holding period.
- Scan both sides of the sale: Examine matching purchases during the previous 30 days and planned purchases during the next 30 days, across the household’s relevant accounts.
- Review automatic trades: Check dividend reinvestment plans, scheduled contributions, options and retirement-account purchases.
- Set a replacement policy: Hold cash temporarily or choose a genuinely different investment consistent with the desired allocation. A substitute that is not substantially identical can still create tracking differences and market risk. See our guide to maintaining a long-term asset allocation.
- Reconcile tax records: Compare broker cost-basis records with personal trade history. Portfolio tracking tools can help organize transactions, but an app or broker may miss cross-account wash sales.
Wash-sale adjustments generally appear on Form 8949, with code W in column (f) and the nondeductible loss as a positive adjustment in column (g); the totals flow to Schedule D. A wash sale can exist even if it is not reflected in Form 1099-B, so independent recordkeeping is essential. The IRS reporting instructions explain this treatment.
Bottom Line: Finish the Tax Plan, Not Just the Trade
Bottom line: December 31, 2026, is the year-end target for realizing qualifying stock losses in a typical U.S. calendar-year taxable account, but January purchases still count toward the wash-sale window. A useful tax deduction is only one part of the decision: preserve the portfolio’s intended exposure, confirm the tax lots and keep the complete trading history.
For informational purposes only; not investment advice.

