Tax-Loss Harvesting: How Investors Turn a Bad Year Into a Tax Shelter

A losing position sitting in your brokerage account is more than dead weight. Buried inside two short sections of the tax code is a mechanism that lets investors convert that loss into real cash savings before December 31 runs out.

Published October 27, 2026, 5:00am ET · 4 min read

Tax Master desk. Editor: Vilma Rios.

This post may contain links from our sponsors and affiliates, and Flywheel Publishing may receive compensation for actions taken through them.

A focused woman with dark hair and glasses, wearing a light blue sweater, sits at a wooden table, intently looking at a silver laptop. Her right hand holds a yellow pencil, positioned near a black calculator and a smartphone, with numerous white financial papers scattered on the table. The soft, blurred background reveals a cozy home interior with a fireplace and kitchen cabinets.
A woman meticulously reviews financial documents and a laptop, embodying the focused effort required to manage personal investments. This image reflects the complexities of understanding stock losses and IRA withdrawals for tax planning. © mapodile / E+ via Getty Images

A rough year in the market leaves two things behind in a brokerage account: smaller balances and unrealized losses. The second one has real cash value. Investors can sell a losing position, lock in the loss, and use it to cancel out taxable gains and trim ordinary income. The move is called tax-loss harvesting, and two short sections of the Internal Revenue Code make it work.

The CBOE Volatility Index closed at 19.03 on October 22, 2026, up 33.9% from a month earlier, after it peaked at 31.05 in late March. Rising volatility leaves more positions under water, and a sale has to happen by December 31 to count for 2026.

How a $55,000 Loss Saves a Retired Couple $6,660

Picture a composite couple, both 67, filing jointly for 2026 with $150,000 of taxable income from pensions, Social Security, and traditional IRA distributions. Earlier this year they sold a winning stock and booked a $40,000 long-term gain. They also own a fund worth $55,000 less than they paid for it.

If they do nothing, the gain is taxed at the 15% long-term rate, for a $6,000 federal bill. If they sell the fund before year-end, here’s the math:

Step Amount 2026 Federal Tax Effect
Loss harvested $55,000 None by itself
Offsets long-term gain $40,000 $6,000 saved at 15%
Offsets ordinary income $3,000 $660 saved at 22%
Carried forward to 2027 $12,000 Future savings
Total 2026 savings $6,660

The $3,000 deduction comes off income taxed at 22%, because the 2026 22% bracket for married couples filing jointly covers income over $100,800 up to $211,400. Only the top dollars get that rate, and those are the dollars the deduction removes.

Section 1211 Caps the Ordinary-Income Offset at $3,000

Under 26 U.S.C. § 1211(b), capital losses offset capital gains with no ceiling. Once losses exceed gains, individuals deduct the lower of $3,000 ($1,500 for married filing separately) or the excess. That figure is written into the law itself, with no inflation adjustment.

Leftovers carry forward under 26 U.S.C. § 1212(b)(1), keeping their short-term or long-term character, with no expiration date during the taxpayer’s life. Our couple’s $12,000 could offsets future gains or shelter $3,000 of income a year for 4 years. One catch: an unused carryforward dies with the taxpayer and doesn’t pass to heirs.

Short-term losses carry extra value. Assets held not more than 1 year produce short-term gains taxed at ordinary rates, which top out at 37% in 2026.

Wash-Sale Rule Can Erase the Loss for Hasty Buyers

Sell a loser and buy it back quickly, and the deduction disappears. 26 U.S.C. § 1091(a) disallows the loss if you acquire “substantially identical” stock or securities within a window running 30 days before through 30 days after the sale.

The loss gets deferred rather than destroyed. Section 1091(d) adds it to the basis of the replacement shares, and Section 1223(3) carries over the holding period. You just lose the benefit this year.

The worse trap: buying the same fund in your IRA. The IRS ruled in Revenue Ruling 2008-5 that this triggers a wash sale with no basis increase, so the loss disappears for good. Automatic dividend reinvestment and a spouse’s purchases can also trip the rule. The standard fix is switching into a similar but different holding, such as an S&P 500 fund into a total-market fund, for at least 31 days.

Wealthy Investors Harvest All Year. Here’s the Version You Can Use

The richest households own most of the stocks. The top 1% by wealth held 50.9% of household corporate equities and mutual funds in the second quarter of 2026, while the bottom half held 0.6%. Many of them use direct indexing: separately managed accounts that own hundreds of individual stocks, so a manager can harvest the losers continuously even in a year the index rises.

You can get much of that benefit with three routine moves:

  1. Scan your taxable account now. Losses inside an IRA or 401(k) aren’t deductible and don’t increase your basis, so harvesting only works in regular brokerage accounts.
  2. Pick your lots. Use specific-lot identification and sell the shares bought at the highest price first.
  3. Skip it in the 0% bracket. If your income is low enough that long-term gains are taxed at 0%, harvested losses offset gains that would have cost nothing. Some investors in that bracket instead realize gains to reset basis.

State rules vary. Most states follow federal capital-loss treatment, but some don’t, so check your state’s return before counting on a state benefit.

Missed Wash Sales Can Quietly Wipe Out Your Harvested Losses

Harvested losses go on Form 8949 and Schedule D. Your broker flags wash sales inside the same account on Form 1099-B, but it can’t see purchases inside your IRA, your spouse’s account or another firm. Track those yourself before you file. And if a big harvest affects other decisions, such as a Roth conversion, the combined math is worth running with a CPA or  a well-versed in taxation fiduciary advisor.

Contact [email protected] for any questions or corrections.

Vilma Rios

Vilma Rios is a tax professional and tax content contributor with more than 15 years of experience in tax and accounting. She specializes in federal tax research, tax education, and translating complex tax rules into clear, practical information for individuals, families, and small-business owners.
Vilma is a Content Tax Contributor II with the National Association of Tax Professionals (NATP), where she contributes to tax education and professional content. She has also presented tax information through webinars, including Spanish-language tax education, and has appeared on Telemundo 47 discussing tax topics and helping viewers understand important tax-filing requirements.
Her experience also includes tax and accounting work, tax research, IRS-related matters, and public tax education. While in college, Vilma volunteered in an IRS-sponsored tax assistance program and was recognized for her community service by local and state officials.
Known as “Your Tax Geek,” Vilma is passionate about making taxes easier to understand and helping people navigate an increasingly complex tax system.

All articles →