“Cost of Goods Sold” Explained (Plus: Formula & Calculator)

Rachel Curry

Rachel Curry

Published on: 30 August, 2022

Updated: 20 September, 2022

People counting cash with calculator

Business owners need to know the price they're paying for their products so they can maintain their profit margins during inflation. 💵

This information is called the cost of goods sold (COGS).

Why is COGS important? 👇🏼

  • It helps you to see a clear picture of your business’s profitability.
  • It informs upcoming business decisions.
  • It helps track expenses to estimate your taxable earnings (so you can keep a positive cash flow at tax time).

And COGS is more than just a number—it’s a tool for growth. When you know your COGS, you can compare yourself to industry benchmarks, position yourself competitively, and scale. 💪🏾

By definition, cost of goods sold is a metric that tells you how much it costs to create your product. 

You can calculate COGS for your own goods or services using the cost of goods formula or a COGS calculator. When you use consistent product valuation methods and accounting methods (more on that below!), COGS is a useful tool.

Heads up: Cost of goods sold is sometimes called cost of sales (COS), but we’ll stick to the term COGS here. 💯

Cost of goods sold formula

The basic COGS formula is:

Beginning inventory + Purchases − Ending inventory = COGS

In this case, beginning inventory is unsold product from the previous financial period.

Purchases include any costs directly related to the product that you make during the period in question (like fiscal quarter or year).

Ending inventory is anything unsold by the end of the current period.

Woman using laptop

How to value inventory when calculating COGS

One of the biggest factors in the COGS formula is inventory valuation.

When you buy inventory more than once during a given period, you may pay different prices at different times. This is super relevant as supply chain bottlenecks, inflation, and other global economic factors contribute to more cost variation. 📈 

You can organize the way you sell inventory in different ways, but it’s best to stay consistent. A few of these inventory methods include:

  • First in first out (FIFO): Assume that inventory is sold from the older (and often cheaper) purchase batch first.
  • Last in first out (LIFO): Assume that inventory is sold from the newer (and often more expensive) purchase batch first.
  • Average cost method: Take average prices of all products to avoid calculating for inflation and variable costs.

FYI: Include the direct cost of inventory in your COGS equation. General and administrative expenses not related to your products, like office supplies and other overhead costs, fall under operating expenses. You can include salaries & labor costs in COGS when it’s directly tied to the production of the good or service.

Accountant using calculator

What is the COGS ratio?

The COGS ratio (aka cost of sales ratio) tells you the percentage of sales revenue you’re using to pay for your products. It’s helpful from a general business sense because different companies pay different prices for their products, and a percentage is more generally comparable than a dollar value.

To get your cost of goods ratio, follow this formula:

COGS / Total sales X 100 = COGS ratio

How do you find your gross profit margin using COGS?

To get your gross profit margin, follow this formula:

(Total revenue - COGS) / Total revenue = Gross profit margin

Checklist: Calculating cost of goods sold

Couple doing calculations with calculator

  • Set your financial reporting period (monthly, quarterly, or yearly). 📆
  • Determine your inventory value method (FIFO, LIFO, or average cost). Choose what makes the most sense for your industry, company, and products. 
  • Calculate the total cost of your raw materials, parts, items bought for resale, direct labor costs, transportation, storage, and/or cost of services.
  • Check for any indirect costs that go into your products, like factory overhead and labor. Remember, these indirect expenses must still be tied to specific products. (For example, you only have one product that requires refrigeration, so refrigeration costs are directly related to that product and thus a part of its COGS.)
  • Take stock of beginning inventory and ending inventory. To reiterate, beginning inventory is any unsold product at the start of the financial period. Ending inventory is any unsold product at the end of the financial period.
  • Gather your sales numbers. 
  • Use your beginning inventory, sales, and ending inventory to complete the COGS formula above. 
  • Keep records of your COGS and financial statements (the IRS may want to see them for income tax purposes, but stakeholders may also want to know these numbers). 📃

COGS calculator

Once you have your starting values required for the formula, you can use any calculator (like this one) to determine your COGS—if you’d rather not do it manually.

Many inventory management software solutions automatically calculate your cost of goods sold.

Pro tip: Make your own COGS calculator in Excel by laying out a template like this:

COGS calculator example in Microsoft Excel

Image Source: EDUCBA

What is a ‘good’ COGS? Industry benchmarks

Over time, you’ll learn what constitutes a good COGS for your company. However, looking at how yours stacks up against your competitors’ can be helpful. An easy way to do this is to find your gross profit margin (calculated using COGS and total revenue, as we laid out above) and compare it to industry averages.

Note: Net profit margin is often wildly different from gross profit margin. However, gross profit margin better reflects COGS (and has more reliable benchmark data than COGS).

Here are some average gross profit margins by industry, according to NYU Stern School of Business:

Average gross profit margin as calculated from COGS by Industry

NYU Stern says the average gross profit margin for the total market is 38.44% (for comparison, the net profit margin for all businesses after operating expenses are taken into account is 9.84%).

COGS and accounting: FAQs

How is COGS defined in generally accepted accounting principles (GAAP)?

In generally accepted accounting principles (GAAP), COGS is a type of business expense. It factors in all costs directly associated with producing a product or providing a service that you already sold.

What type of account is COGS?

COGS is a business expense, not an asset. Expenses reflect the cost of a company’s operations. You can track the COGS expense through different accounting periods (for example, your COGS in Q4 may be a bit higher due to increased wholesale demand during the holidays).

Is cost of goods sold a debit or credit?

When making a journal entry in your books, record COGS as business expenses (debits) on your income statements. Add credits to purchase and inventory accounts (this decreases your COGS).

How does COGS affect net income?

COGS and net income have an inverse relationship. When the COGS for a product or service increases, net income decreases at the end of the year. This is because higher costs shrink your margins.

Bottom line on cost of goods sold

While the cost of goods sold is a simple formula, it is an important bit of information for most companies. Retailers, service providers, small business owners, and more find merit in COGS. It guides them in the effort to reduce production costs and increase gross profit margin. Ultimately, this leads to a more favorable balance sheet for any business. 🏫

Generic CTA

Pigeon Loans Divider

Want to read more related content? Check out some more of our awesome educational pieces below: