Technically, tax-loss harvesting involves selling an investment at a loss to offset capital gains from more profitable investments. “It’s simply making lemonade out of lemons,” says Ric Edelman, founder of Edelman Financial Engines and the Digital Assets Council of Financial Professionals. “If you lost money in an investment but think it still has long-term potential, you can sell it right now for a loss, take the tax deduction for that loss, and then immediately buy a highly similar investment to maintain your long-term portfolio.”
But before you rush to sell a losing investment, there are rules, trade-offs, and timing considerations that can change the outcome. A strategy that goes viral on social media can create an unwanted tax surprise if it’s handled incorrectly.
That’s why it’s critical to understand the tax-loss harvesting rules and mechanics before harnessing the strategy to save money on your tax return.
How Tax-Loss Harvesting Works
You can think of the harvest in this strategy much like a farmer surveying his field and deciding which crops are ripe to be collected. Investors can do something similar with their portfolios, looking for losses that can be put to work before tax time arrives.
Of course, not every investment you buy will perform as planned. An investment that’s down today may simply need more time to rebound. Some investments may eventually prove to be duds. Either way, this is where taking those lemons and making lemonade becomes useful.
But a decline on your brokerage statement alone does not give you a tax loss to use. Generally, you must sell the investment and “realize” (IRS jargon) the loss before it can be harvested.
According to Edelman, investors should essentially reverse-engineer the process by examining their gains first, not their losses. “This is ideal for people with significant realized gains. That’s the whole point. You’re trying to offset capital gains taxes,” he says. “If you don’t have a lot of capital gains, a tax-loss strategy is of very limited value.”
From there, the tax-loss harvesting strategy is a step-by-step process:
- Start with the gains you have already realized from investments sold at a profit. Then look for losing investments that could be sold to help offset those gains.
- If your capital losses exceed your capital gains, you can generally deduct up to $3,000 (or $1,500 if married filing separately) of the remaining loss against ordinary income for the year. Any unused losses can be carried forward into future tax years.
An underperforming investment may still have some value at tax time. Next, let’s see what that looks like in actual dollars.
Tax-Loss Harvesting Example
Let’s say you bought shares of beverage giant Coca-Cola and the investment has fallen below what you paid for it. In this scenario, Edelman suggests you could sell Coca-Cola, realize the loss, and buy competitor PepsiCo instead.
The same principle applies to mutual funds and exchange-traded funds (ETFs). “It works just as well with those investments,” Edelman says. The goal is to maintain similar market exposure without immediately buying back the same security.
Suppose your Coca-Cola investment cost $50,000 but is now worth $40,000. Selling it creates a $10,000 capital loss. On the other hand, let’s say your portfolio experienced a $15,000 capital gain on an AI stock. The loss on Coke, painful as it might seem, could offset the gain that is subject to tax.
In this tax-loss harvesting example, the $10,000 loss on Coke cuts the taxable capital gain on the AI stock from $15,000 to $5,000— saving $2,000 in federal capital-gains taxes if you’re in the 20% long-term capital-gains tax bracket.
Selling did not create the $10,000 loss. Instead, it made the loss usable for tax purposes, while the remaining $40,000 could be reinvested in PepsiCo or another suitable replacement.
There is still a trade-off. PepsiCo may perform differently, and Coca-Cola could rally after you sell. The tax savings thus needs to make sense for the portfolio. And before buying anything back, there is one IRS restriction to understand: the wash-sale rule.
The Wash-Sale Rule Explained
Tax-loss harvesting might seem like a do-it-yourself strategy, but it’s not quite the same as a Home Depot project. This is where a beginner investor can run headfirst into an IRS rule institutional investors know well.
Among the most important tax-loss harvesting rules, the wash-sale rule applies when you sell a security at a loss and acquire the same, or what the IRS calls “substantially identical” securities within 30 days before or after the sale.
Edelman calls the wash-sale rule the “very important fine print.” If you sell an investment at a loss and buy the same or a substantially identical investment within 30 days before or after the sale, you can’t take the deduction.
Investors can instead wait 31 days before buying the investment back or immediately buy a different investment that provides similar market exposure without being substantially identical. That is the idea behind swapping Coca-Cola for PepsiCo.
Funds can be trickier. Edelman warns that selling one S&P 500 index fund and immediately buying another S&P 500 index fund could create a problem despite the different fund companies. That complexity is one reason he cautions against treating tax-loss harvesting as a DIY shortcut.
“If you’re not familiar with the wash-sale rule and the 30-day waiting period, you could get yourself into trouble with the IRS without realizing it,” he says. “I believe people are best off working with talented professionals, including a financial advisor, tax advisor, and legal advisor, before they act on their own.”
Short-Term vs. Long-Term Capital Gains
Not all capital gains are equivalent, and that can make certain losses more valuable at tax time than others.
The IRS draws the dividing line at one year. Sell an investment after owning it for one year or less, and any profit is generally a short-term capital gain. Hold onto it for more than a year, and the gain generally becomes long-term. Short-term capital gains are taxed as ordinary income, while long-term capital gains generally qualify for lower rates.
Merrill Lynch notes that long-term federal capital-gains rates can reach 20%, plus the 3.8% Net Investment Income Tax (NIIT) when applicable, while short-term gains are taxed as ordinary income. That can make harvesting losses against short-term gains particularly valuable because the tax rate being offset may be higher.
Edelman emphasizes the importance of keeping those two buckets straight: “Take your long-term losses and use them to offset gains on investments held for more than a year,” he explains.
The tax rules treat short-term and long-term gains and losses differently, so it’s important to keep track of how long you’ve held each investment. That’s another reason to rely on a professional. The stakes matter. “If you don’t know about these things, you can get yourself into trouble,” Edelman cautions.
When Tax-Loss Harvesting Makes Sense
The stock market is nothing if not volatile, and if there was any doubt, the AI trade has put that to rest. Even with the S&P 500 up roughly 12% this year on the heels of two strong bull-market years, individual stocks can still get caught in the tug of war between bulls and bears.
If your portfolio has losses, there may be a way to shift this in your favor. And if you have also locked in strong gains elsewhere, tax-loss harvesting can help offset what might otherwise become a hefty tax bill.
At its core, that is part of the appeal of tax-efficient investing: making the gains and losses already inside a portfolio work together.
“When you have a very volatile market, you have assets that are often falling significantly in value, but only for a brief period,” Edelman says. “This creates a temporary opportunity to engage in tax-loss harvesting.”
AllianceBernstein makes a similar point: losses can change quickly as market prices fluctuate, so investors who only review their portfolios periodically may miss the window. And those losses do not have to be forced.
Unused losses can create what’s known as a tax loss carryforward into the future. Russell Investments describes that reserve as a “capital loss bank,” giving investors something to harness when taxable gains resurface.
When Tax-Loss Harvesting May Not Be Worth It
Tax-loss harvesting should serve your investment strategy, not the other way around. That becomes apparent when you’re committed to an investment for the long haul.
Selling only to capture a tax loss can backfire if the investment rebounds while you’re out of it or if the replacement investment performs differently than expected. “You’ve got to decide whether the strategy to save a few tax dollars is worth it in terms of the potential risk of missing out on the gains,” says Edelman.
Dal Coger, an investor featured in a Bloomberg report, learned that lesson firsthand after selling 670 shares of Lockheed Martin after the stock had fallen about 8%, albeit on the advice of his financial advisor.
Over the next three months, Lockheed stock surged more than 40%. Coger also found the tax-aware strategy difficult to track as the account repeatedly bought and sold stocks, and he eventually abandoned it.
There are other limits to keep in mind. As Edelman pointed out, tax-loss harvesting is limited to taxable accounts, not investments held inside popular retirement accounts like IRAs, pensions, or 401(k) plans.
And investors can create problems by rebuying the same or a substantially identical investment too soon, allowing the tax outcome to disrupt their asset allocation, or focusing so heavily on reducing taxes that they lose sight of the investment itself.
Edelman cautions that as sophisticated strategies become available to ordinary investors, “the downside is that you don’t know what you don’t know.” That is why he stresses the value of working with a financial or tax professional rather than treating tax-loss harvesting as a DIY move.
This is worth remembering the next time tax-loss harvesting appears in your TikTok feed. Turning investment lemons into lemonade can be smart. Just make sure you understand the consequences first.
