Tax-Loss Harvesting: Wash Sales, Offsets, and Reporting

Tax-loss harvesting is the practice of selling investments that have dropped below what you paid for them, then using those realized losses to cancel out capital gains you’d otherwise owe tax on. After your losses zero out your gains for the year, you can deduct up to $3,000 of any remaining loss against ordinary income ($1,500 if married filing separately), and anything left over carries forward to future tax years with no expiration.1Office of the Law Revision Counsel. 26 USC Subtitle A, Chapter 1, Subchapter P, Part II – Treatment of Capital Losses The concept is simple. The rules that surround it, particularly the wash sale rule and the required order for netting losses against gains, are where most people slip up.

Where Harvesting Actually Works

Only taxable brokerage accounts qualify. A loss inside a 401(k), traditional IRA, Roth IRA, or any other tax-advantaged retirement account is not deductible, because those accounts already carry their own tax treatment.2Internal Revenue Service. What if My 401(k) Drops in Value A stock that collapsed inside your IRA gives you nothing to harvest, no matter how bad the drop.

Inside a taxable account, almost any capital asset works: individual stocks, corporate and government bonds, mutual funds, and ETFs. Cryptocurrency and other digital assets are also eligible, and they follow a different rulebook covered further down.

The Wash Sale Rule

This is the rule that ruins otherwise sound harvesting plans. Under IRC Section 1091, if you sell a security at a loss and buy back a “substantially identical” security within a 61-day window (30 days before the sale through 30 days after, with the sale date in the middle), the IRS disallows the loss for that tax year.3Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities

The loss is not erased permanently. It gets added to the cost basis of the replacement shares, so you eventually receive the benefit when you sell those shares without triggering another wash sale. If you keep rolling into new wash sales, though, you keep pushing the benefit further out, which defeats the purpose of harvesting in the first place.

What “Substantially Identical” Means

The IRS has never published a clear line. Publication 550 tells taxpayers to consider “all the facts and circumstances,” which is not much help.4Internal Revenue Service. Publication 550, Investment Income and Expenses What is settled: shares of one corporation are generally not substantially identical to shares of a different corporation. Selling one tech company’s stock at a loss and buying a competitor’s stock is fine.

Index funds create the harder question. Selling a Vanguard S&P 500 ETF at a loss and immediately buying a Fidelity S&P 500 index fund puts you back into essentially the same 500 stocks in the same proportions. The IRS has not ruled directly on this, which leaves it in a gray zone. The safer path is to swap into a fund tracking a genuinely different index, like moving from an S&P 500 fund into a total stock market fund or a large-cap value fund. Overlap is unavoidable, but the indexes are different, and that distinction puts you on much firmer ground.

The Rule Follows You Across Accounts

Wash sales attach to the taxpayer, not the account. If you sell shares at a loss in your taxable brokerage account and your IRA buys the same security inside the 61-day window, that’s a wash sale. So is a matching purchase by your spouse, in any account either of you owns.4Internal Revenue Service. Publication 550, Investment Income and Expenses The common trap: a robo-advisor harvests a loss in one account while a dividend reinvestment plan in another account quietly repurchases the same fund two weeks later. The loss gets disallowed, and you may not catch it until the 1099-B arrives.

Before harvesting, turn off automatic dividend reinvestment for any security you plan to sell, in every account you and your spouse hold. Coordinate with your spouse about anything either of you sells at a loss near year-end.

How Losses Offset Gains

You don’t choose which gains your losses cancel. The IRS sets the sequence. Short-term losses first net against short-term gains. Long-term losses net against long-term gains. If a net loss remains in either category, it crosses over to offset gains in the other.5Internal Revenue Service. Instructions for Schedule D (Form 1040)

This ordering has real consequences. Short-term gains are taxed at your ordinary income rate, up to 37%. Long-term gains (assets held more than a year) qualify for preferential rates of 0%, 15%, or 20% depending on your taxable income. A short-term loss that erases a short-term gain saves you more per dollar than a long-term loss offsetting a long-term gain. The netting order is fixed, but knowing the hierarchy helps you decide which losses are worth realizing.

Once all gains are neutralized, up to $3,000 of any remaining loss ($1,500 for married filing separately) comes off your ordinary taxable income. Losses beyond that carry forward to next year, and the year after that, without expiring. Carried losses keep their original character, so a long-term loss from 2026 still starts by offsetting long-term gains when applied in 2027 or later.1Office of the Law Revision Counsel. 26 USC Subtitle A, Chapter 1, Subchapter P, Part II – Treatment of Capital Losses

