Portfolio Management, Tax-Loss Harvesting & IRC Section 1091
Tax-Loss Harvesting & IRC §1091 Partial Wash-Sale Formula
Calculate Realized Harvested Capital Loss ($), IRC Section 1091 Share-Matched Disallowed Wash-Sale Loss ($), Deductible Current-Year Loss ($), and Adjusted Replacement Lot Basis ($/sh).
Partial DRIP buys inside the 61-day window only disallow loss share-for-share—and step up new basis!
Under IRC Section 1091, if an investor sells stock or an ETF at a loss on Day 0 and purchases "substantially identical" shares within 30 calendar days BEFORE or 30 calendar days AFTER the sale (a 61-day window across taxable, spouse, or IRA accounts!), a wash sale occurs. Two misconceptions confuse tax-loss harvesting audits: first, if you sell 1,000 shares at a loss and an automated dividend reinvestment (DRIP) buys 250 shares two weeks later, IRC §1091(b) disallows ONLY MIN(1,000, 250) = 250 shares—leaving 750 shares deductible immediately! Second, in a taxable replacement lot, IRC §1091(d) adds the disallowed per-share loss directly onto the replacement shares’ cost basis (Adjusted_Basis_Sh = Replacement_Buy_Price + Loss_Per_Share), deferring rather than destroying the tax benefit (unless bought inside an IRA, where the loss is permanently lost)!
Verify on a Partial DRIP Wash Sale—Shares_Sold = 1,000 (B2), Original_Cost = $85.00/sh (B3), Harvest_Sale_Price = $65.00/sh ($20.00/sh loss, B4 -> $20,000.00 realized loss in E2), Replacement_Shares_61d = 250 (B5), and Replacement_Buy_Price = $66.00/sh (B6): Disallowed Wash-Sale Loss is 250 * 20 = $5,000.00 (E3), Deductible Current-Year Loss is $15,000.00 (E4), and Adjusted Cost Basis on the 250 Matched Replacement Shares steps up to 66.00 + 20.00 = $86.00/sh (E5)!
| IRC §1091 Wash-Sale KPI (Sell 1,000 @ $85->$65, Buy 250 @ $66 in 61d) | Formula | Verified Output |
|---|---|---|
| Total Realized Capital Loss ($) | Shares_Sold * (Orig_Cost - Sale_Price) | $20,000.00 |
| Disallowed Wash-Sale Loss ($) | MIN(Shares_Sold, Repl_Shares) * Loss_Per_Sh | $5,000.00 ($0.00 if 0 Repl) |
| Deductible Current Tax Loss ($) | Realized_Loss - Disallowed_Wash_Loss | $15,000.00 ($20,000.00 Clean) |
| Matched Replacement Basis ($/sh) | IF(Repl_Sh=0, 0, Buy_Price + Loss_Per_Sh) | $86.00/sh ($0.00 if 0 Repl) |
IRC §1091 Share-Matched Deductible Loss & Stepped-Up Basis Formula
Validate Shares_Sold > 0, Original_Cost > Sale_Price > 0, Replacement_Shares >= 0, and Replacement_Buy_Price >= 0!
=LET(sh_s, B2, cs_0, B3, sl_p, B4, sh_r, B5, by_p, B6, IF(OR(sh_s <= 0, cs_0 <= sl_p, sl_p <= 0, sh_r < 0, by_p < 0), "Invalid Loss Harvest Input", LET(ls_p, cs_0 - sl_p, ws_s, MIN(sh_s, sh_r), ROUND((sh_s - ws_s) * ls_p, 2))))Clean Zero-Replacement Harvest vs Full 100% Wash-Sale Checks
Set Replacement_Shares_61d B5 to 0 (swapping into a non-identical index ETF): Disallowed Loss E3 is $0.00 and Deductible Current Loss E4 captures the full $20,000.00! Conversely, set B5 = 1,200 (>= 1,000 sold): all $20,000.00 E3 is disallowed today (E4 = $0.00) and carried into the 1,000 matched replacement shares at $86.00/sh E5!
=IF(ISTEXT(E4), E4, IF(B5 = 0, 0, ROUND(B6 + (B3 - B4), 2)))Try the example
Use the original values or change them to test your understanding.