Tax Loss Harvesting Basics
Aug 9, 2026
Tax-loss harvesting is the practice of selling an investment at a loss in a taxable account to offset capital gains — and, within limits, ordinary income — realized elsewhere in your portfolio, while staying invested in the market.
How the Offset Works
Capital losses first offset capital gains of the same type: short-term losses against short-term gains, long-term losses against long-term gains. Any excess losses can then offset gains of the other type. If losses still exceed gains after that, up to a set annual amount (currently $3,000 for most filers, $1,500 if married filing separately) can offset ordinary income, with any remaining loss carried forward indefinitely to future tax years.
A Simple Example
Suppose you hold two positions: one with a $5,000 unrealized gain and one with a $4,000 unrealized loss. Selling both realizes a $5,000 gain and a $4,000 loss, netting to a $1,000 taxable gain instead of $5,000 — while the loss is "harvested" for tax purposes. You can then reinvest the proceeds from the losing position into a similar (but not identical) investment to keep your market exposure intact.
The Wash Sale Rule
The IRS disallows the loss if you buy the same or a "substantially identical" security within 30 days before or after the sale — a 61-day window in total. Triggering a wash sale does not eliminate the loss forever; it defers it by adding the disallowed loss to the cost basis of the replacement shares. Common ways to avoid a wash sale while staying invested include:
- Swapping into a similar but not identical fund (for example, one broad-market index fund for another tracking a different index) rather than repurchasing the exact security sold.
- Waiting the full 31 days before repurchasing the original security, if you want to return to it.
- Being careful about automatic dividend reinvestment, which can unintentionally trigger a wash sale if it repurchases shares of the same security inside the 61-day window.
When It Makes the Most Sense
Tax-loss harvesting is most valuable in taxable brokerage accounts — losses inside a traditional or Roth IRA are not deductible, since those accounts are not subject to capital gains tax in the first place. It tends to be most impactful during market downturns, when more positions are likely to show unrealized losses, but disciplined investors monitor for opportunities throughout the year rather than waiting for December.
A Few Cautions
- Chasing tax savings should not override sound portfolio construction — do not sell a well-performing, appropriately-allocated holding purely to generate a loss elsewhere.
- Transaction costs and bid-ask spreads can eat into the benefit for smaller portfolios.
- Coordinate harvesting across all of your accounts, including any managed by a separate advisor, so you do not accidentally trigger a wash sale by holding the same security in more than one place.
Used consistently, tax-loss harvesting can meaningfully reduce the taxes paid on an otherwise identical investment strategy, but it is a tax-efficiency tool layered on top of a sound investment plan, not a substitute for one.
Sample content for demonstration purposes — not financial advice.