What tax loss harvesting is

Tax loss harvesting is selling an investment at a loss to offset gains you made elsewhere — usually gains from other investments or from work income. When you sell an investment for less than you paid for it, that loss can reduce the amount of investment income you owe tax on. The goal is to lower your tax bill in the current year while keeping your overall investment strategy roughly the same.

The mechanics are straightforward: you sell a stock, bond, or fund that has dropped in value since you bought it. You use that loss to cancel out capital gains (profits from investments you sold at a higher price). If your losses exceed your gains, you can deduct up to $3,000 of the excess loss against ordinary income — like wages or self-employment income — in that tax year. Any remaining loss carries forward to future years.

The catch is the wash-sale rule. If you sell an investment at a loss and buy the same or "substantially identical" investment within 30 days before or after the sale, the IRS disallows the loss. You can buy a similar but not identical investment (a different fund tracking the same index, for example) and avoid the wash-sale problem, but you have to wait the full 30 days if you want to buy back the exact same thing.

Key Takeaways

  • Tax loss harvesting offsets investment gains or ordinary income by selling investments that have lost value, reducing your tax bill in the year you harvest the loss.
  • You can deduct up to $3,000 of excess losses against wages or other ordinary income each year; losses beyond that roll forward to future years.
  • The wash-sale rule blocks you from claiming a loss if you buy the same or substantially identical investment within 30 days before or after the sale.
  • Tax loss harvesting makes the most sense when you have significant capital gains, are in a high tax bracket, or hold investments that have genuinely declined in value.
  • Harvesting a loss does not change your long-term investment allocation if you replace the sold investment with a similar one in a different fund or security.

When harvesting losses actually saves you money

Tax loss harvesting only reduces your tax bill if you have gains to offset. If you have no capital gains in a year and your income is below the threshold for ordinary deductions, harvesting a loss may not help you in that year — though the loss still carries forward. The real payoff comes when you have realized capital gains (from selling investments at a profit) or when you are in a high tax bracket and can use the $3,000 ordinary income deduction.

The tax savings depend on your marginal tax rate. If you are in the 24% federal bracket and harvest $10,000 in losses, you save roughly $2,400 in federal tax (plus any state income tax). If you are in the 12% bracket, the same harvest saves about $1,200. The higher your bracket, the more valuable each dollar of loss becomes.

Harvesting also makes sense if you hold an investment that has declined and you no longer believe in it. You get a tax benefit while exiting a position you wanted to leave anyway. But if you are harvesting losses just to harvest them — selling a fund you still like and buying it back after 30 days — the transaction costs and the hassle often outweigh the tax savings, especially in smaller accounts.

The wash-sale rule and how to work around it

The wash-sale rule applies to stocks, bonds, mutual funds, and exchange-traded funds (ETFs). It does not explore to options or cryptocurrency. If you sell a security at a loss, you cannot buy the same security or one the IRS considers "substantially identical" within 30 days before the sale or 30 days after. If you do, the loss is disallowed, and the cost basis of the new purchase is increased by the disallowed loss.

The IRS does not define "substantially identical" with a bright line. Two funds tracking the same index are usually considered substantially identical. A fund tracking the S&P 500 and a fund tracking the total U.S. stock market are close enough that the IRS has challenged harvests between them. A fund tracking the S&P 500 and a fund tracking the Russell 2000 (small-cap stocks) are different enough to pass scrutiny.

The practical workaround is to sell the investment at a loss and when ready buy a similar but not identical investment. If you own a total U.S. stock market fund that has declined, you can sell it and buy a large-cap index fund or a different total market fund from a different provider. After 30 days, you can switch back to your original fund if you want. This keeps your portfolio allocation intact while avoiding the wash-sale trap.

How harvested losses reduce your taxable income

When you harvest a loss, it first offsets any capital gains you realized in the same year. If you sold stocks for a $5,000 gain and harvested a $7,000 loss, your net capital gain is zero, and you have $2,000 in excess losses. That $2,000 can then offset up to $2,000 of ordinary income (wages, self-employment income, interest, dividends) in the current year.

If your excess losses exceed $3,000 in a year, the remainder carries forward indefinitely. You can use it in future years to offset future gains or up to $3,000 of ordinary income each year. This carryforward is valuable if you expect to have capital gains in later years or if you are in a higher tax bracket later on.

The order matters for tax purposes. Long-term capital losses (from investments held more than one year) offset long-term capital gains first. Short-term losses offset short-term gains first. Only after each category is exhausted do losses cross over to the other category. For most investors, this distinction does not change the outcome, but it can matter if you have both types of gains in the same year.

