Get your taxes done using TurboTax

yes #3 created a wash sale for #2 but only 10 shares not 30

so really the tax basis of the 10 shares purchased in trade #3 has a tax basis of $700 and the remaining 20 shares  have a tax basis of $1000

trade #4 results in a loss of $300 on those 10 shares with a cost basis of

$700 and a loss on the other 20 shares of $200. so you end up with $500 in losses.

 

your broker should be reflecting the wash sales on the 1099-B which includes adjusting the cost of the wash sale shares to include what you paid + the wash sale amount. 

 

note that for shares acquired that create a wash sale the holding period goes back to the date the original shares were bought (trade 1)