You can calculate the cost of goods sold from the records documented during your previous accounting period. To calculate this, add the beginning inventory value to purchases during the period, and then subtract the ending inventory from this sum. The result is the cost of goods sold (COGS).