No one likes seeing an investment lose value. But in a taxable account, a loss can have a silver lining. Tax-loss harvesting means selling an investment that’s down, using the loss to reduce your taxes and reinvesting so your portfolio stays on track. Done well, it turns a market dip into a tax benefit. Done carelessly, the wash-sale rule can erase the benefit entirely. Here’s how it works.

At a glance
- Harvested losses offset capital gains first, then up to $3,000 of ordinary income a year. Unused losses carry forward indefinitely.
- The wash-sale rule disallows the loss if you buy the same or a substantially identical investment within 30 days before or after the sale, including in your IRA or your spouse’s accounts.
- Tax-loss harvesting usually defers taxes rather than eliminating them, so it works best as part of a long-term tax plan.
How tax-loss harvesting works
When you sell an investment in a taxable account for less than you paid, you realize a capital loss. According to the IRS, capital losses are used in this order:
- Against capital gains. Losses offset gains of the same type first (short-term against short-term, long-term against long-term), then the other type.
- Against ordinary income. If losses exceed gains, up to $3,000 a year ($1,500 if married filing separately) can reduce your other income.
- Carried forward. Any remaining loss carries into future years with no expiration.
After you sell, you reinvest the money in a similar, but not substantially identical, investment so your portfolio keeps roughly the same exposure to the market.

A hypothetical example
Earlier in the year, an investor sold a stock fund for a $20,000 long-term gain. Another fund in the same account is down $12,000. In December, the investor sells the losing fund and buys a different fund that tracks a similar part of the market.
The $12,000 loss offsets most of the gain, so only $8,000 is taxable. At a 15% long-term capital gains rate, that saves $1,800 in federal tax. In Utah, where capital gains are taxed at the flat 4.45% rate, it saves about $534 more.
This example is hypothetical and for illustration only. It does not represent any specific client or investment, and it excludes transaction costs.
The wash-sale rule
The wash-sale rule is where most do-it-yourself tax-loss harvesting goes wrong. Under IRS Publication 550, a loss is disallowed if, within 30 days before or after the sale, you:
- Buy substantially identical stock or securities
- Acquire them through an option or contract
- Buy them in an IRA or Roth IRA
- Your spouse, or a company you control, buys them
That creates a 61-day window around the sale. The 30 days before the sale catch many people off guard, especially when dividends are being reinvested automatically.

What happens if you trigger it
In a regular taxable account, the loss isn’t gone forever. The disallowed loss is added to the cost basis of the new shares, and the holding period carries over, according to Schwab. You’ll get the benefit later when you sell.
In an IRA, it’s worse. Under Revenue Ruling 2008-5, if you sell at a loss in a taxable account and buy the same security in your IRA within the window, the loss is permanently disallowed. Your IRA basis doesn’t increase.
What counts as “substantially identical”?
The IRS doesn’t give a precise definition. Selling one company’s stock and buying the same stock back is clearly a wash sale. Selling one S&P 500 index fund and buying another S&P 500 fund from a different company may be treated the same way. Switching to a fund that tracks a different index, such as moving from a large-cap blend fund to a total market fund, is a common approach. Because the line isn’t clear, it’s worth discussing specific swaps with your tax professional.
Tips for harvesting losses well
- Look all year, not just in December. Markets often dip mid-year, and those losses can disappear by year-end.
- Mind the trade date. The tax year of a sale is based on the trade date, not when it settles, so a December 31 trade counts for that year.
- Pause automatic reinvestment. Dividends reinvested within 30 days of a sale can trigger a partial wash sale.
- Coordinate across accounts. Check your IRA, your spouse’s accounts and any automatic purchases before you sell.
- Watch short-term losses. Short-term losses offset short-term gains, which are taxed at higher ordinary income rates, so they can be especially valuable.
- Keep the portfolio on plan. The replacement investment should keep your allocation where it belongs. Tax savings aren’t worth a portfolio that no longer fits your goals.
When tax-loss harvesting may not help
- You’re in the 0% capital gains bracket. For 2026, long-term gains are taxed at 0% for taxable income up to $49,450 for single filers and $98,900 for joint filers, according to IRS Revenue Procedure 2025-32. In those years, it may make more sense to harvest gains instead, selling and rebuying to raise your cost basis at no federal tax.
- The losses are in an IRA or 401(k). Losses inside retirement accounts can’t be deducted.
- You’ll pay more later. Harvesting lowers the cost basis of the replacement investment. If your tax rate will be higher when you eventually sell, the benefit shrinks.
Some investors also face the 3.8% net investment income tax on gains when income exceeds $200,000 for single filers or $250,000 for joint filers. Those thresholds aren’t indexed for inflation, so more households reach them each year, and harvested losses can reduce that tax too.
How much is it worth?
Results vary widely. In a July 2024 study, Vanguard estimated the annual value at roughly 0.47% to 1.27% of the taxable stock assets being harvested, depending on tax rates, market conditions, cash flows and how well it’s carried out. Spread across a whole portfolio, the benefit is much smaller. The benefit tends to be largest for investors in high tax brackets who are adding new money and who expect to hold investments for a long time, give them to charity or pass them to heirs at a stepped-up basis.
A note on crypto
Under current law, the IRS treats cryptocurrency as property rather than stocks or securities, so the wash-sale rule hasn’t applied to it. Proposals in Congress would change that. If you hold crypto in a taxable account, check the current rules with your tax professional before harvesting.
Where we fit in
Tax-loss harvesting works best as a habit, not a year-end scramble. At ApexFlow, we watch for opportunities throughout the year, coordinate replacement investments with your target allocation and work with your tax professional so gains, losses and withdrawals fit together. It’s part of the ongoing work in the Deploy stage of our planning process and our portfolio management. For more ways to keep taxes in check, see Roth Conversions Before RMDs and Does Utah Tax Retirement Income?
Frequently asked questions
Selling an investment in a taxable account at a loss to offset capital gains or up to $3,000 of ordinary income, then reinvesting in a similar investment to stay invested.
More than 30 days after the sale before buying the same or a substantially identical investment, and you also can’t have bought it within the 30 days before the sale.
Yes. Buying the same security in your IRA within 30 days of selling it at a loss in a taxable account triggers a wash sale, and the loss is permanently lost.
Losses offset all of your capital gains. Beyond that, up to $3,000 a year can offset ordinary income ($1,500 if married filing separately), and the rest carries forward.
It can be, especially for investors in higher tax brackets with sizable taxable accounts. It usually defers taxes rather than eliminating them, so its value depends on your future tax rates and plans for the investments.
Talk it through with us
If you have a taxable account with gains, losses or both, there may be an opportunity before December 31. Book a 20-minute Fit Call. It’s virtual, no prep is needed and there’s no obligation.
With clarity and confidence,

This material is for informational purposes only. Tax-loss harvesting may not be appropriate for all investors and does not guarantee tax savings. Investors should consider transaction costs and the impact of the wash-sale rule. Examples are hypothetical and for illustration only. Tax figures are for 2026 and change annually. Investing involves risk and you may incur a profit or loss regardless of strategy selected. Raymond James and its advisors do not offer tax or legal advice. You should discuss any tax or legal matters with the appropriate professional.
Related Articles
Dig deeper into our resource library
-
October 7, 2026Too Much Company Stock? How to Diversify a Concentrated Stock Position
“Don’t put all your eggs in one basket” is advice everyone nods along to and almost nobody applies correctly. The people most likely to breakRead more -
October 7, 2026What to Expect in Your First Meetings With a Financial Advisor
Most people put off calling a financial advisor for the same reason they put off calling a doctor. It’s not that they don’t care. It’sRead more