Tax-loss harvesting involves two steps. First, you sell investments at a loss to offset capital gains or a portion of ordinary income. Then, you reinvest the proceeds in a similar but not identical position to keep your portfolio working. The reinvestment step distinguishes it from simply selling at a loss. It preserves your long-term investment strategy while capturing a tax benefit. Any investor with a taxable brokerage account can use tax-loss harvesting to reduce tax bills or generate carryforward losses.
A financial advisor can help you identify which positions to harvest, manage the wash-sale rules and reinvest proceeds in a way that keeps your long-term strategy intact.
How Tax-Loss Harvesting Works
Tax-loss harvesting begins with identifying a position in your taxable account that has declined in value, selling it to realize the loss and reinvesting the proceeds in a similar but not substantially identical investment. That reinvestment step is what separates harvesting from simply selling at a loss. It keeps your portfolio aligned with your investment strategy while locking in the tax benefit.
Realized losses offset realized gains dollar for dollar, with no annual cap on the amount of gains you can offset. When losses exceed gains, up to $3,000 of the excess can be applied against ordinary income in the same tax year, and anything beyond that carries forward indefinitely to offset gains or income in future years.
The IRS applies a categorization rule to how losses are used. A loss does not simply reduce the total pool of gains. It must first work through gains of the same holding period before any excess can move across to the other category. A long-term loss that exceeds available long-term gains, for example, can then reduce short-term gains with whatever remains.
To see how this plays out, consider an investor who realizes $30,000 in losses and $25,000 in capital gains in the same tax year. The losses fully offset the gains, leaving $5,000 remaining. Of that, $3,000 can be applied against ordinary income for the year, and the remaining $2,000 carries forward to future tax years retaining its short-term or long-term character. 1
One important limitation is that tax-loss harvesting applies only to taxable accounts. Losses inside an IRA, 401(k) or Roth account cannot be harvested because gains in those accounts are already sheltered from annual capital gains taxation.
The Wash-Sale Rule and How to Avoid It

