Tax-Loss Harvesting: A Step-by-Step Guide to Reducing Portfolio Tax Burden
Tax-loss harvesting is one of the most practical strategies an investor can use to reduce the annual tax bite from a taxable brokerage account. At its core, it means intentionally selling investments that have fallen in value to realize a capital loss, then using that loss to offset taxable capital gains or ordinary income. Many investors hear the term and assume it requires complex software or a dedicated financial advisor, but the mechanism itself is surprisingly straightforward once you understand the sequence and the rules that govern it.
This article walks through exactly how tax-loss harvesting works, step by step, in a real-world portfolio. You will learn which market environments create the best opportunities, how to avoid the wash sale rule, and how to integrate the strategy into a broader plan for tax-efficient investing. By the end, you will have a clear framework for deciding when to act and when to stay put.
Quick Answer
![]()
Tax-loss harvesting is the practice of selling investments at a loss to offset capital gains and reduce your tax bill. You can apply it during market downturns or when specific holdings underperform, as long as you avoid buying a substantially identical security 30 days before or after the sale. The harvested losses first cancel out any capital gains and then up to $3,000 of ordinary income each year, with unused losses carrying forward indefinitely.
How Tax-Loss Harvesting Works
![]()
To understand the strategy, you first need to picture how capital gains and losses interact on your tax return. When you sell an investment for more than your cost basis, you generate a capital gain. When you sell for less, you generate a capital loss. The IRS allows you to net your total long-term and short-term gains and losses against each other. If your losses exceed your gains, you can use the excess to reduce your ordinary taxable income by up to $3,000 per year ($1,500 if married filing separately). Any remaining loss gets carried forward to future years, preserving its value over time.
Tax-loss harvesting deliberately creates that scenario. Instead of holding onto a losing position and hoping it recovers, you sell it and lock in the loss. The immediate benefit is a lower tax liability for the current year. You then reinvest the proceeds into another asset that maintains your desired portfolio exposure, keeping your long-term allocation intact while still claiming the loss for tax purposes.
The Role of Realized and Unrealized Losses
A loss on paper only matters for taxes once you realize it by selling. Watching a stock drop 20 percent does nothing for your tax bill until you execute a trade. Tax-loss harvesting is all about converting unrealized losses into realized losses in a controlled way. The temptation is to wait for a rebound, but in many cases, selling while the loss is meaningful can be more beneficial than gambling on a recovery that may take years.
Importantly, the loss is calculated against your adjusted cost basis, which includes reinvested dividends and any fees that affect the cost. Keep accurate records so you can determine the exact loss before you sell. If you use the average cost method for mutual funds, work with your custodian to understand your per-share basis; for stocks and ETFs, specific identification gives you the most control.
Step-by-Step Process for Tax-Loss Harvesting
![]()
Executing the strategy in a disciplined way prevents costly mistakes. Use the following sequence whenever you identify a candidate for harvesting.
1. Identify Positions With Unrealized Losses
Review your taxable brokerage account at regular intervals, especially after broad market dips or any sector-specific sell-off. Sort holdings by unrealized gain or loss. Focus on positions where the current market value is meaningfully below your cost basis. A loss of just a few cents per share might not justify the transaction costs or the effort, so many investors set a threshold, such as a loss of at least 5 to 10 percent.
2. Check Your Holding Period
The tax treatment differs for short-term losses (assets held one year or less) and long-term losses (held more than one year). Short-term losses offset short-term gains first, which are taxed at your ordinary income rate. Long-term losses offset long-term gains first, which enjoy lower tax rates. Harvesting short-term losses can be especially powerful because they can neutralize income taxed at a higher rate. If you have both types of gains, the netting rules automatically apply the most favorable pairing, so you rarely need to avoid harvesting simply because the holding period is short.
3. Decide the Lot to Sell
If you have purchased the same security at different times and prices, choose the specific lot that delivers the desired loss. Using specific identification superior to FIFO (first in, first out) because you can pick the shares with the highest cost basis, often those bought near a peak. Even if the overall position is in the green, you may hold a lot bought at a high price that is now underwater. Selling only that lot allows you to realize a loss while keeping most of your shares.
4. Place the Sell Order
Once you identify the lot, sell the shares and generate the realized loss. Confirm the trade details and record the exact date. The date is critical for wash sale calculations and for determining whether the loss is short-term or long-term. Execute during regular market hours to ensure a clean timestamp.
5. Reinvest Proceeds to Maintain Asset Allocation
You do not want to sit in cash for 31 days in most cases. Immediately purchase a replacement investment that keeps your target exposure but is not substantially identical to the security you sold. For example, if you sold a large-cap growth ETF tracking one index, you might buy a large-cap growth ETF tracking a different index with similar factor tilts. This maintains your market participation while you wait out the wash sale window.
6. Avoid the Wash Sale Rule
The wash sale rule disallows a loss if you buy a substantially identical security within 30 days before or after the sale date. That creates a 61-day window where you must be careful. A replacement ETF that follows a different benchmark, holds a different number of stocks or uses a different weighting methodology is generally acceptable. Purchasing the exact same ticker, an option to buy the same security, or a contract to acquire substantially identical stock will trigger a wash sale. If you do create a wash sale, the disallowed loss gets added to the basis of the new shares, deferring the tax benefit rather than eliminating it.
7. Document the Transactions
Keep records of the sale, the calculation of the loss, the lot identification and the reinvestment. Your brokerage will report the proceeds to the IRS on Form 1099-B, but you are responsible for correctly reporting basis and any wash sale adjustments. Good records also help you track carryforward losses for future years.
Market Conditions That Favor Tax-Loss Harvesting
![]()
While you can look for opportunities at any time, certain environments make tax-loss harvesting particularly valuable.
Broad Market Corrections and Bear Markets
During a market decline of 10 percent or more, many positions in a diversified portfolio will show losses. A systematic sweep through your holdings after a correction often uncovers the largest pool of harvestable losses. The key is acting before the market fully recovers; losses shrink as prices rise. Setting a calendar reminder to review the portfolio after sharp moves can help you act in a timely fashion.
Sector-Specific Downturns
Even when the overall market is up, certain sectors can fall sharply. Energy, technology, real estate or financial stocks routinely experience rotations that create losses in otherwise healthy portfolios. If you have a sector ETF or a concentrated position that has dropped due to news or earnings, consider harvesting the loss while maintaining broad exposure through a related fund.
Year-End Tax Planning
Many investors focus on tax-loss harvesting in November and December, once they can estimate their realized gains for the year. Selling losers before December 31 locks in the loss for that tax year. However, waiting until year-end can mean that some losses have already evaporated because prices partially recovered. The best practice is to harvest opportunistically throughout the year while keeping a master list of carryforward losses and realized gains so that you can fine-tune in the final quarter.
High-Income Years
If you anticipate an unusually high ordinary income year, perhaps due to a bonus, the sale of a business, or a Roth conversion, the ability to offset up to $3,000 of ordinary income with capital losses becomes more valuable. Harvesting losses deliberately to maximize that $3,000 deduction can trim the tax on wages at your marginal rate, which might be 24 percent or higher. The same losses would be worth less in a year when you only have long-term capital gains taxed at 15 or 20 percent.
Concentrated Stock Positions
Employees or founders holding a single stock that has fallen from its peak can use tax-loss harvesting to reduce exposure and generate losses. Because the wash sale rule treats options and warrants as substantially identical, careful planning is necessary, but the strategy can be paired with a gradual diversification plan to manage both risk and taxes.
Offsets, Carryforwards and the $3,000 Limit
![]()
Understanding the math of netting and carryforwards allows you to size your harvesting appropriately.
First, net all short-term gains against short-term losses and long-term gains against long-term losses. Then net any remaining amounts across holding periods. If the final result is a net loss, you can deduct up to $3,000 from your ordinary income. The excess does not expire; it rolls to the next year and retains its character (short-term or long-term) for future netting.
For example, if you have $10,000 in net short-term losses and no gains, you deduct $3,000 on this year’s return and carry forward the remaining $7,000 as a short-term capital loss to next year. Next year, that $7,000 will offset any short-term gains first, then any long-term gains, and any leftover again works against ordinary income up to the limit. This rolling benefit means that even a single large harvesting event can shield income for several years.
The $3,000 figure has not been indexed for inflation and has remained unchanged for decades, so its real value declines over time. Still, in the right bracket it saves real dollars today.
Tax-Loss Harvesting and Different Account Types
![]()
The strategy applies only to taxable accounts. IRA, 401(k), and other tax-advantaged retirement accounts do not generate taxable gains or losses when you sell investments inside them. Harvesting cannot lower the tax on a Roth IRA withdrawal because qualified distributions are tax-free anyway.
However, there is one important caution: buying the same fund inside an IRA within 30 days of selling it at a loss in a taxable account can trigger a wash sale under IRS rules. The IRS has ruled that a purchase in an IRA can be considered substantially identical. If you plan to harvest a loss in a taxable account, avoid buying the same security in any retirement account during the 61-day window. Some investors choose different funds altogether for tax-advantaged accounts to keep harvesting simpler.
Advanced Considerations for a Tax-Efficient Portfolio
![]()
Once you are comfortable with basic harvesting, you can incorporate it into a broader framework.
Direct Indexing and Automated Harvesting
Direct indexing platforms buy the individual stocks of an index, which creates dozens or hundreds of tax lots instead of a single fund. That granularity increases the number of harvesting opportunities because some stocks will be down even when the index is up. Automated software can harvest losses daily while managing wash sales and replacements. If you have a large enough portfolio, this can provide a steady stream of losses without you having to monitor every position.
Tax-Loss Harvesting Paired With Gains
In years when you have large realized gains, you can “spend” your harvested losses to offset them at no tax cost. That means you can rebalance out of highly appreciated positions or take profits without triggering a tax bill. Investors who donate appreciated shares to charity or use a donor-advised fund sometimes offset the remaining gains with losses to stay under certain tax thresholds. This pairing turns harvesting from a defensive move into a strategic tool for portfolio repositioning.
State Tax Implications
Most states that impose an income tax follow the federal treatment of capital gains and losses, but a few states have different rules, such as limiting the deductibility of capital losses or not allowing carryforwards. If you live in a state with an income tax, verify how your state treats realized losses before assuming the full benefit will flow through. Adjust your harvest plan if the state-only tax savings are small.
Common Mistakes to Avoid
![]()
Even experienced investors can stumble with tax-loss harvesting if they overlook the details.
- Accidentally triggering a wash sale by repurchasing the same CUSIP within 30 days, including through dividend reinvestment plans.
- Harvesting losses that are too small to justify transaction costs or bid-ask spreads, especially in thinly traded securities.
- Overcorrecting the portfolio’s risk exposure with a replacement that drifts too far from the original, causing a permanent deviation from the target asset allocation.
- Neglecting to adjust cost basis records for wash sale disallowances, which can lead to an incorrect basis on the replacement shares and a larger gain when sold later.
- Harvesting a loss on a position that would have been better donated directly to charity, where you avoid the capital gains tax entirely and get a fair-market-value deduction if you itemize.
- Waiting until the last week of December and discovering that settlement dates or low liquidity make it impossible to execute the plan before year-end.
When Not to Harvest
![]()
Tax-loss harvesting is not always the right move. If you are in the lowest income tax brackets and have little or no realized gains, the immediate benefit of a $3,000 ordinary income deduction may be minimal. The transaction costs and the mental effort may not be worth the modest tax savings. Additionally, if your outlook on a beaten-down security is extremely bullish and you believe it is about to recover sharply, you may decide the opportunity cost of being out of the stock for 31 days outweighs the tax benefit. Tax considerations should support your investment goals, not override them.
Investors subject to the alternative minimum tax should also check whether the harvested losses will actually reduce their AMT liability, because the rules can be slightly different. A professional review is wise if AMT is in play.
Conclusion
![]()
Tax-loss harvesting is a repeatable, rules-based way to turn market downturns and underperforming positions into a permanent tax advantage. By systematically reviewing your portfolio, selling specific lots at a loss, reinvesting in a comparable but not identical asset, and carefully observing the wash sale window, you can offset gains and reduce ordinary income year after year. The strategy works best during corrections, sector slumps, year-end planning and high-income years, and it scales from small individual portfolios to automated direct indexing accounts. Used thoughtfully, tax-loss harvesting belongs in the toolkit of any investor who wants to keep more of what the market gives back.
FAQ
![]()
What is the biggest risk of tax-loss harvesting?
The biggest risk is accidentally triggering a wash sale, which defers the tax benefit and can create recordkeeping complications. A secondary risk is replacing a sold position with an asset that performs very differently, causing unintended shifts in your portfolio’s risk exposure. Both can be managed with careful trade execution and documentation.
How does the wash sale rule affect tax-loss harvesting?
The wash sale rule disallows a loss if you buy a substantially identical security 30 days before or after the sale. The disallowed loss is added to the cost basis of the new shares. You can still harvest effectively by buying a similar but not identical replacement and waiting at least 31 days before repurchasing the original.
Can I use tax-loss harvesting in a Roth IRA or 401(k)?
No. Tax-loss harvesting only applies to taxable brokerage accounts. Retirement accounts grow tax-deferred or tax-free, so selling inside them does not generate a taxable event you can use to offset other income. However, buying the same security in an IRA can create a wash sale with a taxable account under current IRS interpretation.
Do I need a large amount of losses for this strategy to matter?
Not necessarily. Even a few thousand dollars in realized losses can offset short-term gains or reduce ordinary income by up to $3,000, often saving hundreds of dollars in taxes. Over many years, consistent small harvesting adds up. The value depends on your marginal tax rate and the size of any capital gains you need to neutralize.
When is the best time of year to start tax-loss harvesting?
The best approach is to monitor opportunities year-round, especially after market pullbacks, because waiting until December can mean missed losses if prices rebound. Year-end is still the final opportunity to lock in losses for the current tax year, so many investors do a thorough review in late November or early December after confirming their estimated gains.
Can tax-loss harvesting eliminate all taxes on my investments?
It cannot eliminate all taxes because losses can only offset gains and a limited amount of ordinary income. You still owe tax on net gains above the amount you can offset. However, harvesting can significantly defer and reduce taxes, and in some years it can push your taxable investment income to zero, especially when combined with tax-efficient fund selection and buy-and-hold strategies.