One more piece for higher earners: the 3.8% net investment income tax applies to the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly).6Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax Those thresholds are not indexed for inflation. Losses that shrink your net investment income can trim or eliminate this surtax on top of the capital gains savings.

Choosing Which Shares to Sell

If you bought the same holding at different prices over time, some tax lots may show a loss while others show a gain. Most brokerage platforms let you view holdings by lot, with purchase date and cost basis for each block. Using the specific identification method, you pick the lots with the highest cost basis to produce the largest realized loss. Without a specific instruction, most brokers default to first-in, first-out, which sells your oldest shares first. Older shares often carry the lowest cost basis, and selling them might produce a small loss or even a gain instead.

Before selling, calculate the unrealized loss on the lots you plan to sell and compare it against realized gains you already have for the year. Selling more than you need isn’t wasted (the excess carries forward), but it leaves you with a lower cost basis on the reinvested proceeds, which enlarges the taxable gain when you eventually sell.

For year-end harvesting, the trade date is what counts, not the settlement date. A sell order executed on December 31 produces a loss for that tax year even though the trade settles the next business day under the current T+1 cycle. Don’t push it to the last minute and risk an order failing to execute.

Crypto Plays by Different Rules

Section 1091’s wash sale rule applies only to “stock or securities.”3Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The IRS classifies most cryptocurrency as property, not a security. You can sell Bitcoin at a loss, buy it right back the same day, and still claim the loss. The same holds for Ethereum, Solana, and most other digital assets.

The narrow exception is tokenized securities, digital assets that represent an interest in an underlying SEC-registered security. Brokers must track and report wash sales on those the same way they do for stocks.7Internal Revenue Service. 2026 Instructions for Form 1099-DA For the crypto most individuals hold, the rule doesn’t apply in 2026. Congress has discussed extending it, but hasn’t acted.

Starting with transactions after 2025, crypto brokers must file Form 1099-DA reporting gross proceeds. For “covered securities” (digital assets acquired after 2025 in a custodial account), brokers must also report cost basis. Assets acquired before 2026 or transferred in from an external wallet are “noncovered,” and their basis is your responsibility to track.8Internal Revenue Service. Instructions for Form 1099-DA (2026)

FIFO is the default cost basis method for crypto. The only IRS-approved alternative is specific identification, and it requires you to designate the exact units being sold before you execute the trade. You can’t wait until tax time and retroactively pick favorable lots. Your records must show the acquisition date, cost basis, and wallet or account identifiers for the units you selected. HIFO is a lot-selection strategy within specific identification, not a separate method, and only works if your documentation meets that standard.

Reporting the Harvest

Each sale gets reported on Form 8949, with short-term transactions in Part I and long-term in Part II.9Internal Revenue Service. Instructions for Form 8949 (2025) For each line, you enter the asset description, acquisition date, sale date, proceeds, and cost basis. Your broker’s Form 1099-B (traditional securities) or Form 1099-DA (digital assets) supplies most of it.

When a wash sale occurs, you report it on Form 8949 using adjustment code “W” in column (f) and enter the disallowed loss as a positive number in column (g).10Internal Revenue Service. 2025 Instructions for Form 8949 That adjustment adds the disallowed amount to the basis of your replacement shares, preserving the loss for later.

Totals from Form 8949 flow onto Schedule D, where short-term and long-term results net out. The final Schedule D figure feeds into your Form 1040. If you have carryovers, track them on the Capital Loss Carryover Worksheet in the Schedule D instructions and apply them the following year.5Internal Revenue Service. Instructions for Schedule D (Form 1040)

How Long to Keep Your Records

You must keep records related to investment property until the statute of limitations expires for the year you dispose of it.11Internal Revenue Service. How Long Should I Keep Records For most returns that’s three years from filing. Harvesting adds a wrinkle: if you carry losses forward across multiple years, keep the original trade confirmations, cost basis records, and lot identification until the limitations period closes on the return where the last of those losses gets used. A large 2026 loss carried through 2030 means holding those 2026 records until at least 2034. Claims involving worthless securities require records for seven years.

Save digital copies of every trade confirmation, your brokerage’s year-end gain/loss report, and each 1099-B or 1099-DA. If you used specific identification, keep whatever documentation shows which lots you selected at the time of the sale. Records lost years later can leave you unable to defend a carryover loss the IRS questions.