What is The IRS Tax-Loss Netting Algorithm?
Mathematical Foundation
Laws & Principles
- Wash-Sale Rule Danger (CRITICAL): This calculator assumes successful harvesting. If you sell a losing stock to harvest the loss, you are federally forbidden from buying a 'substantially identical' asset for 30 days. If you buy it back on day 15, the IRS 'washes' the trade — rejecting your entire tax loss.
- The Almighty Carryforward: If you take a massive $100,000 loss in a market crash, you don't lose the shield. After using the $3,000 limit, the remaining $97,000 carries forward cleanly to next year. And the year after. And the year after. Unused losses essentially become an infinite, lifetime tax-insurance policy.
Step-by-Step Example Walkthrough
" An executive in the 32% tax bracket made $10,000 in short-term trading gains (normally taxed at $3,200). They decide to explicitly 'harvest' $15,000 by selling an underwater stock they lost faith in. "
- 1. Like-Kind Netting: The first $10k of the ST losses permanently annihilates the $10k of ST gains. The executive just legally saved exactly $3,200 in taxes.
- 2. The W2 Deduction: They still have $5k in ST losses remaining. The IRS allows exactly $3,000 to attack their normal W2 salary. At 32%, that saves an additional $960.
- 3. The Carryforward: The final $2k loss cannot be used this year. It legally carries over to next January 1st to be used against future gains.