What is COGS?

Cost of Goods Sold (COGS) is one of the most fundamental concepts in your business’s finances. It’s one of the first sections on your income statement, and it can affect how you report your business taxes. And like many aspects of bookkeeping and finance, it can be confusing if you don’t have a background in the field. We’re here to clear it up.

COGS are the costs that your business incurs to create and deliver your product or service. If your company sells finished goods purchased from manufacturers, those purchasing costs are also included in your COGS. It’s important to keep in mind that COGS only includes costs directly involved with creating or purchasing your product and getting it to your customers – overhead costs like marketing are considered operating expenses instead (more on that later).

Example: COGS for a Physical-Goods Business

Sample Fitness designs and produces athleisure clothing, which it sells directly to consumers through its website, and through select brick-and-mortar channel partners. The website also offers a small range of related lifestyle products like aromatherapy candles and reusable water bottles, which Sample Fitness purchases wholesale from partner brands.

Sample Fitness’s COGS would include things like:

  • Salaries for its clothing designers
  • Raw materials used in creating the clothes
  • Costs paid to its contract manufacturers to produce the finished clothing items
  • Purchasing costs for acquiring the lifestyle products that Sample Fitness sells but does not produce itself
  • Freight costs for shipping finished products from the factories to Sample Fitness’s warehouses
  • Tariffs and customs for bringing the products into the United States from the overseas factories
  • Fulfillment expenses, like the cost of warehouse storage and picking/packing products to ship
  • Shipping costs to deliver the product to end buyers, including both consumers and channel-partner retailers.
  • Inventory shrinkage and obsolescence

Example: COGS for a SaaS Business

Sample Data develops business analytics software to help large companies better understand their marketing and sales funnels, which it sells on an annual subscription plan. The software leverages a toolset created by a different tech company, and Sample Data pays a license fee to include it in their own product. In addition to the annual subscription, new customers also pay Sample Data a 10% setup fee to cover technical implementation and training for the end users, which is then usually handled by a third-party integration partner.

Sample Data’s COGS would include things like:

  • Salaries for any employees directly involved with building the product and ensuring customers are able to access and use it, such as:
    • Software engineers 
    • Product designers 
    • DevOps engineers 
    • Customer support team 
  • Costs for web hosting, such as AWS
  • License fees for the third-party toolset
  • Fees paid to the third-party integrators for their services during customer implementation

Why COGS Matters

Regardless of your business type, COGS is one of the most important financial metrics for your company to track. Your COGS tells you how efficient you are at creating your product, which in turn affects your business’s gross profitability.

Tracking your COGS against your revenue can help you see opportunities to lower your costs, and increase your profitability. If your COGS are high enough that they’re eating into most of your revenue, you can look closely to see where you might be able to renegotiate a supplier contract, or make a process more efficient. 

If you make or sell physical goods, COGS can also have an impact on your business taxes. Some businesses may be able to claim a deduction for their COGS, lowering their overall taxable income. If you opt to do this, it’s particularly important you’re keeping accurate books. It’s also a good idea to work with a tax professional who is experienced in your industry, to lower your chances of making errors that might lead to IRS penalties.

How to Calculate Your COGS: Physical Goods

For companies that sell physical products, calculating COGS first means determining the value of their inventory. There are several possible inventory valuation methods:

First In, First Out (FIFO)

This method assumes that your oldest inventory is sold first. For example, say a business acquired 500 units of a certain product at a cost of $20 each, and then acquired another 800 units at a cost of $10 each. Under the FIFO method, the first 500 sales of that product that the company makes will be valued at a cost of $20, regardless of whether the individual product sold was part of the $20 batch or the $10 batch. After 500 units are sold, the next 800 units after that will be valued at a cost of $10 each.

Last In, First Out (LIFO)

This method assumes that your newest inventory is sold first. Let’s go back to the business from our first example, which acquired 500 units of their product at a cost of $20 each, and then acquired another 800 units at a cost of $10 each. If the business used the LIFO method, its first 800 sales of that product would be valued at $10 each – assuming it did not acquire more, newer inventory before then. 

If the company sold 300 units valued at $10, then acquired an additional 100 product units at a cost of $12 each, its next 100 sales would then be valued at $12. After that, it would resume valuing sales at a cost of $10, until it either ran through the rest of the 800 units or acquired newer inventory.

Average Cost

