Add the cost of your most recent inventory purchases to the cost of goods sold before your earlier purchases, then add that figure to your ending inventory..