How tax loss harvesting works in practice
Tax loss harvesting means selling an investment at a loss, then using that loss to reduce the taxes you owe on investment gains elsewhere. The mechanics are straightforward: you sell a security (stock, bond, mutual fund, or ETF) that has dropped in value since you bought it, lock in the loss on paper, and report it when you file taxes. The IRS lets you use losses to cancel out 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 tax year.
The process itself takes minutes — you place a sell order through your brokerage account the same way you would any other trade. The real work is deciding which positions to sell and what to buy next, because the IRS has a rule called the wash-sale rule that blocks you from buying back the same or substantially identical security within 30 days before or after the sale. That restriction is why tax loss harvesting requires planning, not just impulse.
Key Takeaways
- You sell a losing investment, report the loss on your tax return, and use it to offset gains from winning investments or up to $3,000 of regular income.
- The wash-sale rule prevents you from buying back the same security for 30 days before or 30 days after the sale, so you must substitute a similar but not identical investment.
- Tax loss harvesting only works if you have gains to offset or income high enough to benefit from the $3,000 annual deduction; it saves no taxes if you have neither.
- You must track the cost basis of every security you own and the exact date you sell it, because the IRS requires this documentation if you are audited.
- Losses can be carried forward to future years if they exceed your gains and the $3,000 deduction in the current year, so no loss is wasted.
Identifying which positions to harvest
Start by reviewing your entire portfolio and identifying every position trading below what you paid for it. Your brokerage account should show you the cost basis (the price you paid) and the current value for each holding. The difference is your unrealized loss — the loss you have on paper but have not locked in yet.
Prioritize positions with the largest losses first, because they save you the most in taxes. A $5,000 loss saves you roughly $1,200 in federal taxes if you are in the 24% bracket; a $1,000 loss saves roughly $240. But also consider which positions you are least confident about going forward. If you own a stock that has fallen 40% and you no longer believe in the company, harvesting that loss and moving the money to a fund you trust is a two-for-one win: you lock in the loss and improve your portfolio at the same time.
Do not harvest losses just because they exist. If a position has fallen slightly but you still want to own it, and you have no gains to offset, harvesting creates paperwork and wash-sale complexity for no tax benefit. Wait until you have a reason — either a gain to offset or enough losses to use the $3,000 annual deduction against ordinary income.
Understanding the wash-sale rule and substitution
The wash-sale rule is the IRS's way of preventing you from claiming a loss and then immediately buying back the same investment. If you sell a security at a loss and buy it back (or buy a substantially identical security) 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 calendar days.
The rule applies to securities you buy yourself and to automatic reinvestments. If you sell a mutual fund at a loss on December 15 and that fund automatically reinvests dividends on December 20, you have triggered a wash sale. The rule also applies to securities you own in joint accounts or accounts held by your spouse, so coordinate with a partner if you share finances.
To avoid a wash sale, you must substitute a substantially different security. For stocks, this usually means buying a different company's stock in the same sector, or a sector ETF instead of an individual stock. For bonds, it means buying a bond with a different maturity date, issuer, or credit rating. For mutual funds, it means switching to a fund with a different investment strategy or manager. The IRS does not define "substantially identical" with a bright line, so when in doubt, choose a substitute that is clearly different in holdings, strategy, or risk profile.
Some investors use this substitution as an opportunity to rebalance. If you sell a losing tech stock, you might buy a healthcare ETF instead — locking in the loss while shifting your portfolio toward a sector you want more exposure to. Others simply buy a similar but not identical fund in the same category and switch back after 30 days.
Timing the sale and tracking dates
The date you sell matters because it determines when the wash-sale window opens and closes. If you sell on December 15, you cannot buy back the same security until January 15 of the following year (30 days after the sale). If you want to buy back sooner, you must wait until 30 days before the original sale — meaning you could have bought a substitute on November 15 without triggering a wash sale.
Record the exact date of every sale in a spreadsheet or your brokerage's tax records. Include the security name, the number of shares sold, the sale price, the cost basis, and the loss amount. Also record the date you buy the substitute security and mark your calendar for when the 30-day window closes. This documentation protects you if the IRS audits your return, because you will need to show that you did not violate the wash-sale rule.
Many brokerages now flag wash-sale violations automatically when you place a trade, so you may get a warning before you accidentally trigger one. But the warning is a courtesy, not a may provide — the IRS still enforces the rule, and it is your responsibility to track it correctly.
Reporting losses on your tax return
When you file taxes, you report all investment sales on Schedule D (Capital Gains and Losses), which is part of Form 1040. You list each sale separately: the security name, the date acquired, the date sold, the proceeds (what you sold it for), the cost basis (what you paid), and the gain or loss.
Your brokerage sends you a Form 1099-B in January showing all the sales you made in the previous year. The IRS receives a copy too. If your brokerage has your correct cost basis on file, the 1099-B will show it; if not, you will need to calculate it yourself and enter it on Schedule D. The difference between proceeds and cost basis is your gain or loss for that position.
Once you have listed all sales, you total your long-term gains (sales held over one year) and short-term gains (sales held under one year) separately. Then you subtract losses from gains in the same category first — long-term losses against long-term gains, short-term losses against short-term gains. If you have a net loss after that, you can deduct up to $3,000 against ordinary income (wages, salary, interest) in that tax year. Any loss beyond $3,000 carries forward to the next year, where you can use it again.
When tax loss harvesting saves money and when it does not
Tax loss harvesting only saves you money if you have one of two things: investment gains to offset, or enough income to benefit from the $3,000 annual deduction. If you have neither, harvesting creates no tax benefit.
Example: You have $10,000 in investment gains and $8,000 in losses. You harvest the losses, which cancel out $8,000 of the gains, leaving you with $2,000 in taxable gains instead of $10,000. At a 15% long-term capital gains rate, you save $1,200 in taxes. That is a real benefit.
Counter-example: You have no investment gains, your income is $50,000, and you have $5,000 in losses. You harvest the losses and deduct $3,000 against your $50,000 salary, reducing your taxable income to $47,000. The remaining $2,000 loss carries forward to next year. At a 22% tax bracket, you save $660 this year. The $2,000 loss is still valuable — you will use it next year — but the benefit is spread out.
If you have no gains and your income is too low to benefit from the deduction, harvesting still preserves the loss for future years. But there is no immediate tax savings, so the effort is only worthwhile if you were planning to sell the position anyway.
Frequently Asked Questions
Can I harvest losses in a retirement account like a 401(k) or IRA?
No. Retirement accounts are tax-deferred, so losses inside them do not create a tax deduction. The IRS does not allow you to harvest losses in these accounts because you are not paying taxes on gains inside them either. Tax loss harvesting only works in taxable brokerage accounts.
What happens if I accidentally trigger a wash sale?
The IRS disallows the loss in the year you sell, but the loss does not disappear. Instead, it gets added to the cost basis of the replacement security you bought. When you eventually sell that replacement at a gain or loss, the disallowed loss reduces your gain or increases your loss. The tax benefit is delayed, not lost.
Do I have to report tax loss harvesting to the IRS, or only when I file my return?
You report it only on your tax return when you file. There is no separate form or notification required. Your brokerage sends you a 1099-B showing the sale, and you enter the loss on Schedule D. The IRS matches your return against the 1099-B to check for accuracy.
Can I harvest losses in my spouse's account if we file taxes jointly?
You can harvest losses in your spouse's account, but the wash-sale rule still applies across both accounts. If your spouse sells a security at a loss and you buy the same or substantially identical security within 30 days, the wash sale is triggered. Coordinate with your spouse to avoid this.
What if I sell at a loss and the price drops even further after the sale?
You have locked in your loss at the sale price, so further drops do not affect your tax deduction. If the price rises after the sale, you have simply sold at the wrong time — but you still get the tax benefit from the loss you did realize. This is why tax loss harvesting is about taxes, not market timing.