Businesses need to track all direct costs of processing goods for sale, including labor and material expenses. These costs are known as Cost of Goods Sold (COGS), a calculation that usually appears in a business’s Profit and Loss statement (P&L). 

COGS is also an important part of tax return information because who doesn’t want correct tax deduction? Knowing how to calculate COGS can help you determine the correct product price, detect growth opportunities, and manage your taxes.

What is the Cost of Goods Sold (COGS)?

Cost of Goods Sold (COGS) represents all costs involved in producing goods that a company sells over a certain period of time. The cost of goods sold, also known as the cost of services or the cost of sales, includes both the cost of materials used to create the goods and the cost of direct labor (employees’ salaries).

COGS can be used by businesses that create products, including digital goods sold online. Besides that, companies in the service industry can also use COGS in the form of cost of revenue. 

cost of goods sold cogs

So, what’s the COGS formula?

How to Calculate Cost of Goods Sold – The Formula

You can apply the following formula to calculate the cost of goods sold:

COGS = beginning inventory + purchases – ending inventory

Let’s take a quick look at the components of COGS:

  • Beginning inventory: this is the company’s inventory from the previous period. It could be the previous quarter, month, year, etc.
  • Purchases: these are the total costs of what your company purchased during the specified accounting period.
  • Ending inventory: the inventory that remained during that period.

COGS are simply the direct costs involved in the production of goods in a specific company for a certain period. The total amounts include components such as:

  • Costs of materials: direct costs like supplies and raw materials. All indirect costs should be ignored and can’t be included in costs relating to the calculation of COGS. An indirect cost can include expenses such as marketing or sales expenses.
  • Direct labor costs: the wages directly paid to employees who work on the company’s products during the manufacturing process.

Note: depending on your type of business and business goals, you may find calculating COGS necessary annually, quarterly, monthly, bi-weekly, or even weekly in some instances.

A man posing happily in front of a vivid purple background for an engaging blog post.

Like what you're reading?

Join the informed eCommerce crowd!

Stay connected to what’s hot in eCommerce.
We will never bug you with irrelevant info.

By clicking the Button, you confirm that you agree with our Terms and Conditions.

Cost of Goods Sold Examples

Example 1

Let’s say you want to calculate the cost of goods sold in the first quarter of 2021. Your inventory record’s beginning inventory will be on 1st January and ends on March 31. If your business had a beginning inventory of $20,000 and the purchases totaled to $9,000 for that quarter, and you hand an ending inventory of $5,000, then your total COGS for that quarter will be:

COG= Beginning Inventory + Total Purchases on the Specified Period – the Ending Inventory

COG= $20,000+ $9,000 -$5,000 = $24,000

Therefore, the total costs of goods (COG) sold in that quarter are $24,000.

Example 2

The beginning inventory recorded for the fiscal year ended in 2020 is $3,000. There is also an additional inventory purchased during the 2020-2021 fiscal year amounting to $2,000 and $1500 ending inventory recorded at the fiscal year ended 2021. Based on the COG formula, the cost of goods sold will be:

COG=$3,000 + $2,000 – $1,500 = $3,500.

Example of a Cost of goods sold worksheet (COGS Worksheet)

Extended COGS Formula

It’s a more detailed formula that includes components such as returns, freight charges, discounts, and allowances. So, the extended COG formula is:

COGS = Beginning inventory + purchases + Freight In – Ending inventory – Purchase Discounts – Purchase Returns and Allowances.

  • Beginning inventory: this is the inventory amount at the opening of the stock period.
  • Purchases: any costs incurred for purchasing manufactured products or setting up a product, for instance, raw materials.
  • Freight In: the transport costs incurred for the raw materials being brought to the setup location or factory.
  • Ending inventory: the amount of closing stock for the specified period.
  • Purchase discounts: they are discounts that are received in the product supply chain.
  • Purchase returns and allowance: purchase returns are costs incurred when items are returned to suppliers. Meanwhile, allowances are any additional benefits that are received in the product’s purchase chain.

Consider a company XYZ manufacturing packet of pens. Note that the direct cost of manufacturing one packet is $2.00, and below are the other statistics.

  • Opening inventory: 3000 packets
  • Closing inventory: 1,000 packets
  • Freight in $20,000
  • Discounts received: $4,500
  • Purchase costs: $50,000


