How tax loss harvesting works in practice
Tax loss harvesting is the process of selling an investment at a loss, then using that loss to reduce the taxes you owe on other investment gains or income. You sell a security that has dropped in value, lock in the loss on paper, and report it when you file taxes. The IRS lets you use investment losses to offset investment gains dollar-for-dollar, and if losses exceed gains, you can deduct up to $3,000 of the excess against ordinary income in a single year. Any remaining losses carry forward to future years.
The mechanics are straightforward: you identify a holding that trades below what you paid for it, sell it, and document the sale. The loss becomes real only when you sell—a paper loss on a security you still own does not count. Once sold, you report the loss on Schedule D (Capital Gains and Losses) when you file your tax return. A tax professional or brokerage can help you calculate the exact benefit based on your income and other gains, but the action itself is simply a sale followed by tax reporting.
Key Takeaways
- You must actually sell the security to lock in a loss; holding it and hoping for recovery does not create a tax deduction.
- The wash-sale rule prevents you from buying back the same security within 30 days before or after the sale, or the loss is disallowed.
- You can use losses to offset gains from the same year, then carry unused losses forward indefinitely to future years.
- Harvesting works best when you have investment gains to offset or ordinary income above $3,000 in a given year.
Identifying which positions to harvest
Start by reviewing your portfolio for any security trading below your cost basis—the price you originally paid. Most brokerages show this information in your account dashboard or in year-end statements. Look for positions where the loss is meaningful relative to your tax situation: a $200 loss on a $10,000 position may not be worth the effort, but a $5,000 loss often justifies the transaction.
Consider which losses will be most useful to you this year. If you have $8,000 in capital gains from other sales, a $5,000 loss will offset most of them. If you have no gains but earned $75,000 in salary, a $3,000 loss will reduce your taxable ordinary income by that amount, and you can carry the remaining $2,000 forward. The order matters: losses first offset gains, then ordinary income up to $3,000 per year.
Avoid harvesting losses in tax-advantaged accounts like 401(k)s or IRAs. Losses in those accounts cannot be used for tax purposes because the accounts themselves are tax-deferred or tax-free. Only losses in taxable brokerage accounts count.
The wash-sale rule and how to avoid it
The wash-sale rule is the main trap in tax loss harvesting. If you sell a security at a loss and buy back the same security (or a substantially identical one) within 30 days before the sale or 30 days after, the IRS disallows the loss. The 30-day window runs from 30 days before the sale through 30 days after—a total span of 61 days during which you cannot repurchase.
The rule applies to the same security and to substantially identical securities. Buying the same stock back is obviously prohibited. Buying an identical mutual fund or ETF is also prohibited. However, buying a different fund that tracks the same index—for example, selling Vanguard's S&P 500 ETF and buying Fidelity's S&P 500 ETF—is generally permitted because the funds are not considered substantially identical, even though they hold nearly the same stocks.
If you violate the wash-sale rule, the loss is disallowed in the year you sold, but the disallowed loss is added to the cost basis of the replacement security you bought. This means you do not lose the tax benefit entirely; you simply defer it until you eventually sell the replacement at a gain or loss. Still, deferring a loss is usually not your goal, so tracking the 30-day window is important.
Executing the sale and documenting the loss
Once you have identified a position to harvest, place a sell order through your brokerage just as you would for any other sale. Most brokerages settle trades within two business days. After the sale settles, the loss is locked in and the cash sits in your account.
Your brokerage will send you a confirmation of the sale and, at year-end, will report the transaction on Form 1099-B (Proceeds from Broker and Brokerage Transactions). You will also receive a statement showing your cost basis and the realized loss. Keep these documents for your records. When you file your tax return, you or your tax preparer will enter the loss on Schedule D, matching the information from the 1099-B.
If you sold multiple positions or have gains and losses to net, the math can become complex. A spreadsheet tracking each sale—the date, the security, the cost basis, the sale price, and the gain or loss—makes tax time much simpler. Many tax software packages will import your 1099-B data automatically, reducing the chance of entry errors.
Reinvesting after a harvest
After you sell at a loss, you have cash in your account. The question is what to do with it. If you want to stay invested in the same asset class, you must wait out the 30-day wash-sale window before buying back the same security. During that window, you can reinvest in a similar but not substantially identical security—for example, a different S&P 500 fund, a total market fund, or a different sector.
Some investors use this window strategically. If you sold a concentrated position in a single stock at a loss, you might reinvest in a diversified index fund, improving your portfolio's balance while you wait. If you sold a bond fund, you might move into a different bond fund with a slightly different duration or credit quality. The goal is to stay invested without triggering the wash-sale rule.
After 30 days have passed since the sale, you can buy back the original security if you wish. By then, the wash-sale rule no longer applies. Some investors do buy back immediately; others stay with the replacement investment if it suits their portfolio better.
Timing and tax-year considerations
Tax loss harvesting can happen at any point during the year, but many investors focus on the final weeks of December. By late fall, you know roughly how much income you will earn and how many gains you have realized. This lets you calculate how much loss you need to offset them. If you are close to the $3,000 ordinary-income deduction limit, harvesting in December lets you use the loss in the current year rather than carrying it forward.
However, harvesting is not limited to year-end. If you realize a large gain in June from the sale of a stock, you can harvest losses in June or July to offset it. If you receive a bonus in October and expect to owe more tax, you can harvest losses in October or November. The key is matching the timing of the loss to the timing of the income or gain you want to reduce.
Keep in mind that losses carry forward indefinitely. If you harvest a $10,000 loss but only have $3,000 in gains and $3,000 in ordinary income to offset this year, the remaining $4,000 carries to next year. You do not lose it; you simply use it later.
Common mistakes and how to avoid them
The most common mistake is buying back the same security too quickly and triggering the wash-sale rule without realizing it. Set a calendar reminder for 30 days after the sale if you plan to reinvest in the same security. Some brokerages flag wash-sale violations at tax time, but by then the loss is already disallowed.
Another mistake is harvesting losses in the wrong account type. Losses in IRAs and 401(k)s cannot be used for tax purposes, so harvesting there wastes the opportunity. Only harvest in taxable accounts.
A third mistake is harvesting small losses that do not meaningfully reduce your taxes. If you harvest a $150 loss but pay a $10 commission to sell and another $10 to buy a replacement, you have only $130 in net tax benefit. If your tax rate is 22 percent, that $130 loss saves you about $29 in taxes—less than the transaction costs. Focus on harvesting losses large enough to justify the effort and any fees.
Frequently Asked Questions
Can I harvest losses in my spouse's account to offset my income?
No. Losses can only offset gains and income on the same tax return. If you file jointly with your spouse, losses from either spouse's account can offset gains or income from either account. But if you file separately, losses from your spouse's account cannot reduce your taxes.
What happens if I sell at a loss and the stock price rises the next day?
The loss is locked in and counts for tax purposes regardless of what happens to the price afterward. You have already realized the loss by selling. If you buy back at the higher price, you will have a new cost basis at that higher level, but the original loss is still valid and reduces your taxes this year.
Do I have to report the loss on my taxes, or does the brokerage do it for me?
Your brokerage reports the sale on Form 1099-B, which goes to the IRS. You must report the loss on Schedule D when you file your return. The IRS matches your return to the 1099-B, so if you do not report it, they will notice. A tax preparer or tax software will help you enter it correctly.
Can I harvest losses from mutual funds I own in a regular brokerage account?
Yes. Mutual funds held in taxable accounts are subject to the same tax loss harvesting rules as stocks and ETFs. Sell the fund at a loss, wait 30 days before buying back a substantially identical fund, and report the loss on Schedule D.
What if I have more losses than gains and income in a year?
You can deduct up to $3,000 of net losses against ordinary income in a single year. Any excess carries forward to the next year, where you can use it to offset gains or income again. This carryforward continues indefinitely, so you will eventually use all the losses unless you die before doing so.