This method takes the weighted average of all units, and uses that number to value the cost of sales. Our example company acquired 500 units of their product at a cost of $20 each, and then acquired another 800 units at a cost of $10 each. If the business uses the average cost method, then it would calculate the weighted average of all its current stock of that product:

(500×20+800×10) / (500+800) = 13.84

The weighted average is 13.84, so under this method, all 1300 sales would be valued at a cost of $13.84.

The COGS formula

Regardless of which method you use, you’ll need to complete inventory valuation as part of calculating your COGS.

The COGS formula for businesses that sell physical goods is this:

Beginning Inventory Cost + Purchases – Ending Inventory Cost = Cost of Goods Sold

Step 1: Value the inventory your business had at the beginning of the accounting period. This might be a month, year, or quarter.

Step 2: Add the costs of purchases your business made as part of creating your products. This includes raw materials, direct labor, and manufacturing overhead costs.

Step 3: Value the inventory your business had at the end of the accounting period

Step 4: Subtract the ending inventory cost from the combined starting inventory and purchase costs. The resulting number is your COGS for that accounting period.

How to Calculate Your COGS: Services

While the concept for COGS and Cost of Service (COS) is the same – totalling the costs related to providing your product – COS is calculated a bit differently. Since service-based businesses generally do not have physical inventory, concepts like FIFO and LIFO don’t apply. Instead, you simply add up the direct costs of providing your service.

The COS formula

Calculating COS is much more straightforward than COGS. The COS formula for businesses that sell services is this:

Sum of All Direct Costs of Providing Service = COS

For many service businesses, the bulk of their direct costs will be labor. If there are material goods involved in providing your service, however, those costs will be included here also.

Let’s look at some examples.

Company A provides business consulting services. It employs 10 consultants who are each paid $120,000 in total compensation, and during the accounting period it also paid $8500 in total travel costs for the consultants to perform on-site client work. Company A’s COS would look like this:

(10 x $120,000) + $8500 = $1,208,500

Company A’s COS for this accounting period was around $1.2M.

For a slightly different situation, let’s look at Company B. Company B provides high-end salon services, including hair and nail styling. It directly employs 6 stylists who are each paid $70,000 in total compensation. While Company B is a service company, providing their service requires materials such as styling gel and manicure supplies. During the accounting period, Company B also spent $10,000 on hair products and $3,300 on nail polish, which were used to provide its services to customers. 

(6 x $70,000) + $10,000 + $3300 = $433,300

Company B’s COS for this accounting period was around $433K.

COGS vs. OPEX

While at first glance they may seem similar, COGS and OPEX are two distinct concepts in bookkeeping. They indicate different types of costs, and give you different insights about your business.

As we’ve seen, COGS includes costs directly related to providing your product or service. What it does not include are indirect costs that go towards running the business itself, rather than creating and delivering the product. Instead, these indirect costs are included in your operating expenses (OPEX). OPEX commonly includes costs like marketing, office rent, administrative costs, and salaries for employees not directly involved in creating the product.

OPEX examples

Many companies’ OPEX will include costs like the following:

  • Salaries and wages for employees not directly involved in building/delivering the product, such as:
    • Sales reps
    • Retail staff
    • Marketing 
    • HR
    • Finance
    • IT/ internal tech support
  • Rent for office or retail locations
  • Utilities for office or retail locations
  • Marketing costs such as advertising and promotions
  • Insurance policies such as business insurance and workman’s comp
  • Software tools for administrative or marketing functions (CRM, HR platform, expense management, etc)
  • Fees for professional services such as contract bookkeepers or tax preparers
  • Employee training and perks
  • Office supplies
  • Business travel, except if required to deliver the service onsite (ex: gasoline expenses)

Your company’s OPEX amount tells you how efficient you are at running your company overall, not just in creating the product.

With COGS, you can track your business’s efficiency, identify opportunities to lower your costs, and possibly even lower your business taxes. The bottom line? Understanding your COGS is a crucial piece of the puzzle for understanding the overall health of your business. 

Still not sure how to calculate your business’s COGS – or what to do with it afterward? A Pilot expert can help

Laura Knight

Laura is a Silicon Valley native with over a decade of experience writing on business and technology topics. She currently leads content marketing for Pilot.

Stay in the know

Subscribe for business tips, tax updates, financial fundamentals and more.

Thank you!

A confirmation email has been sent to