calcuate inventory from merged list