Cost of Goods Sold: What Is COGS and What’s Included?


Need Help With Order Fulfillment? ShipBob Can Help.

Let’s Talk

Subscribe for More

Enjoying this article? Join the tens of thousands who get the latest from ShipBob’s blog emailed every other week.

To most people, cogs are little gears in machinery. But when it comes to a business’s finances, COGS is something else altogether — something neither little nor insignificant. 

COGS (an acronym for the term “Cost of Goods Sold”) is key to assessing your business’s profitability. Without it, you will not have an accurate sense of your expenses, revenue, and ultimately bottom line, so it is crucial that retailers both understand COGS and know how to use it in their own calculations. 

In this article, we’ll break down what COGS is, why it’s important for your business, and how to calculate it, and how to use it in relation to other important metrics. 

What is cost of goods sold?

Cost of goods sold, or “COGS” for short, refers to the amount of money your business spent to produce or procure the products that you sold. 

Most commonly, this includes the cost of raw materials, factory overheads, packaging, and direct labour. For a business that makes its own products, it helps to determine how much is spent to develop your finished goods inventory. If you’re not making your own products, it would include the cost of buying products intended for resale.

Why knowing COGS is important for businesses

COGS is one of the most versatile and informative metrics that your business can track. Here are just a few of the roles COGS plays in ecommerce businesses, and a few reasons why it’s important to understand it. 

Understanding your business’s financial health

If you don’t know how much money you are spending to create or acquire products, it will be difficult (if not impossible) to correctly determine if you are turning a profit. Tracking and calculating COGS meticulously enables you to get a more accurate sense of your business’s profitability, which is a key factor in the overall financial health of your business. 

“When I was shipping orders myself, what I paid per order is the same price now to pick, pack, and ship orders through ShipBob. It’s even much cheaper to ship to certain countries, which used to take ages and often got lost with localised post here.

Now, I have very transparent pricing, and I can easily run and plan my business. I also like that I’m billed right away. My old courier billed monthly, which would drain a huge sum of Euros from my account at once. My cash flow has improved.”

Leonie Lynch, Founder & CEO of Juspy

Making more strategic decisions 

By correctly determining how much money you spend acquiring or making goods, you empower your business to make better decisions based on that information. 

For example, if you calculate last quarter’s COGS and see that it is higher than your profits, that insight can inform what you do in the next quarter, and help you find ways to solve the problem (by lowering COGS, increasing profits, or finding funds elsewhere).

Pricing your products strategically

Another key benefit of calculating your cost of goods sold is that it gives you insight into how much you’re spending on your inventory, which in turn will affect how you price for your products. When you price your products right, you’re able to effectively cover your costs and also maintain a healthy profit margin while remaining competitive.

Effectively managing your books

Because COGS is instrumental to calculating your net income, COGS is always included as a line item on financial statements. This means that tracking and recording COGS is essential for maintaining an accurate financial record in your books. 

For tax purposes, businesses must use COGS to calculate what it owes. The expenses included in your COGS are usually tax-deductible, so the more accurate your records are, the better you can manage your taxes.

Cost of goods sold formula

To calculate your cost of goods sold, you need to add together your starting inventory and your inventory purchases, and deduct your ending inventory from that total. The formula looks like this:

COGS = Starting Inventory + Purchases – Ending Inventory

For example, let’s say a bag manufacturer starts the year with $10,000 worth of inventory. During that year, they spend an additional $25,000 on raw materials and production costs to create more inventory. At the end of the year, they close with $5,000 worth of inventory. In this case, their cost of goods sold for the year would be as follows:

COGS = Starting Inventory + Purchases – Ending Inventory

COGS = $10,000 + $25,000 – $5,000

COGS = $30,000

Below is a calculator to help you complete your own COGS calculation.

Calculator: COGS (cost of goods sold)

Enter the values below, and hit “Calculate” to find your cost of goods sold.
Note: This calculator is currency-agnostic.

What is included in cost of goods sold?

Typically, all of the direct costs associated with producing new products or acquiring inventory are included in a business’s calculation of COGS. If you’re unsure of whether or not a cost should be included in your COGS, ask yourself whether the cost would exist if you didn’t produce or procure the goods. If it wouldn’t exist, then you should probably include it in COGS.

Some of the most common examples of costs that fit under COGS are:

  • Raw materials
  • Goods purchased for resale
  • Factory labour costs
  • Factory overhead costs
  • Storage costs
  • Freight-in costs
  • Parts used in production

What is NOT included in COGS?

Not all business expenses can qualify as a cost of goods sold. Costs that keep a business running but that are not directly related to making or obtaining inventory — such as administrative and selling expenses — are not included in COGS. These may include office rent, accounting and legal fees, advertising expenses, management salaries, and distribution costs. 

All non-operating expenses are also excluded from COGS, including interest and capital expenditures.

Keep in mind that the costs accrued in producing products that remain unsold at the end of a given accounting period are also excluded from COGS. Instead, they’re counted as beginning inventory for the next calculation period. 

