Tax-loss harvesting means selling an investment that has fallen in value to realize a capital loss, which can offset capital gains and, beyond that, up to $3,000 of ordinary income a year, with unused losses carried forward indefinitely [1]. The catch is the wash-sale rule: if you buy the same or a "substantially identical" security within 30 days before or after the sale, the loss is disallowed for now and added to the cost of the new shares [1]. For 2026, a sale must have a trade date by December 31, 2026, to count in the 2026 tax year [1]. This article explains the general rules; how they apply to any one person depends on their own situation.
How does tax-loss harvesting work?
A capital loss is realized when you sell for less than your cost basis (what you paid, adjusted for items such as reinvested dividends). Realized losses first offset realized gains of the same type, then the other type: short-term losses against short-term gains, long-term against long-term, then across [1].
If losses exceed gains, the net loss reduces ordinary income by up to $3,000 a year ($1,500 for a married person filing separately) [1]. Any remaining loss carries over to future years, and keeps carrying over until it is used up [1].
A worked example
| Step | Amount |
|---|---|
| Long-term gain from selling Fund A in 2026 | +$12,000 |
| Loss realized by selling Stock B, bought for $20,000, at $11,000 | −$9,000 |
| Net capital gain taxed for 2026 | $3,000 |
| If the Stock B loss had been $17,000: net capital loss | −$5,000 |
| Deducted against ordinary income in 2026 | $3,000 |
| Carried forward to 2027 | $2,000 |
Illustrative figures using the rules in IRS Publication 550 [1].
The value of a harvested loss depends on the tax rate it offsets. For 2026, long-term capital gains are taxed at 0% for taxable income up to $49,450 for single filers ($98,900 for married couples filing jointly), at 15% up to $545,500 ($613,700 jointly), and at 20% above that [2]. Short-term gains are taxed at ordinary income rates, so losses that offset them can save more.
What is the wash-sale rule?
A wash sale occurs when you sell a stock or security at a loss and, within 30 days before or after the sale, you [1]:
- buy substantially identical stock or securities;
- acquire them in a fully taxable trade;
- acquire a contract or option to buy them; or
- acquire substantially identical stock for your individual retirement arrangement (IRA) or Roth IRA.
The window is 61 days in total: 30 days before the sale, the sale day and 30 days after. Purchases by a spouse, or by a corporation you control, also count [1].
What happens to a disallowed loss
The loss is not lost in most cases, only postponed. It is added to the cost basis of the new shares, and the holding period of the old shares carries over [1]. IRS Publication 550 gives the example of buying 100 shares for $1,000, selling them for $750 and buying 100 shares again within 30 days for $800: the $250 loss is disallowed, and the new shares have a basis of $1,050 [1].
The IRA case is different. When the replacement shares are bought in an IRA or Roth IRA, Publication 550 excludes that case from the basis adjustment, so the loss is effectively lost rather than postponed [1].
What counts as "substantially identical"?
The tax rules do not give a precise definition. Shares of the same company are substantially identical; shares of a different company in the same industry generally are not. Index funds are a grey area: two funds from different providers tracking different indexes are commonly treated as different, while two share classes of the same fund are riskier. Investors who want to stay invested during the 31 days often switch to a similar but not identical fund, or wait 31 days to buy back.
Harvesting a loss only works if the loss sticks: buying the same security back within 30 days before or after the sale, including in an IRA, triggers the wash-sale rule.
Does the wash-sale rule apply to crypto?
As of October 13, 2026, the wash-sale rule in the tax code is written for "stock or securities." According to the staff of the Joint Committee on Taxation, digital assets such as Bitcoin are not expressly within its scope, and the IRS has not issued guidance applying it to them [7]. That may change. H.R. 10357, the Digital Asset Tax Certainty Act, introduced on September 14, 2026 with sponsors from both parties, would extend the wash-sale rule to traded digital assets [3]. As introduced, the change would apply to dispositions after the date the bill was introduced [3]. The House Ways and Means Committee approved the bill on September 16, 2026 [4]. It was not law as of October 13, 2026; anyone harvesting crypto losses should check its current status. How crypto gains and losses are reported is covered in DataPorium's crypto tax guide [6].
What are the deadlines and common mistakes?
- Trade date, not settlement date. For publicly traded securities, a sale counts in the year of its trade date, and the holding period ends on the trade date [1]. A sale on December 31, 2026 counts for 2026.
- Automatic purchases. Reinvested dividends and regular automatic investments can create a wash sale for part of the shares sold.
- Multiple accounts. The rule looks at all your accounts, including IRAs and a spouse's purchases [1].
- Short-term versus long-term. Holding period determines whether a loss offsets short-term or long-term gains first.
- Selling only for the tax benefit. A loss deduction lowers taxes, but the investment decision still matters; a lower cost basis on a replacement also means a larger taxable gain later.
Where do losses come from in 2026?
Even in a rising market, many individual stocks are down. DataPorium's stock screener sorts companies by 52-week price change, and as of October 12, 2026 several large companies traded well below their year-earlier prices [5]. The screen shows market prices only; a holder's own loss depends on the price paid.
Frequently asked questions
How much capital loss can I deduct in 2026?
Losses first offset gains; a net loss reduces ordinary income by up to $3,000 ($1,500 if married filing separately), and the rest carries forward [1].
How long do I have to wait to buy back a stock after a loss sale?
More than 30 days after the sale, and you must not have bought it in the 30 days before the sale, to avoid a wash sale [1].
Does the wash-sale rule apply across accounts?
Yes. A purchase in another taxable account, an IRA or Roth IRA, or by your spouse can trigger it [1].
What is the deadline for tax-loss harvesting in 2026?
The sale's trade date must fall on or before December 31, 2026; settlement can happen in 2027 [1].
Sources & References
- [1] Internal Revenue Service, Publication 550, Investment Income and Expenses (for 2025 returns; accessed October 13, 2026)
- [2] Internal Revenue Service, Revenue Procedure 2025-32 (2026 inflation adjustments)
- [3] U.S. House of Representatives, H.R. 10357, Digital Asset Tax Certainty Act, as introduced (September 14, 2026)
- [4] House Ways and Means Committee, Historic Digital Asset Tax Legislation Advances (September 16, 2026)
- [5] DataPorium Screener (stocks by 52-week price change)
- [6] DataPorium Articles, How Crypto Is Taxed in 2026
- [7] Joint Committee on Taxation, Description of H.R. 10357, the Digital Asset Tax Certainty Act (JCX-47-26, September 14, 2026)