You have to consider your FIFO cost, not your weighted cost.
Buy 100 shares at $10
Buy 100 shares at $5
Weighted cost = 200 shares at 7.50
However if you sell 100 shares, you now have 100 shares at a cost of $5.
If you sold 101 shares, you now have 99 shares at a cost of $5.
These are the...