Tax loss harvesting in taxable versus retirement accounts

Tax loss harvesting only works in taxable brokerage accounts. In retirement accounts — 401(k)s, traditional IRAs, Roth IRAs, SEP-IRAs — you cannot harvest losses because the IRS does not recognize gains or losses inside these accounts. You can buy and sell investments within a retirement account without any tax consequence, but you also cannot use losses to offset other income.

This is one reason to keep taxable investments separate from retirement accounts. If you have both, prioritize harvesting losses in the taxable account where they have tax value. In retirement accounts, focus on asset allocation and long-term growth without worrying about tax-loss timing.

For high-income earners or those with large investment portfolios, the split between taxable and retirement accounts becomes a strategic decision. Putting tax-inefficient investments (like bonds or actively managed funds that generate short-term gains) in retirement accounts and tax-efficient investments (like index funds or buy-and-hold stocks) in taxable accounts can reduce the overall tax drag on your wealth.

Automated harvesting and when to do it yourself

Some investment firms and robo-advisors offer automated tax-loss harvesting. These services monitor your holdings and automatically sell positions at a loss, then buy similar replacements to keep your allocation on track. They typically charge a fee (often 0.25% to 0.50% of assets under management) or bundle the service into a higher overall advisory fee.

Automated harvesting makes sense if you have a large portfolio (usually $100,000 or more), you are in a high tax bracket, and you want the discipline of consistent harvesting without the manual work. The fee is often worth it if the tax savings exceed the cost. For smaller accounts or lower tax brackets, the fee may eat up most of the benefit.

If you harvest manually, the best time is typically late in the year when you can see your full picture of gains and losses. You can also harvest opportunistically whenever a position drops significantly. Keep detailed records of the sale date, the purchase date of the replacement, and the amount of the loss. When you file your tax return, report the loss on Schedule D (Capital Gains and Losses).

Common mistakes and limits to know

The most common mistake is forgetting the wash-sale rule and buying back the same investment too soon. This wipes out the tax benefit and can create confusion on your tax return. Set a calendar reminder for 30 days after you sell, or buy a clearly different investment upfront.

Another mistake is harvesting losses in a way that conflicts with your investment plan. If you sell a position you believe in just to harvest a loss, you may miss out on future gains. The tax savings should be a bonus to a decision you were already making, not the reason for the decision itself.

Also remember that harvesting a loss does not change the fact that you sold an investment at a loss. You still have less money than you started with. The tax deduction is a partial offset to that real loss, not a way to make money. If an investment has declined 30%, harvesting the loss saves you tax on that 30% decline, but you have still lost 30% of your capital.

Frequently Asked Questions

Can I harvest losses in a Roth IRA?

No. Roth IRAs are tax-sheltered accounts, so the IRS does not recognize gains or losses inside them. You cannot claim a loss for tax purposes, and you cannot harvest. The same applies to traditional IRAs, 401(k)s, and other retirement accounts. Tax-loss harvesting only works in taxable brokerage accounts.

What happens if I accidentally violate the wash-sale rule?

The IRS disallows the loss and adds the disallowed amount to the cost basis of the replacement investment. This defers the tax benefit rather than eliminating it — you will get the benefit when you eventually sell the replacement at a gain or loss. If you realize the mistake before filing your return, you can amend your records. If the IRS catches it, you may owe back taxes plus interest.

Does harvesting a loss affect my cost basis for future sales?

Harvesting itself does not change your cost basis. Your cost basis is what you originally paid for the investment. When you sell at a loss and buy a replacement, the replacement has its own cost basis (what you paid for it). The only exception is if you violate the wash-sale rule — then the disallowed loss is added to the replacement's cost basis.

Is tax-loss harvesting worth it for a small portfolio?

It depends on your tax bracket and the size of your losses. If you have a $50,000 portfolio, are in the 22% tax bracket, and harvest $5,000 in losses, you save roughly $1,100 in tax. That is meaningful. If you are in the 12% bracket or your losses are smaller, the benefit shrinks. If you use an automated service, the fee may outweigh the savings. For very small portfolios (under $25,000), manual harvesting is usually not worth the effort unless you have significant losses.

Can I harvest losses from cryptocurrency?

Yes. Cryptocurrency is treated as property for tax purposes, so losses from selling crypto at a loss can be harvested just like stock losses. The wash-sale rule does not explore to crypto, so you can sell at a loss and buy back the same cryptocurrency when ready without triggering the rule. However, the IRS requires you to report all crypto transactions, and the tax treatment can be complex if you trade frequently.