The basic COGS formula
Cost of goods sold equals beginning inventory plus purchases and direct inbound costs, less purchase returns and ending inventory. Use figures from the same reporting period and the same currency.
This general trading-business formula may not reflect manufacturing cost accounting, which can include raw materials, labour, overhead and work in progress.