Begin with opening inventory
Add purchases made during the period
Add direct costs related to production or acquisition
Subtract purchase returns and allowances
Subtract purchase discounts
Add freight-in or shipping costs to acquire inventory
Calculate goods available for sale
Subtract ending inventory
The result is cost of goods sold
