Sell units and watch which layer drains.
Beginning inventory: 10 units @ $91
Under a , a sale drains whatever layers exist on its date — nothing that arrives later. The Aug 14 sale never touches the Aug 17 purchase; the Aug 31 sale can reach every layer bought all month.
With costs rising all month, leaves the newest, priciest units on the shelf, so it reports the highest income. does the reverse, and reports the lowest tax bill.