Tax Loss Harvesting: Capital Loss Mechanics & Wash Sale Rule

Capital Loss Netting  •  $3,000 Ordinary Offset  •  Wash Sale Rule §1091  •  Year-End Strategies  •  Crypto Exception  •  Updated 2026
IRC §1211 IRC §1212 IRC §1091
← cpavalidated.com

Tax loss harvesting is the deliberate realization of capital losses to offset capital gains and reduce tax liability. It does not eliminate the tax - it defers it by resetting the cost basis of the sold position to a lower number. Done correctly, the tax savings compound over time because the deferred tax is an interest-free loan from the government. Done incorrectly - by repurchasing the same or substantially identical security within 30 days - the loss is disallowed entirely under the wash sale rule.

Capital Loss Netting: How the Rules Work

Capital gains and losses are first categorized as short-term (held 12 months or less) or long-term (held more than 12 months). They are then netted within each category, and the resulting net short-term and net long-term amounts are combined under the capital gain and loss netting rules of IRC §1222.

Netting ResultTax Treatment
Net long-term gain + net short-term gainLTCG taxed at 0%/15%/20% rates; STCG taxed as ordinary income
Net long-term gain + net short-term lossShort-term loss offsets long-term gain; net is LTCG at preferential rates
Net long-term loss + net short-term gainLong-term loss offsets short-term gain; net is STCG at ordinary rates (unfavorable)
Net capital loss (both categories)Up to $3,000 deductible against ordinary income per year; excess carries forward indefinitely
Loss character matters on the way out. When net long-term losses offset net short-term gains, the taxpayer is using low-rate losses (worth 20% x rate differential) to offset high-rate gains (worth 37% rate). This is unfavorable ordering. Where possible, harvesting short-term losses to offset short-term gains - and long-term losses to offset long-term gains - maximizes the value of each loss. In practice, specific identification of which lots to sell can control this.

The $3,000 Annual Ordinary Income Offset

Net capital losses in excess of capital gains can offset up to $3,000 of ordinary income per year ($1,500 for married filing separately). This limit has not been adjusted for inflation since 1978 and is not indexed - $3,000 in 2026 is worth far less in purchasing power than it was when the limit was set. Unused capital losses carry forward indefinitely to future years and retain their short-term or long-term character.

Large loss carryforwards are valuable but require planning. A taxpayer with $500,000 of capital loss carryforward can offset $500,000 of capital gains in future years - but only $3,000 per year against ordinary income. Strategic realization of capital gains in years where large carryforwards exist - particularly long-term gains that would otherwise be taxed at 23.8% - is high-value planning. A financial planner or CPA can model the optimal pace of gain realization against the carryforward.

The Wash Sale Rule: IRC §1091

The wash sale rule disallows a capital loss if the taxpayer sells a security at a loss and, within 30 days before or after the sale, purchases the same or substantially identical security. The 61-day window (30 days before through 30 days after the sale date) is the key timing constraint.

What the Wash Sale Rule Does and Doesn't Do

The wash sale rule does not permanently disallow the loss - it defers it. The disallowed loss is added to the basis of the replacement security purchased within the wash sale window. When the replacement security is eventually sold without triggering another wash sale, the deferred loss is recovered. The wash sale rule also extends the holding period of the replacement security by the holding period of the sold security.

Example: Sell 100 shares of XYZ at $5,000 loss (held 8 months). Buy 100 shares of XYZ 15 days later at $45. Wash sale: loss is disallowed. New basis = $45 + $50 loss per share = $95. New holding period: 8 months + counting from repurchase.

What Is "Substantially Identical"?

The IRS defines substantially identical broadly. Securities from the same issuer are identical. Stocks and convertible bonds or convertible preferred of the same company can be substantially identical. However:

Wash Sale Across Accounts and Spouses

The wash sale rule applies across all accounts owned by the same taxpayer - including IRAs. Selling a stock in a taxable account at a loss and buying the same stock in an IRA within 30 days triggers the wash sale rule, and the loss is permanently disallowed (not deferred - because the replacement purchase is in a tax-advantaged account where the basis adjustment is not tracked). Spouses filing jointly are treated as one taxpayer for wash sale purposes - a loss sale by one spouse is washed by a repurchase by the other.

IRA wash sales produce permanent loss disallowance. Unlike taxable account wash sales where the loss is deferred via a basis adjustment, a wash sale where the replacement purchase is in an IRA loses the loss permanently. The IRA has no tax basis tracking that can absorb the disallowed loss. This is one of the most common and costly wash sale errors.

Year-End Harvesting Strategies

Offset realized gains before year-end. If you have already realized capital gains during the year, harvesting losses before December 31 directly reduces the tax owed. Short-term losses should be matched against short-term gains first for maximum benefit.

Harvest without repurchasing. To avoid the wash sale rule, wait 31 days before repurchasing the sold security. During the 31-day window, hold cash or purchase a similar-but-not-substantially-identical security to maintain market exposure.

Accelerate gains in 0% years. Taxpayers in the 0% long-term capital gains bracket (income below approximately $98,900 MFJ in 2026) should consider deliberately realizing gains rather than harvesting losses. Selling appreciated positions and immediately repurchasing steps up the basis at zero tax cost - eliminating the embedded gain for future years when rates will be higher.

Crypto loss harvesting is available year-round. Because the wash sale rule does not apply to cryptocurrency (property, not securities), crypto positions can be sold at a loss and immediately repurchased without triggering the wash sale rule. This allows continuous loss harvesting on volatile crypto positions without the 31-day waiting requirement.

Authority: IRC §1211 (limitation on capital losses - $3,000 annual offset against ordinary income); IRC §1212 (capital loss carryovers - indefinite carryforward retaining short-term or long-term character); IRC §1222 (other terms relating to capital gains and losses - netting rules); IRC §1091 (loss from wash sales of stock or securities - 61-day window: 30 days before through 30 days after sale); IRC §1091(b) (basis adjustment for disallowed loss - added to cost of replacement shares); IRC §1091(d) (holding period adjustment for wash sale replacement shares); IRC §1091(e) (IRA wash sale - disallowance applies when replacement purchase is in IRA); IRC §1(h) (preferential tax rates on long-term capital gains - 0%, 15%, 20%); Rev. Rul. 2008-5 (IRA wash sale rule - loss permanently disallowed when replacement security purchased in IRA); IRS Notice 2014-21 (crypto as property - wash sale rule does not apply); Treas. Reg. §1.1091-1 (wash sale regulations - definition of substantially identical); Rev. Proc. 2024-28 (specific identification of crypto assets).
tk.cpa AI Lab
Mission Privacy tk.cpa
Nothing on this page constitutes legal, tax, accounting, or professional advice, and no professional relationship is created by your use of this website. CPA Validated is an educational website for information purposes only. Information should be verified against current primary authority, including the Internal Revenue Code, Treasury regulations, IRS guidance, and applicable state or local law, before being relied upon or acted on. Calculator outputs are estimates only and may be incomplete or inaccurate depending on the facts, assumptions, and inputs used. CPA Inc. and tk.cpa disclaim liability to the fullest extent permitted by law. Full disclaimer: cpavalidated.com/disclaimer.html