The best time to tax-loss harvest is when a realized loss will wipe out income taxed at your highest rate — a short-term gain, a gain exposed to the Net Investment Income Tax, or up to $3,000 of ordinary income — with the sale settled by December 31 and no purchase of a substantially identical security in the 30 days before or after. Knowing when to tax-loss harvest is mostly a question of matching the loss to the most expensive tax it can erase, then staying clear of the 61-day wash sale window.
Match the Loss to Your Most Expensive Tax
Harvested losses first offset capital gains for the year in a specific order: short-term losses cancel short-term gains, long-term losses cancel long-term gains, and any leftover crosses over. Short-term gains are taxed as ordinary income at rates up to 37%. Most long-term gains top out at 20%.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses A dollar of short-term loss applied to a short-term gain therefore saves more tax than the same dollar applied to a long-term gain. If you’ve already booked a big short-term profit this year, that’s the clearest signal to go looking for losses.
High earners get a second reason to harvest. A 3.8% Net Investment Income Tax applies to capital gains once modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly. Those thresholds are not indexed for inflation.2Internal Revenue Service. Questions and Answers on the Net Investment Income Tax Above them, the effective top rate on long-term gains is 23.8%. Every dollar of harvested loss that offsets one of those gains saves 23.8 cents, not 20.
If your losses for the year exceed your gains, you can deduct up to $3,000 of the excess against ordinary income like wages. Married couples filing separately are capped at $1,500 each.3Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses For someone in the 37% federal bracket, that $3,000 shaves roughly $1,110 off the tax bill. Anything beyond $3,000 carries forward to future years indefinitely, keeping its short-term or long-term character until you use it up.4Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers A brutal year for your portfolio can fund tax offsets for years afterward.
When Harvesting Isn’t Worth Doing
If your taxable income is low enough to qualify for the 0% long-term capital gains rate, selling a losing position produces a tax benefit of zero — you weren’t going to owe on those gains anyway. Worse, the sale locks in a lower cost basis on whatever you buy to replace it, which can create a bigger taxable gain later when your income is higher. Investors in that bracket are usually better off harvesting gains than losses.
Timing Around Market Drops
Broad selloffs create the widest harvesting windows because many holdings drop below their original purchase price at the same time. A diversified portfolio hands you unrealized losses across multiple positions during a correction that a bull market never would. The catch is that the loss only exists while the price is depressed. If the position recovers before you sell, the opportunity is gone.
You don’t have to wait for a crash. Individual holdings underperform for company-specific reasons all the time — an earnings miss, a management change, a competitor gaining ground. A quarterly review of your positions catches those dips before a rebound erases them. Investors who only look in December compress every decision into the tightest possible timeline and often miss losses that existed briefly in March or September.
The December 31 Deadline
To count for a given tax year, the trade must be executed and settled by December 31. Since May 2024, most U.S. securities settle on a T+1 basis, meaning one business day after the trade date.5Securities and Exchange Commission. SEC Chair Gensler Statement on Upcoming Implementation of T+1 A trade placed on December 30 usually settles on the 31st and makes the cutoff. When December 31 falls on a weekend, the last trading day shifts earlier and the timing tightens. Leaving a buffer of a few business days before year-end avoids settlement surprises.
Mutual fund investors face an extra December trap. Funds distribute realized capital gains to shareholders near year-end, typically in November or December. If you hold shares on the record date, you owe tax on the distribution even if it reinvests automatically and even if the shares are worth less than you paid. Selling before the distribution avoids the tax hit, but buying the same fund back within 30 days triggers a wash sale on the loss. Check your fund company’s distribution schedule early in the fourth quarter.
The 61-Day Wash Sale Window
The wash sale rule is the biggest constraint on when you can harvest. Under Section 1091 of the Internal Revenue Code, if you sell a security at a loss and buy back a substantially identical security within 30 days before or 30 days after the sale, the IRS disallows the loss.6Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities Count the day of the sale itself and you get a 61-day restricted window. The “before” half catches people most often. If you bought additional shares three weeks ago and sell your original lot today, you’ve already violated the rule.
A disallowed loss is not permanently lost in a normal taxable account. The amount is added to the cost basis of the replacement, deferring the benefit until you eventually sell that replacement in a compliant way.7eCFR. 26 CFR 1.1091-1 – Losses From Wash Sales of Stock or Securities The economic effect is a delay.
The IRS has never published a comprehensive definition of “substantially identical.” Two different individual stocks in the same industry are not substantially identical. Two index funds tracking nearly the same benchmark almost certainly are. Many tax professionals treat funds with more than roughly 70% holdings overlap as risky. The safe play during the 31-day waiting period is to park the proceeds in a fund tracking a meaningfully different index, then swap back after the window closes if you prefer the original.
The IRA Trap
The wash sale rule follows the taxpayer, not the account. If you sell a stock at a loss in your taxable brokerage account and your IRA buys the same stock inside the 61-day window, that’s a wash sale. Because the IRA is tax-deferred, the basis adjustment inside it can never be recovered. The loss is gone for good. This applies to traditional IRAs and Roth IRAs alike.8Internal Revenue Service. Revenue Ruling 2008-5 – Losses From Wash Sales of Stock or Securities If you have automatic monthly IRA contributions flowing into a target-date fund, verify that fund isn’t substantially identical to whatever you just sold in taxable. The same coordination applies across a spouse’s brokerage and retirement accounts, since the IRS can disallow losses under the related-party rules when spouses trade the same security within the window.
Pick the Right Lot to Maximize the Loss
If you own multiple lots of the same security bought at different prices, the lot you sell determines the size of the harvested loss. The default at most brokerages is first-in, first-out, which sells the oldest shares first. Those often have the lowest cost basis and the smallest loss, or even a gain.
Specific identification lets you choose the lot. Say you bought 100 shares at $50 in January and another 100 at $80 in July, and the stock now trades at $60. FIFO sells the $50 shares for a $10 gain. Specific identification sells the $80 shares for a $20 loss. The IRS requires you to identify the specific lot before executing the trade and your broker must confirm the instruction; you cannot reassign lots after the fact.9Internal Revenue Service. Publication 551 – Basis of Assets Most brokerages support specific identification through their trading platforms once you enable it in your account settings.
A Note on Cryptocurrency
Section 1091 refers specifically to “stock or securities,” and the IRS has not definitively ruled that digital assets fall within that definition. Crypto investors have historically been able to sell a token at a loss and repurchase it immediately, something equity investors cannot do. Legislative proposals to close the gap have been circulating for several years, and reporting requirements are tightening, with brokers of digital assets now required to issue Form 1099-DA.10Internal Revenue Service. Treasury, IRS Issue Proposed Regulations for Digital Asset Brokers to Provide 1099-DA Statements Electronically Verify the current rules for the tax year in question before relying on the older treatment.