You sold a winning stock this year and watched your brokerage account light up green. Then tax season arrived, and a chunk of that profit vanished into a capital gains tax payment. If that scenario sounds familiar, you are not alone. Most investors focus on picking winners but ignore one of the most powerful tools sitting right inside their portfolio: tax-loss harvesting. This strategy lets you sell investments that are sitting at a loss, use those losses to offset your capital gains, and ultimately keep more of your returns. In this guide, you will learn exactly how tax-loss harvesting works, the rules you need to follow, the mistakes that trip up even experienced investors, and a step-by-step process to put this strategy to work in your own portfolio.
What Is Tax-Loss Harvesting?
Tax-loss harvesting is the practice of selling an investment that has declined in value below your purchase price, realizing that capital loss on paper, and using it to offset capital gains you have realized elsewhere in your portfolio. The core idea is straightforward: losses are not just bad news, they are a tax asset you can deploy strategically.
Here is a simple example. Suppose you bought shares of a technology ETF for $10,000 and they are now worth $7,000. At the same time, you sold another holding earlier in the year for a $4,000 gain. If you sell the ETF now, you lock in a $3,000 loss. That loss can offset $3,000 of your $4,000 gain, meaning you only owe capital gains tax on $1,000 instead of the full $4,000.
The strategy does not make losses disappear. It accelerates the tax benefit of those losses so you can reinvest the tax savings sooner. Over decades of compounding, that reinvested tax savings can add up to a meaningful difference in your portfolio value. Tax-loss harvesting is a cornerstone of tax-efficient investing and is used widely by robo-advisors, wealth managers, and savvy individual investors alike.
Why Tax-Loss Harvesting Matters
It Directly Reduces Your Tax Bill
The most immediate benefit is a lower tax payment. Short-term capital gains, those on assets held less than a year, are taxed at your ordinary income rate, which can be as high as 37% in the US. Long-term gains are taxed at 0%, 15%, or 20% depending on your income. By harvesting losses, you can offset these gains dollar for dollar, reducing or even eliminating your capital gains tax liability for the year.
It Lets You Carry Forward Unused Losses
If your realized losses exceed your realized gains in a given year, you can use up to $3,000 of the excess loss to offset ordinary income (such as your salary). Any losses beyond that carry forward indefinitely to future tax years. This means a rough year in the market is not just pain, it is a bank of future tax deductions waiting to be used.
It Improves After-Tax Compounding
The money you save on taxes stays invested. Even a 1% improvement in after-tax returns, compounded over 20 or 30 years, translates into significantly more wealth at the end. Research from Vanguard suggests that tax-loss harvesting can add between 0.20% and 1.50% in after-tax alpha per year, depending on market volatility and your tax bracket.
It Pairs Naturally with Portfolio Rebalancing
When your portfolio drifts from its target allocation, rebalancing often requires selling appreciated assets, which triggers capital gains. Tax-loss harvesting gives you an offset. You can rebalance more freely knowing that losses elsewhere in the portfolio will cushion the tax impact. This makes your overall portfolio rebalancing process more tax-efficient.
How to Implement Tax-Loss Harvesting
Step 1: Identify Positions Sitting at a Loss
Log into your brokerage account and sort your holdings by unrealized gain or loss. Look for positions that have declined meaningfully below your cost basis. Focus on positions where the loss is large enough to be worth acting on. A $50 loss on a $20,000 portfolio is not worth the effort, but a $2,000 loss on a $15,000 position is a real tax asset.
Pay attention to whether the loss is short-term (held less than one year) or long-term (held more than one year). Short-term losses are more valuable because they first offset short-term gains, which are taxed at higher ordinary income rates. If you have both short-term and long-term losses available, prioritize harvesting the short-term ones.
Step 2: Sell the Losing Position and Reinvest
Sell the position to realize the loss. This is the "harvesting" part. But here is the critical piece: you do not want to simply go to cash and sit on the sidelines. Markets can move quickly, and missing even a few days of upside can cost you more than the tax savings.
Instead, immediately reinvest the proceeds into a similar but not "substantially identical" investment. For example, if you sell the S&P 500 ETF (SPY), you could buy a total US stock market ETF (VTI) or an S&P 500 index fund from a different provider. The goal is to maintain your market exposure while satisfying the wash sale rule, which we cover next.
Step 3: Understand and Obey the Wash Sale Rule
The wash sale rule is the single most important regulation to understand. It states that if you sell a security at a loss and buy a "substantially identical" security within 30 days before or after the sale, the loss is disallowed for tax purposes. The IRS created this rule to prevent investors from selling just to claim a loss and immediately buying back the same thing.
The 30-day window applies in both directions, so the total exclusion period is actually 61 days (30 days before the sale, the sale day, and 30 days after). The rule also applies across all your accounts, including your IRA, your spouse's accounts, and any entity you control. If you sell SPY in your taxable account at a loss and buy SPY in your IRA the next day, the loss is disallowed.
To stay compliant, buy a different fund that gives you similar exposure. Swap a large-cap US ETF for another large-cap US ETF from a different index provider. Swap an international developed markets fund for a different international fund. The key is similar exposure, different security.
Real Examples
Consider an investor named Priya who holds a diversified portfolio across three ETFs in her taxable account. In October, her portfolio looks like this: a US large-cap ETF bought for $30,000 now worth $27,500 (a $2,500 loss), a bond ETF bought for $15,000 now worth $15,800 (an $800 gain she has not realized), and an international ETF she sold earlier in the year for a $4,000 gain. Without tax-loss harvesting, Priya owes capital gains tax on the full $4,000 gain.
By selling her US large-cap ETF and immediately buying a similar but not identical US large-cap fund, she realizes a $2,500 loss. This offsets her $4,000 gain, leaving only $1,500 in taxable gains. At a 15% long-term capital gains rate, she saves $375 in taxes this year. She reinvests that savings, and over 20 years at 8% annual returns, that single harvest grows into roughly $1,750 of additional portfolio value, all from one strategic move.
Now imagine she repeats this process every year the market gives her opportunities. Over a multi-decade investing career, the cumulative benefit can reach tens of thousands of dollars.
Common Mistakes
Mistake 1: Triggering a Wash Sale Accidentally
This is the most common error. You sell a position at a loss, then forget that your automatic dividend investing plan or your 401(k) buys the same fund within 30 days. The loss gets disallowed, and you have done paperwork for nothing. The fix is to pause any automatic purchases in the same or substantially identical securities during the 61-day wash sale window. Check all accounts, including retirement accounts and your spouse's accounts.
Mistake 2: Letting the Tax Tail Wag the Dog
Tax-loss harvesting is a tool, not a religion. Some investors sell positions at a loss even when those positions are core to their long-term strategy, then fail to reinvest properly and end up with a portfolio that no longer matches their asset allocation goals. Always prioritize your investment thesis over the tax benefit. If you believe in the position long-term, consider whether the tax savings justify the trade and the risk of being out of position.
Mistake 3: Ignoring Short-Term vs Long-Term Loss Priority
Short-term losses offset short-term gains first, then long-term gains. Since short-term gains are taxed at higher rates, harvesting short-term losses is more valuable per dollar. Some investors harvest long-term losses first because the positions have been underwater longer, but that is not always the optimal tax play. Run the numbers before you sell.
Mistake 4: Forgetting State Taxes
Federal capital gains tax gets all the attention, but many US states also tax capital gains, some at rates above 10%. The value of tax-loss harvesting increases in high-tax states like California, New York, and New Jersey. Factor in your state tax rate when estimating the benefit.
Mistake 5: Not Tracking Cost Basis Carefully
When you sell a losing position and buy a replacement, your new position has a lower cost basis (the price you paid for the replacement). This means when you eventually sell the replacement, you will owe more in capital gains. Tax-loss harvesting does not eliminate taxes, it defers them. Keep meticulous records of every trade's cost basis. Most brokerages track this automatically, but verify the numbers match your records.
Frequently Asked Questions
Is tax-loss harvesting worth it for small portfolios?
It depends on the size of your losses and your tax bracket. If you are in a low tax bracket and your losses total less than a few hundred dollars, the effort may not be worth it. But if you are in the 22% bracket or above and have losses of $1,000 or more, the savings add up quickly. Many robo-advisors now automate the process, making it accessible even for smaller accounts.
Can you tax-loss harvest in a retirement account like an IRA?
No. Tax-loss harvesting only works in taxable brokerage accounts. IRAs, 401(k)s, and other tax-advantaged accounts do not generate taxable gains or deductible losses. However, be aware that purchases in your IRA can trigger the wash sale rule for losses in your taxable account.
Does tax-loss harvesting work in a bull market?
Yes, even in strong bull markets, individual positions can be underwater. Sector rotation, individual stock declines, and bond market volatility all create harvesting opportunities even when the broad market is up. The key is to review your portfolio regularly, not just during downturns.
How often should you tax-loss harvest?
Most advisors recommend reviewing your portfolio for harvesting opportunities at least quarterly. Some automated platforms scan daily. The best approach depends on your portfolio size, trading costs, and how actively you manage your investments. At minimum, do a thorough review before year-end when you still have time to realize losses before the tax year closes.
What is the difference between tax-loss harvesting and tax-gain harvesting?
Tax-gain harvesting is the opposite strategy: intentionally realizing gains in years when your income is low enough that the gains are taxed at 0% (for example, during a gap year or early retirement). Both strategies are part of a broader portfolio tax optimization approach and can complement each other.
Key Takeaways
- Tax-loss harvesting offsets capital gains by selling losing positions, reducing your tax bill and keeping more money invested
- The wash sale rule prohibits buying a substantially identical security within 30 days before or after the loss sale, so swap into a similar but different fund
- Short-term losses are more valuable because they offset short-term gains taxed at ordinary income rates
- You can deduct up to $3,000 in net losses against ordinary income per year, with unlimited carryforward
- Always reinvest proceeds immediately to maintain your target asset allocation and market exposure
- Track cost basis meticulously because harvesting defers taxes rather than eliminating them
- Review your portfolio quarterly for harvesting opportunities, and always before year-end
References
- IRS Topic 409: Capital Gains and Losses: official IRS guidance on how capital gains and losses are taxed, including the $3,000 annual deduction limit
- Investopedia: Wash Sale Rule: detailed explanation of the wash sale rule, including examples and common pitfalls
- Vanguard: Tax-Loss Harvesting: research and resources on the after-tax benefits of systematic tax-loss harvesting
- MoneyFlock: Portfolio Rebalancing Guide: how rebalancing and tax-loss harvesting work together to optimize your portfolio