In short, cost of goods sold (COGS) refers to the carrying value of goods sold during a specific period of time. However, this "carrying value" is basically all direct cost that went into the production of the goods sold by the company. Direct cost include direct material labor, and it excludes indirect cost, such as overhead. Cost of goods sold is an income statement items. Subtracting COGS from revenues gives us gross profit or gross margin.
Cost of goods sold = Beginning finished goods inventory +cost of goods manufactured - ending finished goods inventory