Cost of Goods Sold

Cost of Goods Sold (COGS) is the direct cost paid by a company for what they sell. Learn the definition, formula, how to calculate COGS, and why it matters.

What is Cost of Goods Sold?


Cost of goods sold (COGS) is the direct cost paid by a company for what they sell. This is true whether the company produces their own goods or purchases them from the manufacturer. Cost of goods sold is also called cost of sales, cost of revenue, and cost of services.
If you are a small business owner, you have probably heard of COGS and are confused what goes into cost of goods sold and what goes into operating expenses. A good rule to keep in mind is that COGS only includes direct costs associated with products – such as raw materials and direct labor.
You should record indirect costs – such as marketing, legal fees, travel, and office supplies – as operating expenses. These indirect costs appear lower down on the income statement.

How to Calculate Cost of Goods Sold


To calculate cost of goods sold, you need to know the value of beginning and ending inventory (found on the balance sheet) and all direct expenses related to inventory purchases (found on the income statement).

Beginning inventory refers to how much merchandise was not sold from the previous period. Ending inventory is how much merchandise is left at the end of the period. As a result, the ending inventory for January 2021 would be the beginning inventory for February 2021.

To value your inventory, include costs such as: raw materials, packaging costs, direct labor costs, storage costs, freight costs, custom dusties, and utilities and rent for your manufacturing site (if you manufacture goods).

There are also many ways for accounting for inventory, with three of the most popular methods being LIFO, FIFO, and average cost method.

LIFO stands for Last In, First Out. It’s a system where the latest item of inventory purchased is the first one to be sold.

FIFO is an acronym for First In, First Out. Under this accounting principle, the first item purchased is the first one to be sold to customers.

Average Cost Method assigns costs by looking at the total price paid for manufacturing or purchasing inventory, and dividing that by the total number of units. Another name for average cost method is weighted-average method.

If inventory costs vary over time, or there are multiple different stock keeping units (SKUs) in inventory, you can see how these three methods will provide different results.

Remember that general business expenses, like office rent, office utilities, payroll, insurance, and more, are not included in COGS. These are considered operating expenses, which appear lower on the income statement.

The cost of unsold inventory does not show up here, those are held in inventory or work in progress (WIP) accounts on the balance sheet until the product is sold.


Cost of Goods Sold Formula


The cost of goods sold formula is beginning inventory + purchases during the year - ending inventory. Here is it more visually:


COGS = Beginning Inventory + Purchases During the Period - Ending Inventory

If cost of goods sold is not provided on the income statement, you can find it by calculating beginning inventory plus purchases minus ending inventory.

As we discussed above, there are a few different ways of getting inventory costs so you want to make sure that (1) you include all expenditures in your inventory calculation and (2) you are consistent month-over-month.

It’s also important to match the time period you are looking at. The COGS calculation for the year will use inventory levels from the beginning of the year and end of the year. Whereas the COGS calculation for January would rely on January 1 and January 31 values, respectively.

COGS is typically calculated for a month, quarter, or year.

Changes to an inventory treatment within a period can be tricky and you should check your math carefully if you change from LIFO to FIFO, for example, within an accounting period.


COGS Example


Here are two examples of how to calculate cost of goods sold.


Company A

  • Beginning Inventory: $350,000
  • Purchases During the Year: $600,000
  • Ending Inventory: $300,000

Company B

  • Beginning Inventory: $500,000
  • Purchases During the Year: $270,000
  • Ending Inventory: $540,000

For Company A, here is the Cost of Goods Sold formula step-by-step:


Company A COGS = Beginning Inventory + Purchases - Ending Inventory

Company A COGS = $350,000 + $600,000 - $300,000

Company A COGS = $950,000 - $300,000

Company A COGS = $650,000


Since the ending inventory for Company A was less than the beginning inventory, we know they sold everything they purchased throughout the year and more. We can check this by seeing that COGS was $650,000 compared to $600,000 of purchases during the year.

Now let’s do the same math for Company B.


Company B COGS = Beginning Inventory + Purchases - Ending Inventory

Company B COGS = $500,000 + $270,000 - $540,000

Company B COGS = $770,000 - $540,000

Company B COGS = $230,000


In this case, Company B had a higher ending inventory balance than beginning inventory. This means that there COGS must be less than purchases made, which is correct.


How is Cost of Goods Sold Used?


Executives, investors, and other stakeholders look at cost of goods sold to understand a company’s ability to generate a profit on products sold.

Companies going after a niche or luxury market will have low COGS and high gross margin. By contrast, companies going for high market share will have a high COGS and low gross margin.

In price sensitive markets, you will need to carefully monitor COGS so that you can stay competitive in the market while still having enough profit to cover overhead costs.

Investors in particular will want to see that COGS is steady quarter over quarter. Large swings in labor costs or inventory costs can cause short-term cash problems. Where possible, you want to pay the same amount of money for inventory or have costs decrease as you reach economies of scale.

If you are a small business owner, you will want to carefully calculate cost of goods sold as the rest of your income statement is dependent on getting your COGS value correct.


Relationship between COGS and Gross Profit


You can also derive COGS if you know a company’s total revenue and gross profit because of their relationship on the income statement.

Revenue - COGS = Gross Profit


But that also means we can move this equation around to solve for whatever variable is missing:


COGS = Revenue - Gross Profit

Revenue = COGS + Gross Profit


Cost of goods sold is an expense on the income statement. The relationship between revenue, COGS, and gross profit is important to understanding a company’s financial position.

Final Thoughts


Cost of goods sold (COGS) is the direct cost paid by a company for what they sell. This is true whether the company produces their own goods or purchases them from the manufacturer.

Indirect costs like sales, marketing, research and development, legal fees, and more, do not go into COGS. These are all examples of operating expenses. While operating expenses and cost of goods sold are both expenses on the income statement, it is important to categorize expenses correctly to understand how your business is performing.

What a company sells a product for is called revenue, income, or sales. These three terms are all used interchangeably. total revenue less COGS is gross profit. We suggest closely monitoring COGS and gross profit as your business grows to make sure new projects and initiatives are profitable.

All things equal, you will want a lower COGS. A lower COGS means there is more money left over to invest in other parts of the business, like salaries, marketing, and fixed assets. The bottom line is, for any business, cost of goods sold is an important metric to track.

Start for free today.

Track metrics like the top performing ecommerce stores.