The wash-sale rule sets boundaries within which tax-loss harvesting must operate. The IRS prohibits claiming a loss on a sale if the same or a substantially identical security is purchased within 30 days before or after the sale. 2 The 30-day window applies in both directions. This creates a 61-day period during which the replacement purchase must be carefully managed.
What counts as substantially identical? The same stock, the same mutual fund or options ,and contracts on the same security. What does not count includes a different ETF tracking a similar but distinct index, a stock in the same sector as the one sold or a fund from a different provider with meaningfully different holdings. For example, selling one S&P 500 index fund and buying a total market index fund from a different provider. This is generally acceptable, because the underlying indexes and holdings differ.
The wash-sale rule also applies across all accounts owned by the taxpayer and their spouse, including IRAs. This means a loss harvested in a taxable brokerage account can be disallowed if the same security is repurchased in a spouse’s IRA within the window. Automatic dividend reinvestment is a common source of inadvertent wash sales, since reinvested dividends count as purchases.
A practical substitution might look like an investor selling a total stock market index fund to harvest a loss. Then they buy a large-cap index fund during the 30-day window to maintain market exposure. After the window closes, they can switch back to the original total market fund if desired.
If a wash sale is triggered, the disallowed loss is not permanently lost. Instead, it is added to the cost basis of the replacement security. This defers the tax benefit until you eventually sell the replacement.
Investment Benefits of Tax-Loss Harvesting
The most immediate benefit of tax-loss harvesting is a reduction in the current year’s tax bill. By offsetting realized gains, the strategy reduces capital gains taxes owed. Excess losses applied to ordinary income can further reduce the year’s tax liability, up to the $3,000 annual limit, with any remaining balance carried forward to future years.
Beyond the immediate savings, money that would have gone to taxes stays invested and continues compounding. A dollar kept in a portfolio today grows over time, while a dollar paid in taxes does not. The longer the deferral period before the tax is eventually paid, the larger the compounding advantage, particularly for investors with long time horizons.
Tax-loss harvesting also pairs naturally with portfolio rebalancing. When a position has fallen in value and drifted below its target weight, selling it generates a harvestable loss while simultaneously creating proceeds that can be redeployed toward underweighted parts of the portfolio. The same logic applies to exiting an overvalued or high-risk position, which becomes more financially attractive when the sale produces a tax offset.
Loss carryforwards extend the benefit well beyond the current tax year. Accumulated losses from a down market build a reserve that can be applied against future gains, whether from a business sale, a real estate transaction or the unwinding of a large concentrated stock position. For investors who anticipate a significant capital event in coming years, harvesting losses earlier creates more room to maneuver when that moment arrives.
The strategy tends to deliver the most value to investors in higher tax brackets, those with substantial realized gains in the same year and those who rebalance frequently or actively trade in taxable accounts. The higher the marginal rate and the larger the gains to offset, the more meaningful the dollar savings. Investors in the 0% long-term capital gains bracket see little federal benefit since there is no tax liability to reduce.
Tax-Loss Harvesting Strategy Tips
Effective tax-loss harvesting requires attention throughout the year, not just in December. Market selloffs can occur in any month, and a loss that surfaces in March carries the same value as one identified in November. Investors who review taxable accounts on a regular basis are better positioned to act when opportunities emerge rather than scrambling at year-end.
Coordinating harvesting with scheduled portfolio rebalancing makes the process more efficient. Selling a position that has declined and fallen below its target allocation generates a tax benefit while simultaneously freeing up proceeds to bring the investment portfolio back into balance, accomplishing two objectives without additional trading.
Navigating the wash-sale window requires deliberate planning. Repurchasing the same security too soon after a sale voids the loss for tax purposes, so investors need a clear plan for what to hold during the restricted period. Accounts with automatic dividend reinvestment require particular attention since reinvested dividends count as purchases and can inadvertently restart the clock. Identifying suitable replacement securities ahead of time allows proceeds to be reinvested promptly, limiting the period when the portfolio carries unintended gaps in market exposure.
Before harvesting any position, it is worth modeling the downstream tax consequences. Replacing a security at a lower cost basis means a larger gain on the eventual sale of the replacement. The strategy moves a tax liability forward in time rather than removing it, and while that deferral can still produce real value through compounding and bracket management, investors should plan for it explicitly rather than treating harvested losses as permanent savings.
Investment rationale should always drive the decision to sell. Harvesting a loss in a position that no longer fits the portfolio is sound practice, but selling purely because a holding is down, without a clear view of what comes next, can introduce more risk than the tax savings justify. The tax benefit works best as a secondary consideration that makes a sound investment decision more attractive, not as the reason for making it in the first place.
For high-net-worth investors, direct indexing expands what is possible by holding individual stocks within an index-like structure rather than a single fund. Each holding can be evaluated and sold on its own terms, which means harvesting opportunities surface more often and at a finer level of granularity. Over a full market cycle, this approach tends to generate larger cumulative tax benefits than fund-based strategies, particularly when individual securities within an index move in meaningfully different directions.
Limitations and When Tax-Loss Harvesting May Not Make Sense
Tax-loss harvesting isn’t for every investor, and several situations exist where the strategy may produce limited or no benefit. Tax-deferred accounts are not eligible. You cannot harvest losses inside an IRA, 401(k), 403(b) or Roth account since those accounts are not subject to annual capital gains taxation in the first place.
For small positions or small losses, transaction costs and administrative complexity can offset the tax benefit. While many brokerages now offer commission-free trades, bid-ask spreads, fund expense ratios and the time required to manage the strategy can still matter at smaller dollar amounts.
Future tax rate risk is another consideration. If tax rates go up before using a carryforward, the deferred liability grows in value. But, if the investor expects to move into a lower tax bracket in retirement, harvesting losses today may be less valuable than realizing them later.
The interaction between short-term and long-term gains also affects efficiency. The IRS taxes short-term gains at ordinary income rates, which can be substantially higher than long-term capital gains rates. A short-term loss is most valuable when it offsets a short-term gain. If the investor only has long-term gains to offset, a short-term loss is less efficient than a long-term loss would be in the same role.
Behavioral risk is harder to quantify. Selling positions during market downturns to harvest losses can feel difficult, and the strategy requires the discipline to immediately reinvest. Investors who hesitate to reinvest may miss the rebound and lose far more than they save in taxes.
Tax-loss harvesting delivers different results depending on where a taxpayer sits in the rate structure. Those in the 0% long-term capital gains bracket get no federal benefit from harvesting long-term losses against long-term gains since there is no tax to offset, though if those losses exceed available long-term gains the remainder can still be applied against short-term gains or up to $3,000 of ordinary income where a liability does exist. State tax treatment adds another layer of complexity, as some states do not conform to federal loss carryforward rules, which can reduce the strategy’s value for residents of those states regardless of their federal bracket.
Bottom Line

Tax-loss harvesting can be a meaningful tool for investors with taxable brokerage accounts, offering an opportunity to reduce current-year taxes, defer liability and reinvest savings for long-term growth. The strategy works best when integrated with regular portfolio management, executed with care around the wash-sale rule and approached as a complement to investment decisions rather than a driver of them. Like most tax strategies, the value depends on the investor’s tax bracket, account mix and time horizon, making it worthwhile to evaluate the approach in the context of an overall financial plan.
Investment Planning Tips
- A financial advisor can review your taxable accounts, flag harvesting opportunities throughout the year and coordinate the reinvestment step with your broader portfolio goals. Finding a financial advisor doesn’t have to be hard. SmartAsset’s free tool matches you with vetted financial advisors who serve your area, and you can have a free introductory call with your advisor matches to decide which one you feel is right for you. If you’re ready to find an advisor who can help you achieve your financial goals, get started now.
- When you harvest a loss, you need to reinvest the proceeds in something new, which creates an opportunity to strengthen your portfolio by diversifying. Here is a roundup of 13 investments to consider to help you do that.
Photo credit: ©iStock.com/Jirapong Manustrong, ©iStock.com/seb_ra, ©iStock.com/Chalirmpoj Pimpisarn
Article Sources
All articles are reviewed and updated by SmartAsset’s fact-checkers for accuracy. Visit our Editorial Policy for more details on our overall journalistic standards.
- “Topic No. 409, Capital Gains and Losses | Internal Revenue Service.” Home, https://www.irs.gov/taxtopics/tc409. Accessed May 26, 2026.
- “Investment Income and Expenses.” Internal Revenue Service, https://www.irs.gov/pub/irs-pdf/p550.pdf. Accessed May 26, 2026.