COGS vs. operating expenses

It’s easy to confuse COGS with operating expenses, as both of them refer to the expenses incurred in running a business. However, they are not the same thing. 

The key difference between them is that, while COGS expenses are strictly related to producing or acquiring products, operating expenses are not. Operating expenses is a broader category than COGS, and any expense related to conducting operations can qualify as an operating expense. 

Common operating costs (which would not fall under COGS) include:

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

COGS vs. cost of sales

While “cost of goods sold” and “cost of sales” sound similar, they are different things. 

Cost of sales is a slightly broader category than COGS, but not as broad as operating costs. Essentially, it refers to all direct and indirect costs associated with producing goods and services for sale. 

In addition, cost of sales is not tax-deductible, unlike cost of goods sold.

COGS vs. revenue

COGS and revenue are different entities: COGS is related to expenses, whereas revenue is related to income.

COGS is also distinct from “cost of revenue”. Cost of revenue refers to costs paid for contract services, such as labour services or sales commissions. In order for these costs of revenue to count as COGS, the IRS dictates that services rendered must produce a physical product that is sold. 

For example, a toy painter’s labour hours count as a COGS expense, as the toys they paint are ultimately sold. However, a consulting lawyer’s labour hours would not be permitted as a COGS expense, because the lawyer’s work does not produce a physical, sellable product.  

Where COGS falls short

While COGS is a very useful metric to look at, it can’t do everything. For instance, COGS cannot effectively track changes in inventory, especially changes related to loss, theft, damages, or donations — changes that, unless properly accounted for, can skew your financial reports and result in inaccuracies.

Additionally, COGS can’t be helpful if it’s calculated using inaccurate data. If you’re simply trusting the inventory numbers in your records, those numbers could be off, which would make any COGS value calculated using those numbers off as well. 

Therefore, it’s important to do physical inventory counts to verify whether your records are accurate. This will then allow you to accurately calculate your COGS, and minimise the impact of human error.

Another limitation of COGS is that it’s relatively easy for unscrupulous accountants and managers to manipulate. They may try to allocate higher manufacturing costs, or overstate discounts and returns made to suppliers. They might even try to overvalue inventory on hand, alter your ending inventory, or fail to write off obsolete inventory

In all these scenarios, your financials will not accurately reflect your financial reality, and may result in under-reporting of your COGS. This means that your gross profit margin recorded will be higher than your actual profit, inflating your net income.

Cost of goods sold on your income statement

Your inventory recording method will determine the value of your COGS. Here’s a breakdown of the three main approaches that you can use to record the level of inventory sold during your reporting period.


FIFO, or the “first-in-first-out” method, assumes that the first goods that are purchased or produced are the first to be sold. In other words, the oldest inventory is the first to leave the warehouse and get shipped to the customer. 

This means that the COGS of the oldest inventory is used for calculating the value of the ending inventory, even if there have been recent changes in the cost of inventory. 

For example, say your small business makes and sells tapestries. Within your first quarter, your business buys the materials to make 10 tapestries. At the beginning of the quarter, it cost $50 to make each tapestry, and you made 7 tapestries. But over time, the price of the raw materials goes up, and the last 3 tapestries you make in the quarter cost $80 each to make. In that quarter, you sell 8 tapestries. 

Under the FIFO accounting method, you would assume that the first tapestries your sold were the first ones you made — the ones that cost $50 apiece to make. 

Therefore, your COGS would be calculated as follows: 

COGS = (7 x $50) + (1 x $80)

COGS = $350 + $80

COGS = $430

Since prices tend to increase over time due to inflation, a FIFO business will usually sell its least expensive products first. In the long run, this will decrease its COGS and increase its net income.


LIFO, or the “last-in-first-out” method, assumes that the last goods that are purchased or produced are the first to be sold. In other words, the newest inventory is the first to leave the warehouse and get shipped to the customer.

With this method, the cost of the most recent products is used in calculating the COGS. 

Continuing the example above, let’s say your business uses the LIFO accounting method instead. Let’s assume all the details are the same: the first 7 tapestries cost $50 apiece to make, the last 3 cost $80 apiece to make, and you sold 8. 

Under LIFO, you would calculate COGS as follows:

COGS = (3 x $80) + (5 x $50) 

COGS = $240 + $250

COGS = $490

Assuming prices go up over time, a LIFO business sells its most expensive products first. This will increase its COGS while its net income decreases.


WAC, or “weighted average cost”, is an inventory valuation method that calculates COGS based on a weighted average of all the goods in stock, without considering the date of production or purchase.

It’s calculated by dividing the total cost of goods produced or purchased by the number of units available for sale. 

In the example above, you would first find the weighted average cost of all 10 tapestries you made. You could calculate that as follows:  the you would calculate COGS as follows: 

WAC = [(7 x $50) + (3 x $80)] / 10 

