Cost of goods sold (COGS) is the total of all costs directly attributable to the production of the products sold by a company. You will also see it referred to as the cost of sales. They do not include the costs of items not sold. As these costs are held as inventory.

Costs attributable to production include:

  1. The cost of the materials used to create the product
  2. Direct labor costs used to produce the product

Indirect costs are also not included in the COGS figure. A company incurs both operating expenses (OPEX) and the cost of goods sold (COGS) while operating a business. Whereas COGS are directly tied to the production of goods, OPEX are not. Therefore they are separated from the COGS on the income statement.  Operating expenses are inevitable, and will always be a factor for any business in operation, regardless of whether it’s doing high-volume sales or has virtually no customers at all.

Examples of operating expenses include:

  • Rent
  • Utilities
  • Office supplies
  • Legal costs
  • Sales and marketing
  • Payroll
  • Insurance costs

For example, a shoe company will have direct costs like rubber, cotton, dies, and other raw materials going into the production of their shoes. They will also have direct labor costs to pay the employees that make the shoes. These costs add up to the COGS.

They will incur costs in marketing the products, renting store space, shipping, administrative expenses, etc. None of these costs will be a part of the COGS. As they do not directly relate to the manufacturing of the product.

Examining Cost of Goods Sold (COGS)

The beginning inventory for the period is the inventory left over from the previous period. Simply put this is any product not sold during that time.

Costs of any additional items produced or purchased by the company are added to the beginning inventory. And at the end of the period, the costs of the products not sold (ending inventory) are subtracted from the sum of the beginning inventory and the additional purchases.

The final amount derived from this calculation is the cost of goods sold (COGS) for the period.

The formula for COGS:

COGS = Beginning Inventory + Production or Purchases during the period – Ending Inventory


If company XYZ begins the month with $100,000 of inventory. Purchases $500,000 of inventory during the month. And ends the month with $50,000 worth of inventory. With those numbers, let’s plug in the formula for COGS.

You can calculate that company XYZ’s total cost of goods sold (COGS) is $550,000 for the month.

COGS = $100,000 + $500,000 – $50,000 = $550,000

Costs associated with the inventory that is sold appears as an expense on the income statement as the cost of goods sold. With this entry, the costs are matched with the revenues of the goods sold in the accounting period. Thereby achieving the matching principle in accounting.

The inventory account on the balance sheet is an asset of the goods waiting to be sold. This is where the cost of unsold goods will sit until they are sold.


The cost of goods sold is an important entry on the financial statements. It is a primary component of calculating gross profit. You find the gross profit by subtracting COGS from revenues. This gives you a measure of how efficiently a company is turning sales into a profit.

COGS affects nearly all of a company’s profit measures. With COGS you can calculate gross income. And with the gross income, you can calculate operating income and net income.

  • Gross Income = Gross Revenue – COGS
  • Net Income = Revenue – COGS – Expenses

As you can see, COGS is an integral part of a company’s ability to profit. It is critical to management’s financial and strategic business decisions.

Being a cost of doing business, cost of goods sold (COGS) is recorded as an expense on the income statement. So if COGS increases, net income will decrease. Thus creating less profit for you. It’s important for you to watch for changes in either direction for insight into increasing expenses, better management of vendors, or any other number of factors. Think of it as a wheel COGS helps to spin, interlinking with other income factors like gears to determine the distance, or income, made in the year.

Cogs written inventory optimization

Image: shutterstock

Accounting Inventory Methods and COGS

Different inventory methods will generate different COGS. This is true even if companies are in the same industry. So it is important to keep this in mind when comparing companies. You need to know the inventory valuation method and the differences they create.

There are three generally accepted methods of valuing inventory. The value of the cost of goods sold (COGS) depends on the changing costs of materials and labor along with which method a company adopted.

3 inventory valuation methods:

  • Average cost method
  • FIFO (first in, first out)
  • LIFO ( last in, first out)

Average Cost Method

With this method, the cost of all goods in inventory regardless of the purchase date is used to value the goods sold.

To calculate, you take a simple average of all similar items in inventory to get an average cost per unit.

Then you simply multiply the average cost per unit by the number of units sold to get COGS.

Taking the average cost over a period smooths the COGS number. It is also the easiest and least expensive method. As you don’t have to track each unit separately.


With the first in, first out method (FIFO), the first items added to inventory are considered to be the first items sold. Thus where costs are increasing, this will generally result in lower costs being charged to COGS. Resulting in a lower COGS amount. And vice versa.

FIFO stocks are based off the assumption that older product was probably sold before newer product. It’s the optimal method for inventory valuation for businesses that gradually raised their prices throughout the period.

boxes depicting FIFO

Image: shutterstock


With the last in, first out method (LIFO), the last items added to inventory are assumed to be the first ones sold. Thus where costs are increasing, this will generally result in higher costs being charged to COGS. Resulting in a higher COGS amount. And vice versa.

LIFO stocks are based off the assumption that the newer product was probably sold before the older product. It’s the optimal method for inventory valuation for businesses with rising costs because it accurately correlates with the business’s situation. If a business has more costly product sales over time, that needs to be reflected in accounting, so assuming newer products were sold ensures the higher ticket items are counted in COGS.

boxes depicting LIFO

Image: shutterstock

Comparison Calculations:

100 units sold in the accounting period.

chart comparing inventory valuation methods leading to cost of goods sold

As you can see in the charts above, with the average cost method, you simply find the average cost of each unit based on all units in inventory regardless of their purchase date. Use the average cost and multiply by 100. This gives you a COGS of $50,555.

With FIFO you are taking the costs of the first 100 units purchased. This gives you a COGS of $50,440.

With LIFO you are taking the exact costs of the last 100 units purchased. This gives you a COGS of $50,650.

Each method gives you a different cost of goods sold (COGS). Thus making it important for you to understand each. And when comparing companies, know which one they are using.

Limitations of COGS

COGS can be manipulated by accountants and managers.

Some examples:

  • Overstating discounts
  • Overstating returns to suppliers
  • Incorrectly counting/ misstating the quantity of inventory on hand
  • Allocating more overhead to inventory than actually exists
  • Failing to write off obsolete inventory

When inventory is artificially inflated, COGS will be under-reported. Which will lead to falsely higher gross profit margin and inflated net income.

As you look through a company’s financial statements, check for inventory build-up. Such as inventory rising faster than revenue or total assets reported. This will be a red flag to look into.

Take Away – COGS

The cost of goods sold (COGS) is the cost directly attributable to the purchase and production of the products sold by a company. It is, therefore, very important to the profitability of a company.

By deducting COGS from a company’s revenues, you will end up with the gross profit. Making it an important figure in all levels of profitability. Including the all-important net income. It, therefore, affects the return on your investment.

The value of COGS changes depending on the inventory valuation method used. You need to be aware of which one a company is using. With that, you will be able to compare companies in a meaningful way.

You will also be watching for inventory buildup as a red flag of potential manipulation of COGS or just a change in some area of costs or management. Look into it. It may be a problem you will then be aware of. Or it could be nothing. Being informed is the key. Don’t be caught off guard.

Don’t be a fool. Learn the tools and use them. Below you can join us for free training.

Author: RagingBull

RagingBull is the foremost trading education website where traders of all skill and experience levels can learn to trade or to become a better trader. Students can learn from experienced stock and options traders, and be alerted to the real money trades these traders make. Become a better trader with RagingBull.com's courses and programs.

Learn More

Leave your comment

Related Articles: