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.

Key-Points
What Tax-Loss Harvesting Actually Does

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.

Table 1: Matching Losses Against Gains — The Priority Order
StepLoss TypeGain Type It Offsets FirstTax Impact
1Short-Term LossShort-Term GainAvoids high ordinary income tax rate
2Long-Term LossLong-Term GainAvoids lower capital gains rate (still useful)
3Remaining Loss (Any)Opposite Gain TypeCancels whatever taxable gain is left
4Excess Loss (Up to $3,000)Ordinary IncomeDirect 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.

Table 2: Wash Sale Window — Critical Dates
EventDate WindowStatus
Sale of Stock at LossDay 0 (Trigger Date)Start counting
Prohibited Re-Buy (Before)30 Days Before SaleWash sale if bought here too
Prohibited Re-Buy (After)30 Days After SaleWash sale if purchased
Safe Re-Buy WindowDay 31 OnwardsLoss 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.

Table 3: Safe ETF Swap Candidates to Avoid Wash Sales
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
Key-Points
The Golden Rule of Swapping

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.

Table 4: Tax Rates on Capital Gains (2025) — Why Timing Matters
Filing StatusIncome 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.

Key-Points
The Zero Percent Bracket Opportunity

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

Table 5: Core Summary — Tax-Loss Harvesting at a Glance
Key PointWhat It MeansAction Item
Losses offset gainsEvery realized loss reduces your taxable capital gainReview your portfolio now for unrealized losses
Avoid the 30-day trapWash sale rules block your deduction if you rebuy too fastWait at least 31 days before repurchasing the same asset
Short-term losses are bestThey cancel high-tax-rate income firstPrioritize short-term losers when choosing what to sell
Swap, do not exitReplace a sold asset with a similar, not identical, fundUse total market ETFs to replace S&P 500 exposure
Carry forward extra lossesLosses over $3,000 move to future tax yearsKeep track of carryover amounts on your tax returns