Unveiling the Cost of Goods Sold Formula: A Comprehensive Guide


COGS is a crucial accounting measure. It shows the direct expenses linked to making goods or services sold by a company. These expenses comprise raw materials, direct labour, and manufacturing overheads. In financial statements, COGS is subtracted from revenue. This is to calculate gross profit, which shows profitability. A lower COGS compared to revenue signifies higher profitability. It indicates efficient production costs.

Decoding the Cost of Goods Sold Formula

The cost of goods sold formula is:

Cost of Goods Sold = Beginning Inventory + Purchases During the Period – Ending Inventory

It is also known as the cost of sales formula, where,

Beginning Inventory is the Inventory carried over from the previous period.

Purchases during the Period are the cost of acquisitions in the current period.

Ending Inventory is the remaining Inventory unsold at the end of the current period.

Cost of goods sold formula calculates the direct costs of the Inventory sold. These costs are for an accounting period. Accurate calculation is crucial for determining a company’s gross profit and profitability.

Components of the Cost of Goods Sold

The Cost of Goods Sold (COGS) has several components. They represent direct production costs:

  • Direct materials are tangible components, like raw materials or parts. They are directly used in the final product.
  • Direct labour: Consider wages and benefits for employees directly involved in production.
  • Overhead costs are not directly linked to specific units. Examples are utilities and machinery maintenance.

Some businesses may include additional costs like shipping, but inclusion varies. Include only costs for making or buying goods.

Cost Of Goods Sold Formula With Example

Identify Beginning Inventory: Start by finding the value of inventory at the start of the accounting period. It includes raw materials and finished goods. For instance, if you start with $50,000 of Inventory, you include this amount.

Add Purchases: Record the extra Inventory bought during the period. For example, raw materials and finished goods ready for sale. If you buy $150,000 worth of inventory during the year, add this to the inventory at the beginning.

Find Total Goods Available for Sale: Add the inventory and purchases at the start. It gives the total value of goods for sale. 

For example, $50,000 is the beginning inventory. You add $150,000 in purchases. So $200,000 in total goods for sale.

Determine Ending Inventory: At the end of the period, calculate the value of unsold Inventory, known as ending Inventory. If the ending Inventory is $30,000, it represents the remaining unsold value.

Calculate COGS:

COGS = Total Goods Available for Sale – Ending Inventory

Using our example, 

COGS = $200,000 – $30,000 = $170,000

Thus COGS for the period is $170,000.

Let’s take the case of managing a small bakery to put things in perspective. 

At the start of the year, the bakery has $10,000 worth of flour, sugar, and other baking ingredients. Over the year, they buy an extra $20,000 worth of ingredients, making a total of $30,000 in goods available for sale.

By the year’s end, after tallying all sales, they find $5,000 worth of unsold baked goods and ingredients. Using the cost of goods sold formula, the COGS is $25,000. It reflects the direct costs to make the goods sold that year.

Cost of Goods Sold Example for Manufacturing Industry

Calculation of the cost of goods sold for a manufacturing company is tricky as it involves more components. Before applying the cost of goods sold formula manufacturing, one must calculate COGM (Cost of Goods Manufactured). 

In the COGS formula, “Purchases During the Period” is replaced by the cost of goods manufactured. However, the COGS formula remains the same:

Suppose a factory that makes widgets had the following figures for an year:

Beginning Work-in-Process Inventory (Jan 1)–  $25,000 

Beginning Finished Goods Inventory (Jan 1)–  $40,000

Direct Materials Purchased–  $300,000 

Direct Labour Costs–  $150,000 

Factory Overhead–  $80,000

Ending Work-in-Process Inventory (Dec 31)–  $30,000 

Ending Finished Goods Inventory (Dec 31)–  $35,000

The cost of goods manufactured is:

Beginning WIP Inventory + Direct Materials + Direct Labor + Factory Overhead – Ending WIP Inventory 

COGM = $25,000 + $300,000 + $150,000 + $80,000 – $30,000 = $525,000

Then, cost of goods sold is:

Beginning Finished Goods Inventory + Cost of Goods Manufactured – Ending Finished Goods Inventory

COGS= $40,000 + $525,000 – $35,000 = $530,000

For this manufacturing company, the cost of goods sold for the year was $530,000, representing the costs associated with the finished goods sold.

Best Practices in Using Cost of Goods Sold Formula

  • Track your starting inventory well. The cost of goods sold formula needs an accurate count. It also needs the value of inventory at the start of the accounting period.
  • Use a perpetual inventory system. Update inventory levels continuously. Do this as goods are bought or sold, rather than with periodic counts. It ensures accurate inventory values to use in the cost of goods sold formula.
  • Separate direct and indirect costs. Direct costs, like materials and production labour, are in the cost of goods sold. Indirect costs, like rent and utilities, are not.
  • Use a consistent inventory costing method. Choose either FIFO (first-in, first-out), LIFO (last-in, first-out), or weighted average cost. Apply the method consistently.
  • Account for inventory shrinkage. Adjust for lost, stolen, or damaged inventory. It cannot be sold.
  • Count inventory often. Do cycle counts or an annual physical inventory. This finds and fixes discrepancies.
  • Use technology for tracking. You can implement inventory software or barcoding systems. They give accurate real-time data for accurate application of cost of goods sold formula.
  • Analyse cost of goods sold trends. Monitor the revenue percentage. It can reveal issues with pricing, shrinkage, or inefficiencies.
  • Train staff on proper protocols. Make sure employees understand counting, receiving, and data entry.

Cost Of Goods Sold Formula With Sales and Gross Profit

Gross profit reflects what’s left after subtracting direct costs from revenue.

Gross Profit = Revenue – Cost of Goods Sold (COGS)

Gross Profit helps assess the revenue available for operating and non-operating expenses. We calculate the gross profit margin by dividing gross profit by revenue. This is a common profit measure.

Gross Margin (%) = (Revenue – COGS) ÷ Revenue

Companies can increase gross margins by selling more, which lowers per-unit costs. Ordering more raw materials often gets you better pricing. It also cuts the cost of each unit made (COGS).

Related read: Reorder Level Formula and Reorder Quantity Formula


Cost of goods sold formula is crucial for evaluating a company’s profitability and efficiency. However, learning best practices is important for precise calculation of COGS. Remember, it also has a role in determining the efficiency of inventory management systems. By maintaining accurate records and allocating costs correctly, businesses can calculate COGS accurately, following accounting standards.


What is cost of goods sold formula?

The cost of goods sold formula is:
Cost of Goods Sold = Beginning Inventory + Purchases During the Period – Ending Inventory

It is also known as the cost of sales formula.

How to calculate cost of goods sold from income statement?

COGS usually comes after sales revenue on the income statement. To calculate gross profit, deduct it from revenue. It covers all costs related to producing goods or services offered by the company.

How to determine COGS (Cost of Goods Sold) ratio?

To find the COGS ratio, divide COGS by net sales. A low ratio signals that costs are small compared to sales.

What are the components of the COGS (Cost of Goods Sold) formula?

The full form of COGS is Cost of Goods Sold. It represents the expenses to make or buy the products your business sells. It covers raw materials, factory overheads, packaging, and direct labour.