The cost of opening inventory: 3000 x 2 = $6,000

The cost of closing inventory: 1000 x 2 = $2,000

COG= $6,000 + $50,000+ $20,000-$4,5000 – $2000 = $69,500.

> Discover the top 10 KPIs that have a major impact on your Customer Lifetime Value.

COGS Calculation Tips

Determine the direct cost and indirect cost. Know to differentiate between the two since you need to ignore indirect costs in your calculations. Salaries, rent paid on the building used to carry out the business’s manufacturing activities, or even the depreciating value of tools used in the production process are all indirect costs.

Find out the beginning inventory. If your business does COGS calculations annually, then the beginning inventory of every year should be the same as last year’s ending inventory.

Changes in COGS/ How to Value Your Inventory

There are three types of inventory costing techniques that you can use to value your inventory:

First In, First Out (FIFO)

Goods that were manufactured or purchased first are the first ones to be sold. With FIFO inventory, it means that your business will have to sell first the least-expensive products. That’s why this method usually results to lower COGS.

Last In, First Out (LIFO)

The latest goods, i.e., the last goods to be added to your inventory, must be first sold. LIFO can lead to higher COGS. This is because when the cost of goods starts to increase, then goods with higher overall costs will be first sold, and with time, you will find that your net income will decrease.

Average Cost

This inventory method is used to find the average cost per item. It’s an important technique that helps eliminate or minimize the effect of inflation on the value of items in the inventory. This is usually based on the average price of all the current products in stock.

Note: regardless of the inventory method you choose, it’s important to find a technique that works for your business and stick it. This will help to ensure calculation consistency. Besides that, this brings in familiarization and can help you quickly determine possible calculation errors.

Interpreting Your Business’s COGS

Now that you know the information relayed by COGs, what does this mean to your business? The first thing you need to realize is that COGS are critical in determining the operational efficiency of your business. This can help you quickly pinpoint the parts of the production process that increase your operational costs.

This way, you can reduce operational costs by minimizing your staff, reducing machine idle time, or implementing new business tactics. With the use of COGS, you can promote operational efficiency by:

Trying to minimize thefts and product damage the best way possible

Avoiding overstocking to avoid losses and increased warehousing and storage costs

Getting enough stock to avoid last-minute orders or loss of revenue.

Apart from production efficiency, this formula is also ideal in comparing the costs of different products. For companies dealing with multiple products, such information can help identify products that bring in more money and result in losses.

So, what happens if you think you are efficiently running your business, but you still find your COG is extremely high? If you are selling multiple products, you might want to discontinue products with high COGS.

COGS Metrics and Ratios

To effectively determine the number of goods sold for a business and its financial health, the ratios and metrics that can be used with COGS are:

COGS Ratio

Its usually used to highlight the sales revenue percentage used by businesses to pay for those expenses that directly vary with sales.

COGS ration = (COGs/ Net Sales) x 100

For instance: if a Company Z has COGS of $50,000 and total net sales of $60,000, then its COGS ratio will be:

(50,000/60,000) x 100 = 83.3%

Inventory Turnover

It’s a type of ratio used to determine how good a company can generate sales from the inventory. Inventory turnover indicates the number of times that the involved company has sold and replaced its inventory in a given period. To calculate it:

Inventory formula = COGS/ Inventory Average

The average of any inventory can be established by adding the ending and beginning of the inventory and then dividing this amount by two. High inventory turnover is proof of more sales and moderately good inventory.

Gross Profit Margin

It’s the percentage of sales revenue a company retains after incurring all its COGS. It should be noted that the higher the gross margin, the more the amount a business can retain from every dollar of revenue.

Gross margin = ((Sales revenue – COGS) / Sales Revenue) x 100

> Discover how to promote your best products using the Product Assortment Optimization Framework.

Cost of goods sold versus operating expenses

To understand the difference between operating expenses and the costs of good solds, you must take into account how you attribute said costs.

Operating expenses the expenses that aren’t directly tied to creating the product. These can include rent, administrative fees, office supplies, etc. The majority of your costs will go under this category.

COGS on the other hand, refer strictly to the costs directly involved in producing the goods: the materials you used, delivery, labour, etc.

Why Is It Important to Know COGS?

If you are operating a small business, here is why you should know your COGS.

Set the right product price

If you know your COGS, you can set up the correct product cost without deterring your customers. With the right price, you will be able to successfully cover your business’s operating costs while ensuring that you earn a healthy profit margin. Generally, you will be in a good position to know when you need to reduce or increase your product prices. Of course, you can use COG alongside other industry-approved techniques to ensure that you effectively compete with other businesses in the same niche.

cogs income statement

Manage Your Taxes

There is a direct relationship between your COGS and your taxes. Note that sold COGS for your business are tax-deductible. COGS are usually the second line item that appears in the income statements of companies. You don’t want to get into legal disputes for not correctly filing your taxes.

If your business has high COGS, you will pay less in taxes with lower net income. This will also be a key highlight in alerting you that your business is highly likely not making enough profit; hence, you need to implement a system that creates a healthy balance between your business’s profitability and operational costs.

Detect Growth Opportunities

Consistently using COGS means using the historical data attained to determine seasonal trends. By using the historical changes, you can identify new opportunities that will drive the growth of your business. For instance, if your COGS are higher in winter, you can diversify your business with products in demand in winter to minimize the risk of making losses.

Analyze Your Business’s Health

You can use COGS to calculate different ratios, which means that you can conveniently determine your business’s health. As a result, you can make better decisions, especially those more likely to impact your business positively. Additionally, the obtained information can help you figure out if your business should try and reduce operational costs, if you can fully pay your debts or if you should consider closing down your business.

If you are an eCommerce business looking for a way to unlock significant data-driven growth, then you should consider using REVEAL. This software program can organically increase the number of customers loyal to your business. Additionally, it provides actionable insights on how you can maximize profits and helps to enhance customer lifetime value.

The high-performance software program is already being used by more than 2200 brands, including Decathlon, Heineken, Culture Kings, Your Super Foods, etc. REVEAL’s main features include:

  • Customer analytics and segmentation
  • Product performance
  • Customer experience
  • Integrations
  • eCommerce analytics

If you are ready to enhance your e-commerce customer lifetime value, then get REVEAL now on Shopify or other platforms.

Are There Businesses That Don’t Have Listed COGS?

Yes, there are businesses with zero COGS. Therefore, they don’t list their COGS in the income statement. However, this doesn’t mean that these businesses don’t have any expenses because they might still have operating costs such as office supplies, rent, and other utilities. Examples of companies without inventories include:

  • Accounting firms;
  • Business consultants;
  • Software as a Service (SaaS) businesses.

Limitations of COGS

An important aspect when we talk about understanding cost of sold goods is that the numbers can be misleading.

Let’s look at the limitations of COGS and how you can avoid falling into them.

Numbers can be manipulated

Whether it’s about a misleading accountant, or someone who honestly doesn’t know the cost of goods sold formula, your COGS on paper not always reflect the reality.

Keep an eye out for value of ending inventory (which can be altered), discounts (can be overstated), and manufacturing costs (which can be exaggerated).

Frequently asked questions about COGS

Q: How Do We Calculate Cost of Goods Sold COGS?

A: COGS = the starting inventory + purchases – ending inventory.
Beginning inventory is the value of the product inventory that you started with. It’s usually the same number recorded in the previous ending inventory. Purchases are usually the costs incurred during the reporting period, while ending inventory is the value left at the end of the reporting period.

Q: What Goes into the Cost of Goods Sold or COGS?

A: These are direct costs involved in producing goods sold for your business. COGS includes directly used labor and the total costs of the materials used to create products. Additionally, other costs such as trade and cash discounts, freight-in, and total costs are included in this calculation. However, COGS doesn’t include any indirect costs, e.g., sales forces expenses or distribution costs.

Q:What is cost of goods sold and how is it calculated?

Costs of Goods Sold (COGS) represent the expenses involved into producing your goods over a certain period of time. The COGS formula is: COGS = the starting inventory + purchases – ending inventory.

Q:What are examples of COGS?

Examples of COGS include the cost of raw materials, direct labor costs, and manufacturing overhead costs. In a retail business, the cost of the products purchased for resale would be considered COGS. For a service business, COGS may include the cost of supplies or labor directly associated with providing the service. Essentially, any costs directly tied to the production or purchase of goods or services sold by the business can be considered COGS.