Tax-loss harvesting means selling an investment that's worth less than what you paid for it, on purpose, to record a capital loss for tax purposes. That loss offsets capital gains elsewhere in your portfolio, and a limited amount of ordinary income beyond that, lowering your tax bill for the year without changing your overall investment strategy. This guide assumes the basics from investing basics for beginners.
The core mechanism
Say you hold two positions, one up and one down since purchase. Selling the losing position locks in a capital loss you're allowed to use against a capital gain, including a gain you realize by selling the winning position or a gain from elsewhere in your portfolio. If your losses exceed your gains for the year, a portion of the remaining loss typically offsets ordinary income too, with any leftover carried forward to future tax years. The specific dollar limits on how much loss offsets ordinary income change and depend on current tax law, so check the current rules or a tax professional rather than relying on a remembered figure.
Why this only matters in a taxable account
Tax-loss harvesting only makes sense inside a taxable brokerage account, where selling an investment for a gain or loss carries a real tax consequence each year. Inside a 401(k) or IRA, gains and losses inside the account don't trigger any current tax bill regardless of whether you sell or hold, since the tax treatment applies at contribution or withdrawal instead. Selling a losing position inside a retirement account produces no tax benefit at all, since there's no capital-gains tax event to offset in the first place.
Staying invested while banking the loss
Selling a losing position without reinvesting the money defeats a lot of the purpose, since it pulls you out of the market and away from your target allocation. The common approach is reinvesting the proceeds in something similar to the position you sold, a different fund tracking a comparable index or sector, rather than sitting in cash. That keeps your overall exposure roughly intact while the tax loss books to your account.
The wash-sale rule
The wash-sale rule stops you from claiming a tax loss if you buy the same or a substantially identical security back within a set window around the sale, covering time before and after the sale date. Buy back into the identical fund too soon, and the loss gets disallowed for tax purposes, even though the sale itself still happened. This is the reason harvesting usually involves swapping into a similar, not identical, fund. Two S&P 500 index funds from different providers track the same index closely enough to maintain your market exposure, while counting as different enough securities to respect the rule, though what counts as "substantially identical" isn't always obvious and the specifics matter. Confirm the details with a tax professional or your brokerage before assuming a given swap qualifies.
Worth doing, not worth overdoing
Tax-loss harvesting reduces a tax bill at the margin. It doesn't turn a losing investment into a winning one, and chasing losses purely for the tax benefit risks distorting a portfolio built around a long-term plan instead of short-term tax mechanics. Several brokerages and robo-advisors automate this process for taxable accounts, executing the swaps for you within the wash-sale rule's constraints.
Nothing here constitutes tax advice specific to your situation. Tax-loss harvesting rules, including specific dollar limits and holding-period details, change over time. Talk to a tax professional before building a harvesting strategy around your own portfolio.