You watched your investments drop and felt the sting of losses you never wanted. But here is the part most investors miss entirely: those losses can actually save you money on your tax bill — if you know how to use them. Tax-loss harvesting turns a bad market moment into a real financial tool, and ignoring it means leaving money on the table every single year.
This guide explains exactly how tax-loss harvesting works, who it benefits most, the rules you must follow to stay on the right side of the IRS, and how to decide whether it makes sense for your situation.
What Is Tax-Loss Harvesting?
Tax-loss harvesting is the practice of selling an investment that has declined in value to realize a capital loss, then using that loss to offset capital gains you have earned elsewhere in your portfolio — reducing your taxable income and, by extension, your tax bill.
The IRS allows taxpayers to use capital losses to offset capital gains dollar for dollar. If your losses exceed your gains, you can deduct up to $3,000 of the remaining losses against ordinary income each year. Any losses beyond that carry forward indefinitely into future tax years.
This strategy only applies to taxable brokerage accounts. It does not work inside tax-advantaged accounts like 401(k)s, IRAs, or Roth IRAs because those accounts are not subject to capital gains tax in the first place.
How Tax-Loss Harvesting Works Step by Step
Walk through a concrete example. Suppose you hold two stocks in a taxable brokerage account. You sell Stock A for a $8,000 gain and Stock B — which has underperformed — at a $5,000 loss. Your net taxable capital gain is now $3,000 instead of $8,000. At a 15% long-term capital gains rate, that single move saves you $750 in taxes.
After selling the losing position, you have two choices. You can leave the cash in the account, or you can immediately reinvest in a similar — but not identical — asset to maintain your market exposure. The goal is to keep your portfolio working while still claiming the tax benefit.
For example, if you sell a Total Stock Market ETF at a loss, you might purchase a different broad-market ETF from another fund family. You stay invested, preserve your asset allocation, and still lock in the loss for tax purposes. The IRS does not care that you bought a similar investment — it cares whether you bought the same or substantially identical one, which triggers the wash-sale rule covered in the next section.
Many major brokerages, including Fidelity, Schwab, and Vanguard, allow you to execute this manually. Robo-advisors like Betterment and Wealthfront automate the process continuously throughout the year as part of their service offering.
The Wash-Sale Rule: The Trap You Must Avoid
The wash-sale rule is the IRS guardrail designed to prevent investors from claiming a tax loss while immediately buying back the same investment. Under IRS Publication 550, if you sell a security at a loss and purchase a “substantially identical” security within 30 days before or after the sale, the loss is disallowed for tax purposes.
That 30-day window runs in both directions — 30 days before the sale and 30 days after. The total restricted window is 61 days. The disallowed loss is not gone forever; it gets added to the cost basis of the replacement security, which reduces your gain (or increases your loss) when you eventually sell that replacement. But it does eliminate your ability to use that loss in the current tax year, which defeats the purpose of harvesting.
What counts as “substantially identical” is not always obvious. Selling one share class of a mutual fund and buying another share class of the same fund is a wash sale. Selling a stock and buying call options on the same stock likely qualifies. Selling an S&P 500 ETF from one provider and buying an S&P 500 ETF from another provider is widely considered acceptable — but selling an S&P 500 ETF and immediately buying a nearly identical S&P 500 fund from the same provider is riskier territory. When in doubt, consult a tax professional.
Short-Term vs. Long-Term Losses: Why It Matters
Not all capital losses are created equal, and the order in which losses offset gains makes a meaningful difference to your actual tax savings.
Short-term gains — from assets held one year or less — are taxed at ordinary income tax rates, which range from 10% to 37% depending on your bracket. Long-term gains — from assets held more than one year — are taxed at preferential rates of 0%, 15%, or 20%. The IRS requires that short-term losses offset short-term gains first, and long-term losses offset long-term gains first. Excess losses from one category then cross over to offset the other.
This means a short-term loss used to offset a short-term gain is especially valuable because it eliminates income that would have been taxed at your highest marginal rate. A long-term loss used to offset a long-term gain is still useful, but saves less per dollar because long-term gains face lower rates to begin with.
| Loss Type | Offsets First | Tax Rate Avoided | Relative Value |
|---|---|---|---|
| Short-term loss | Short-term gains | 10%–37% (ordinary income) | Higher — saves more per dollar |
| Long-term loss | Long-term gains | 0%, 15%, or 20% | Lower — still beneficial |
| Excess short-term loss | Long-term gains | 0%, 15%, or 20% | Moderate |
| Excess long-term loss | Short-term gains | 10%–37% (ordinary income) | Higher when crossed over |
| All remaining losses | Ordinary income (up to $3,000/yr) | Your marginal rate | Depends on income bracket |
You can review the current capital gains tax brackets directly on the IRS Topic 409 page to confirm your applicable rate before making any harvesting decisions.
Who Benefits Most from Tax-Loss Harvesting?
Tax-loss harvesting is not a one-size-fits-all strategy. It delivers the most value to specific types of investors.
High-income earners in the 32%–37% brackets benefit the most because their capital gains — especially short-term — face the steepest tax rates. Eliminating a $10,000 short-term gain at 37% saves $3,700. That same elimination at a 12% bracket saves $1,200.
Investors with taxable brokerage accounts and active portfolios have the most opportunities to harvest. If your only investment account is a 401(k), this strategy simply does not apply to you.
Investors who actively rebalance or sell holdings for other reasons can time those sales to coincide with loss harvesting, combining two necessary actions into one tax-efficient move.
Investors in the 0% long-term capital gains bracket — single filers with taxable income below approximately $47,025 in 2024 — get little to no benefit from harvesting long-term losses because their gains would have faced no tax anyway. The SEC’s investor education resources provide additional context on how investment taxes apply across income levels.
If you are close to retirement and plan to convert to lower-income years soon, the math shifts. Harvesting losses now to offset gains now may be worth less than simply waiting until your bracket drops.
Real Limits and Risks to Understand First
Tax-loss harvesting is a legitimate and widely used strategy, but it has real constraints that are often glossed over in marketing materials from robo-advisors and financial platforms.
It defers taxes, it does not eliminate them. When you harvest a loss and reinvest in a replacement, your new position starts with a lower cost basis. That means when you eventually sell the replacement, you will owe taxes on a larger gain than you would have otherwise. The tax savings today are real — but so is the larger tax bill coming later. The benefit is in the time value of money: deferring taxes means you keep more capital working in the market longer.
The $3,000 annual deduction cap limits value for investors without gains to offset. If you have no capital gains and more than $3,000 in losses, the extra losses carry forward. They are not lost — but they do not help you immediately.
Transaction costs and complexity add up. Frequent trading to harvest losses can generate transaction fees (less common now with commission-free trading) and significantly increase your tax return complexity. If you use a robo-advisor for automated harvesting, confirm whether the service fee outweighs the harvesting benefit at your account size and tax bracket.
State taxes matter. Federal savings are the starting point, but your state may treat capital gains differently. California, for example, taxes all capital gains as ordinary income at rates up to 13.3%. Some states do not recognize the same loss carryforward rules as the federal government. Check your state’s rules before assuming the federal calculation translates dollar for dollar.
For anyone with a complex portfolio, multiple account types, or significant gains and losses in the same year, working with a CPA or fee-only financial advisor before executing harvesting trades is worth the cost. The IRS wash-sale rule in particular creates traps that are easy to stumble into when coordinating moves across multiple accounts.
Tax-loss harvesting is one of the few legal strategies that lets you benefit financially from investment losses. It requires attention to timing, an understanding of the wash-sale rule, and an honest look at whether your tax situation makes the effort worthwhile. Used correctly, it is a meaningful tool — not a magic solution, but a real edge for investors who take the time to use it.
Download the Free PaycheckGuide Budget Tracker →
Related: Capital Gains Tax Explained: Short-Term vs. Long-Term Rates and How to Plan Around Them