wash sale date calculator — how do I figure out the 30-day window?
Got hit with a wash sale flag on my 1099-B and I'm trying to build a wash sale date calculator in a spreadsheet so I can check my trades before I file. The situation: I sold shares of a tech ETF at a loss on March 14, then bought back into what I think is a substantially identical fund on April 8. My broker flagged it as a wash sale in box 1g, but I'm not confident I know how to count the days correctly — do I count from the sale date, or the settlement date? And does the 30-day window go in both directions from the sale? I already tried counting calendar days from March 14 and I keep second-guessing myself. What's the actual rule, and how do I build a reliable date window around any sale so I don't keep making this mistake?