Tax-loss harvesting for US investors
Tax-loss harvesting is one of the most practical moves you can make to reduce your tax bill. The idea is simple: sell holdings that are sitting at a loss, use those losses to offset gains you have realized elsewhere, and keep more of your money.
I think every investor with a taxable account should understand how it works, even if you only use it once a year around December.
What is tax-loss harvesting
You sell an investment that has dropped below what you paid for it, locking in a capital loss. That loss offsets capital gains from other sales during the same tax year.
Say you sold one stock for a $5,000 gain and another is sitting at a $3,000 unrealized loss. Sell the loser, and you only owe taxes on $2,000 instead of $5,000.
How the IRS offset rules work
The IRS lets you use capital losses to offset gains dollar for dollar, following this order:
- Short-term losses offset short-term gains first. Both taxed at ordinary income rates, so this gives the biggest benefit per dollar.
- Long-term losses offset long-term gains first. Both at preferential capital gains rates.
- Remaining losses cross over. Excess short-term losses offset long-term gains, and vice versa.
- Up to $3,000 of net losses offset ordinary income. If losses exceed gains, you can deduct up to $3,000 ($1,500 if married filing separately) against wages, salary, and other income.
- Excess losses carry forward indefinitely. No expiration. They roll into future tax years until used up.
That $3,000 ordinary income deduction is surprisingly valuable. If you are in the 32% bracket, it saves you $960 in federal tax every year you can use it.
The wash sale constraint
The wash sale rule is the single biggest thing that can ruin a harvest. If you buy a "substantially identical" security within 30 days before or after selling at a loss, the loss is disallowed.
The window is 61 days total: 30 before, the sale day, 30 after.
What counts as substantially identical is straightforward in most cases (same stock, options on the same stock, different share classes of the same company) but gets murky with ETFs. Selling an S&P 500 ETF and buying a total market ETF is generally considered a safe swap. Selling one S&P 500 ETF and buying a different provider's S&P 500 ETF is risky. Our guide on substantially identical securities covers the grey areas in detail.
The disallowed loss is not permanently lost in most cases. It gets added to the replacement shares' cost basis, deferring the benefit. But if you repurchase in a retirement account (IRA, 401(k), Roth), the loss can be destroyed permanently. See our guide on wash sales and retirement accounts.
How TrackMyShares identifies opportunities
The tax-loss harvesting tool analyzes your portfolio and shows you:
Summary cards with your realized gains for the year (split short-term/long-term), total harvestable losses across your holdings, and estimated tax savings based on your marginal rate.
Opportunity table listing each holding with an unrealized loss and a recommended action:
| Action | Meaning |
|---|---|
| Sell all | Unrealized loss is less than or equal to your realized gains |
| Sell partial | Unrealized loss exceeds your gains, so only a partial sale is needed |
| Hold | No realized gains to offset this year |
Wash sale warnings flag any situation where a recent purchase of the same symbol could disallow the loss.
Using the feature step by step
- Open a transaction-based portfolio (or consolidated portfolio)
- Click the menu (three dots) in the portfolio header
- Select Tax loss harvesting
- Set the tax region to US and select the current financial year
- Adjust the marginal tax rate slider to match your bracket
- Review the summary cards
- Scroll through the opportunities table
- Click any row to expand lot-level details showing which specific lots are at a loss
- Check wash sale warnings before acting
Things to keep in mind
Harvesting is not free money. You are selling a position. If it recovers, you missed the upswing. The tax savings need to justify exiting something you believe in.
Respect the 31-day window. If you want the same stock back, wait at least 31 days. You are exposed to market moves during that period. Many investors buy a similar (but not identical) fund as a placeholder.
Keep your transaction history complete. The analysis is only as good as your data. Missing transactions lead to wrong numbers.
Year-end is the obvious time, but not the only time. Market downturns mid-year can create better opportunities than December, when everyone is harvesting at once.
Ready to see your tax-loss harvesting opportunities? Sign up for TrackMyShares and explore the tool with your own portfolio.
This is general information, not personal tax or financial advice.