WAC = [$350 + $240] / 10

WAC = $590 / 10

WAC = $59

Next, you would multiply the number of units you sold in the time period by this weighted average cost to get COGS:

COGS = $59 x 8 tapestries sold

COGS = $472

Since this method isn’t affected by purchase or production date, the COGS is less likely to be impacted by cost fluctuations.

What other formulas businesses need to know

In addition to COGS, there are a few other formulas businesses will need to use to understand their overall profitability and business health.

Inventory shrinkage

Inventory shrinkage occurs when physical inventory levels are lower in reality than what has been recorded. Inventory shrinkage can occur due to issues like shipping damage, theft, or even human error. It’s an important metric to calculate because it’s necessary for maintaining a more accurate record in your accounting and tax calculations.

You can use the following formula to calculate your shrinkage rate:

Inventory Shrinkage Rate = (Recorded Inventory – Actual Inventory) / Recorded Inventory

Cost per unit

Cost per unit is a metric that represents all the costs (both variable and fixed) associated with producing or procuring a single unit of your products. Understanding your cost per unit is key to setting the right price for each product, and to maintaining profitability and competitiveness. 

You can use the following formula to determine your cost per unit:

Cost per unit = (Total fixed costs + Total variable costs) / Total units produced

Reorder quantity

Reorder quantity refers to the number of units requested in an inventory replenishment purchase order. Identifying the optimal reorder quantity is crucial, as a business should maintain just enough inventory to prevent stockouts without accidentally overstocking

You can use the following formula to calculate reorder quantity:

Optimal Reorder Quantity for a SKU = Avg. Daily Units Sold  x Avg. Lead Time

“ShipBob’s analytics tool is also really cool. It helps us a lot with planning inventory reorders, seeing when SKUs are going to run out, and we can even set up email notifications so that we’re alerted when a SKU has less than a certain quantity left. There is a lot of value in their technology.”

Oded Harth, CEO & Co-Founder of MDacne

Ending inventory  

This refers to the amount of sellable inventory that your business has left at the end of a given reporting period. Your ending inventory is used in the calculation of COGS. As such, it has an impact on your balance sheets and your taxes, making it an important metric to calculate. 

The following formula is used in the calculation of ending inventory: 

Beginning Inventory + Net Purchases – COGS = Ending Inventory

How ShipBob can help with COGS and other calculations

ShipBob’s inventory management software provides ecommerce merchants with visibility into key data and powerful analytics through the ShipBob dashboard. The software automatically tracks key metrics across order fulfilment and shipping, so that merchants can access more accurate information with less effort.  

In particular, ShipBob’s analytics tool lets you automatically calculate your average units sold per day, inventory on hand, warehousing cost, and average cost per unit stored — all of which make it easier to find your total cost of goods sold. 

If you have a Shopify store, ShipBob’s direct integration with Shopify lets you easily view the profitability for different order combinations. You can enter your COGS and the cost of each SKU, which will then automatically calculate your profitability analysis.  

If you want to learn more about how ShipBob can help you track key metrics like COGS — as well as other important inventory, order, and warehousing analytics — click the button below to speak to a fulfilment expert. 

“When I found ShipBob, I was so taken back by how thorough everything was. I’m obsessed with the dashboard – everything I need to know is there. If I want to know shipping analytics or shipping prices, it’s all right there and so transparent. I love ShipBob’s analytics tool. I like being able to look at the last seven days of shipping costs.

It’s so nice to see exactly what the average shipping cost is and make sure the number that my Shopify store has customers paying matches what’s in the ShipBob dashboard. Having those kinds of metrics on hand at any point is incredible. I’ve never experienced that before. It’s great to know that whenever I’m interested in checking data, I can log on right away without having to email anybody for answers.

As I grow my business, I’ve realised how important little details like analytics and insights are. If I can’t go in and see that information like I can in ShipBob, it’s going to hinder my ability to grow the business. Ultimately, we left our old small fulfilment centre because everything ShipBob offered blew them out of the water.”

Nichole Jacklyne, Founder of Slime by Nichole Jacklyne

Cost of goods sold FAQs

Below are answers to the top questions about COGS.

What is the difference between cost of goods sold and inventory?

Inventory refers to the products that you have available for sale, whereas cost of goods sold is the direct costs associated with producing or procuring those goods.

What is the formula for cost of goods sold?

Cost of goods sold is calculated by deducting your ending inventory from your starting inventory and purchases. The formula is as follows:

COGS = Starting Inventory + Purchases – Ending Inventory

What is not included in cost of goods sold?

COGS only includes the expenses directly related to the production or procurement of goods for sale. It doesn’t include administrative, selling, or general expenses. Office rent, accounting and legal fees, advertising expenses, and management salaries are some expenses not included in COGS.

Written By:

Rachel is a Content Marketing Specialist at ShipBob, where she writes blog articles, eGuides, and other resources to help small business owners master their logistics.

Read all posts written by Rachel Hand