Getty Images / Kmatta All companies must determine ... subtract the goods that the company sold—also called cost of goods sold (COGS)—and the result is the company's ending inventory.