Add the cost of beginning inventory to the cost of purchases during the period. This is the cost of goods available for sale. Multiply the gross profit percentage by sales to find the estimated cost of goods sold. Subtract the cost of goods available for sold from the cost of goods sold to get the ending inventory.