Nobody likes losing money in the market. But smart investors know a downturn can create a valuable tax break. Tax-loss harvesting is the strategy of selling investments at a loss to offset capital gains. It is like turning lemons into lemonade for your portfolio.
You do not need to be a tax expert to use this tool. The basic idea is simple. You sell a loser, book the loss, and use it to cancel out taxable gains from your winners.
It reduces your current tax bill by matching investment losses against gains.
The money you save on taxes stays invested and compounds over time.
The Basic Math: How Losses Offset Gains
The IRS has clear rules for this. You must first match short-term losses against short-term gains and long-term losses against long-term gains. If you have leftover losses, you can use them against the other type.
Short-term gains come from assets held one year or less. They are taxed at your ordinary income rate. Long-term gains get the lower capital gains rates of 0%, 15%, or 20%.
Imagine you sold Apple stock for a $6,000 short-term profit. You also hold Peloton stock with an $8,000 loss. By selling Peloton, you offset the entire Apple gain. You also get to deduct an extra $3,000 against your regular salary.
| Step | Loss Type | Gain Type It Offsets First | Tax Impact |
|---|---|---|---|
| 1 | Short-Term Loss | Short-Term Gain | Avoids high ordinary income tax rate |
| 2 | Long-Term Loss | Long-Term Gain | Avoids lower capital gains rate (still useful) |
| 3 | Remaining Loss (Any) | Opposite Gain Type | Cancels whatever taxable gain is left |
| 4 | Excess Loss (Up to $3,000) | Ordinary Income | Direct deduction from your salary or wages |
Any loss beyond the $3,000 limit does not disappear. It carries forward to future tax years. You can keep using it until the entire loss is absorbed.
The Wash Sale Trap: What Not To Do
The biggest mistake people make is triggering a wash sale. This happens when you sell a stock for a loss and then buy the same stock back within 30 days. Or you buy a substantially identical security.
The IRS disallows the loss if you break this rule. The disallowed loss gets added to the cost basis of the new shares. You do not lose the benefit forever, but you delay it.
You sell NVIDIA at a $5,000 loss on March 10. On March 25, you panic and buy NVIDIA again. The IRS says no. Your $5,000 loss is suspended. You can only claim it when you finally sell the new shares.
| Event | Date Window | Status |
|---|---|---|
| Sale of Stock at Loss | Day 0 (Trigger Date) | Start counting |
| Prohibited Re-Buy (Before) | 30 Days Before Sale | Wash sale if bought here too |
| Prohibited Re-Buy (After) | 30 Days After Sale | Wash sale if purchased |
| Safe Re-Buy Window | Day 31 Onwards | Loss is fully deductible |
The rule also covers your spouse's account and your IRA. Even buying an option to purchase the stock can trigger it. The IRS looks at all accounts you control.
Staying Invested: Swapping with Similar Funds
You want the tax benefit but you also do not want to leave the market for 31 days. The solution is buying a replacement asset that is not identical. This keeps your money working while you wait.
Many investors swap one S&P 500 fund for a different index tracker. A large-cap growth ETF can replace a similar technology fund. The performance tracks closely but the holdings differ enough to pass the wash sale test.
Sell the Vanguard S&P 500 ETF (VOO) at a loss. Immediately buy the iShares Core S&P 500 ETF (IVV). This is risky — index trackers are viewed as identical by some accountants. Instead, sell VOO and buy a Total Stock Market ETF like VTI. Different index, different holdings.
| Sell This (For a Loss) | Buy This (Safe Replacement) | Key Difference |
|---|---|---|
| S&P 500 ETF (VOO) | Total US Market ETF (VTI) | Large-cap vs. entire market exposure |
| Technology ETF (XLK) | Nasdaq-100 ETF (QQQM) | Sector-specific vs. broad tech-heavy index |
| Developed Markets ETF (VEA) | Total International ETF (VXUS) | Excludes emerging markets vs. includes them |
| High-Yield Bond ETF (HYG) | Investment Grade Corp Bond ETF (LQD) | Credit quality and risk profile differ |
If the replacement fund tracks a different index, you are probably safe.
If the replacement fund has a different manager and methodology, that is another layer of protection.
Short-Term vs. Long-Term: Choosing What to Harvest
Prioritize harvesting short-term losses first. These offset short-term gains, which are taxed at the highest rates. A dollar saved from ordinary income is worth more than a dollar saved from long-term capital gains.
Long-term losses are still valuable. They offset long-term gains and can even cancel short-term gains if no short-term losses exist. But the tax savings are often smaller because long-term rates are lower.
Do not sell just for the sake of harvesting. Always consider if the investment still fits your strategy. A bad investment sold for a tax break is still a smart exit.
You earn $120,000 per year. Your short-term gains face a 24% federal tax. A $10,000 short-term loss saves you $2,400 in taxes. A long-term loss might only save $1,500 because your long-term rate is 15%. Harvest the short-term pain first.
Timing: Year-Round or Just December?
Many people rush to harvest losses in the last week of December. That works, but it is reactive. The best approach is monitoring your portfolio regularly throughout the year. Volatility in March or October often creates better opportunities.
You can harvest multiple times a year. Every dip is a potential tax asset. Use a portfolio tracker that shows unrealized gains and losses by tax lot. This lets you identify specific shares with the highest cost basis to sell.
| Filing Status | Income Range (0% Rate) | Income Range (15% Rate) | Income Range (20% Rate) |
|---|---|---|---|
| Single | $0 — $48,350 | $48,351 — $533,400 | $533,401+ |
| Married Filing Jointly | $0 — $96,700 | $96,701 — $600,050 | $600,051+ |
| Head of Household | $0 — $64,750 | $64,751 — $566,700 | $566,701+ |
If your income is low enough, your long-term gains might be taxed at 0%. In that year, harvesting losses is less urgent. You might even want to harvest gains intentionally — called tax-gain harvesting — to reset your cost basis tax-free.
If your taxable income falls in the 0% long-term capital gains bracket, you can sell winners without paying federal taxes.
You then rebuy the asset immediately, raising your cost basis for future tax-free growth.
Automated Solutions: Robo-Advisors and Direct Indexing
Manual harvesting takes time. Technology now handles most of the work. Robo-advisors like Wealthfront and Betterment offer automated tax-loss harvesting as a standard feature. They scan your portfolio daily for harvesting chances.
Direct indexing takes this further. Instead of buying an ETF, you buy the individual stocks inside the index. This creates many more chances to harvest losses. A single index fund gives one line item. A direct index of 500 stocks gives 500 opportunities.
An S&P 500 ETF might be flat for the year. You have no loss to harvest. But inside that same index, 200 stocks are down. With direct indexing, you can harvest those individual losses while still tracking the overall market.
Key Takeaways
| Key Point | What It Means | Action Item |
|---|---|---|
| Losses offset gains | Every realized loss reduces your taxable capital gain | Review your portfolio now for unrealized losses |
| Avoid the 30-day trap | Wash sale rules block your deduction if you rebuy too fast | Wait at least 31 days before repurchasing the same asset |
| Short-term losses are best | They cancel high-tax-rate income first | Prioritize short-term losers when choosing what to sell |
| Swap, do not exit | Replace a sold asset with a similar, not identical, fund | Use total market ETFs to replace S&P 500 exposure |
| Carry forward extra losses | Losses over $3,000 move to future tax years | Keep track of carryover amounts on your tax returns |