
What Is Tax-Loss Harvesting?
Tax-loss harvesting is an investment strategy that involves selling securities at a loss to offset capital gains taxes owed on profitable investments elsewhere in a portfolio. The realized loss reduces taxable capital gains, and any excess loss can offset up to $3,000 of ordinary income per year in the United States, with additional losses carried forward to future tax years.
The strategy is typically used near year-end in taxable brokerage accounts, since tax-advantaged accounts like 401(k)s and IRAs do not incur capital gains taxes and therefore gain no benefit from harvesting losses.
How the Offset Works
Realized losses first offset realized gains of the same type — short-term losses offset short-term gains, and long-term losses offset long-term gains. Any remaining net loss can then offset the other gain type, and finally up to $3,000 of ordinary income, with unused amounts carried forward indefinitely.
The Wash-Sale Rule
The IRS wash-sale rule disallows a tax loss if the investor buys the same or a “substantially identical” security within 30 days before or after the sale. Violating this rule means the loss is disallowed for the current tax year and instead added to the cost basis of the newly purchased shares.
To stay invested while avoiding a wash sale, many investors swap into a similar but not identical security, such as replacing an S&P 500 index fund with a comparable index fund from a different provider, maintaining market exposure during the 30-day window.

Tax-Loss Harvesting and Robo-Advisors
Many robo-advisors now offer automated tax-loss harvesting as a built-in feature, continuously scanning portfolios for opportunities to realize losses while avoiding wash-sale violations, making the strategy accessible without manual tracking.
Tax-Loss Harvesting: Benefits vs Risks
| Aspect | Benefit | Risk / Limitation |
|---|---|---|
| Tax Savings | Reduces current-year tax liability | Only applies to taxable accounts |
| Ordinary Income Offset | Up to $3,000 per year | Excess must be carried forward |
| Reinvestment | Stay invested via similar assets | Wash-sale rule limits exact repurchase |
| Long-Term Effect | Lowers cost basis over time | Larger tax bill possible upon eventual sale |
Frequently Asked Questions
Can tax-loss harvesting be used in a 401(k) or IRA?
No. Tax-loss harvesting only provides a benefit in taxable brokerage accounts, since retirement accounts like 401(k)s and IRAs are not subject to capital gains tax on trades made within the account.
What happens if I violate the wash-sale rule?
If a wash sale occurs, the loss is disallowed for the current tax year and added to the cost basis of the repurchased shares, effectively deferring rather than eliminating the tax benefit until those new shares are eventually sold.
How much in losses can I deduct against ordinary income each year?
Up to $3,000 per year ($1,500 if married filing separately) can offset ordinary income in the United States, with any remaining net capital loss carried forward to offset gains or income in future tax years.
Is tax-loss harvesting worth doing for small portfolios?
It can still provide value, but the tax savings scale with portfolio size and trading activity, so investors should weigh the administrative effort and any transaction costs against the modest tax benefit for smaller taxable accounts.
Key Takeaways
Tax-loss harvesting allows investors to strategically realize losses to offset capital gains and, within limits, ordinary income, while remaining invested by avoiding the wash-sale rule. The strategy is most valuable in taxable accounts with significant realized gains. This article is for informational purposes only and does not constitute investment advice.