Tax loss harvesting works by selling investments that have dropped below what you paid for them, using the realized loss to cancel out capital gains elsewhere in your portfolio, and then deducting up to $3,000 of any remaining loss against ordinary income like wages or interest. Anything left over after that carries forward to future tax years with no expiration. The strategy only applies inside taxable brokerage accounts, and the wash sale rule sets the main boundary on how you execute it.
How Losses Offset Gains
Federal law requires a specific order when you combine gains and losses for the year. Short-term losses (from assets held one year or less) offset short-term gains first. Long-term losses (from assets held longer than one year) offset long-term gains first. Only after each bucket is netted internally does a leftover loss cross over to reduce gains in the other bucket.1Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses
That ordering matters because short-term gains are taxed at your ordinary income rate, which can reach 37%. Long-term gains get preferential rates of 0%, 15%, or 20% depending on your taxable income and filing status.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses A short-term loss wiping out a short-term gain saves you more per dollar than a long-term loss wiping out a long-term gain. When you’re choosing which positions to sell, pairing short-term losses against short-term gains generally produces the biggest immediate benefit.
The $3,000 Deduction Against Ordinary Income
If your total capital losses exceed your total capital gains for the year, the surplus can reduce other income on your return, but only up to $3,000 per year. Married filing separately drops the cap to $1,500.3Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Congress has not adjusted the $3,000 figure for inflation.
The deduction flows through to your adjusted gross income, so it can also nudge your eligibility for tax credits and deductions that phase out at higher incomes. The effect is modest, but the benefit does extend beyond the capital gains line of your return.
Carrying Unused Losses Forward
Any capital loss you don’t use in the current year carries forward and keeps its character: short-term stays short-term, long-term stays long-term.4Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers There’s no expiration. Realize a $50,000 loss with no gains to offset, and you’ll deduct $3,000 against ordinary income each year while carrying the rest forward. Absent any future gains, that particular loss would take more than 15 years to burn through.
Each new year, your carried-over loss first offsets any capital gains in that year. Only what’s left after that is subject to the $3,000 cap.3Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Track your carryover yourself. The IRS doesn’t do it for you, and if you lose the paperwork, you lose the deduction.
The Wash Sale Rule
The biggest constraint on tax loss harvesting is the wash sale rule. If you sell an investment at a loss and buy a “substantially identical” security within a 61-day window (30 days before the sale through 30 days after), the IRS disallows the loss.5Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The disallowed loss isn’t erased permanently; it’s added to your cost basis in the replacement shares, so you’ll benefit when you eventually sell those shares. But the immediate deduction disappears.
The IRS has never published a bright-line definition of “substantially identical.” Publication 550 says you have to consider “all the facts and circumstances” and notes that shares of one corporation are ordinarily not considered substantially identical to shares of another.6Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses In practice, selling an S&P 500 index fund and immediately buying a different provider’s S&P 500 fund is risky, because both track the same index. Selling an S&P 500 fund and buying a total stock market fund is generally considered safer because the underlying holdings differ meaningfully. The further apart two funds are in composition, the safer the swap.
Wash Sales Across Your Other Accounts
The rule follows you across every account you hold. Sell a stock at a loss in your taxable brokerage account and buy the same stock in your IRA within 30 days, and you’ve triggered a wash sale. This version is worse than a regular wash sale: because an IRA has no cost basis for tax purposes, the disallowed loss cannot be added to any basis and is effectively lost for good. The same risk applies to a 401(k) or any other tax-deferred account. Automated dividend reinvestment can also trigger the rule if a fund you sold at a loss reinvests dividends into new shares during the 61-day window.
Your broker flags wash sales inside a single account on Form 1099-B, but does not see across accounts. If you triggered one across accounts, catching it is on you.
Cryptocurrency and the Wash Sale Rule
Cryptocurrency and other digital assets are classified as property for federal tax purposes, not as stock or securities. Because the wash sale rule under 26 U.S.C. ยง 1091 applies specifically to “stock or securities,” digital assets are not currently subject to it. You can sell Bitcoin at a loss, buy it back immediately, and still claim the loss. Congress has considered legislation to close this gap, so the treatment may not last. Starting in 2026, brokers must report cost basis on digital asset transactions using the new Form 1099-DA.7Internal Revenue Service. Digital Assets
Choosing Which Shares to Sell
When you own multiple lots of the same investment bought at different times and prices, which shares you sell determines the size of your loss. If you don’t specify, your broker defaults to first-in, first-out. For loss harvesting, that’s rarely what you want. You want to sell the shares with the highest cost basis, because those produce the largest loss.8Internal Revenue Service. Stocks (Options, Splits, Traders) 1
To do this, use the specific identification method: tell your broker exactly which lot you’re selling before or at the time of the trade. Most online brokerages let you pick the lot on the order screen. You’re required to keep records identifying the basis of every capital asset you sell, so save the broker confirmation showing the specific lot.
The Extra Benefit for Higher Earners
High earners face an additional 3.8% surtax on net investment income when modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly).9Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax Net investment income includes capital gains, and capital losses reduce it. Harvesting losses doesn’t just save at your capital gains rate; it can also cut into this surtax. For someone in the 20% long-term capital gains bracket who also owes the 3.8%, each dollar of harvested loss offsets gains that would otherwise be taxed at a combined 23.8%. The MAGI thresholds are not indexed for inflation, so more taxpayers cross them each year.10Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
It Only Works in Taxable Accounts
Loss harvesting is a taxable-account strategy. IRAs, 401(k)s, and other tax-advantaged accounts don’t generate reportable capital gains or deductible capital losses when you sell investments inside them. Gains in a traditional IRA are taxed as ordinary income at withdrawal, and Roth IRA gains come out tax-free. Because no capital gain or loss is recognized at the time of sale, there’s nothing inside those accounts to harvest.
How to Report Harvested Losses
Every sale goes on Form 8949, where you list the description of the asset, acquisition date, sale date, proceeds, and cost basis. The totals flow to Schedule D of your Form 1040, which is where short-term and long-term gains and losses get netted and where the deduction against ordinary income is calculated.11Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets
Your broker sends you Form 1099-B (or Form 1099-DA for digital assets starting in 2026) with the details of each transaction, including acquisition date, proceeds, and cost basis for covered securities.12Internal Revenue Service. 2024 Instructions for Form 1099-B – Proceeds From Broker and Barter Exchange Transactions The numbers on your Form 8949 need to match what the broker reported. Discrepancies are one of the most common triggers for IRS notices.
If you triggered a wash sale, the transaction still goes on Form 8949, but you enter adjustment code “W” in column (f) and report the disallowed loss as a positive number in column (g).11Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets Keep copies of Schedule D and Form 8949 after you file. Your carryforward depends on them, and the IRS may ask you to substantiate a carryover years later.