goods sold cost

Running an e-commerce business is a lot more than just selling goods to more and more customers as and when they collaborate with it. While there are various metrics that could be used to track the growth of a business, calculating the Cost of Goods Sold (COGS) help with the most reliable figures to assess the success of a business.

Though it seems easy to have an online platform to track sales and revenue, it involves a lot more complicated infrastructure behind the scenes to help such businesses track the progress and undergo proper scaling. Especially on e-commerce websites where keeping track of orders, customers, quantity, and prices, including discounts, coupons, and other schemes is difficult, having a foolproof online structure to handle calculations is a must. 

As the number of clients and customers increases, the chances of manual error double, which becomes unaffordable, given the name and fame that the brand has already accomplished. Thus, automating the COGS calculation is highly recommended to ensure the trust they have acquired becomes an asset, and not misguide or mislead the leads.

What Is the Cost of Goods Sold (COGS)?

Before diving deep into the calculation part, let us check out how exactly COGS is defined. As the name suggests, COGS refers to the total direct cost involved in the production of the goods and products that a company aims to sell or sells. This cost includes everything from the price of the materials used for containing the finished version of the items to the labor charges involved in the process of production.

However, there are a few costs that COGS does not include. These include the cost of research conducted for developing the products and tooling fees. Normally, the freight out cost, which is the cost of shipping the products to customers, is not included in COGS for other businesses, but they play an important role in the COGS for an e-commerce business venture.

Hence, the inclusions and exclusions for the Cost of Goods Sold vary from one industry or business to another.

COGS – Why Is It Important?

The cost of Goods Sold is important as it forms a vital part of the income statement, which is one of the most significant financial statements for any growing business. As a result, the figure helps calculate the net income, which ultimately indicates the growth of any business venture. Plus, the value affects the taxable income to a great extent. 

Maintaining thorough records facilitates accuracy in computation, thereby helping investors and business ventures be aware and make well-informed inventory decisions, understand tax calculations, deal with cash flow management, and determine effective pricing strategies. The figures obtained let businesses use crucial information and plan further processes and activities strategically.


The calculation of COGS is tough, but using the formula simplifies things a lot. Here is the simple formula to calculate COGS. Let us check it out below:

COGS = Starting Inventory + Purchases Made Within the Period In Question – Ending Inventory


Purchases made within that period include all costs, including labor costs, materials costs, purchase costs, supplies costs, and others. 

Based on the formula, one can easily find out the COGS, using which the businesses can further calculate their gross profit and net profit, using the formula below:

Gross Profit = Gross Revenue – Cost of Goods Sold (COGS)

Net Profit = Revenue – Cost of Goods Sold – Expenses


Company A has an initial inventory worth $15,000. It bought another set of inventory, totaling $5,000 the same year. However, in the end when the production was accomplished, the business was left with inventory worth $3,000. 

In this scenario, the business would use the above formula to calculate the Cost of Goods Sold to the customers within that period. 

COGS = Starting Inventory + Purchases Made Within the Period In Question – Ending Inventory

Putting the values as available in the formula above, we get:

= 15000 + 5000 – 3000

= $17,000

Methods of Calculation

When it comes to calculating the Cost of Goods Sold, there are four methods that businesses can consider to obtain accurate results. These include – The Weighted Average Method, The Specific Identification Method, The First-In & First-Out Method (FIFO), and The Last-In and First-Out (LIFO) Method.

The Weighted Average Method

It is the accounting method that involves considering the average cost of the products in question and not the cost of individual units. For example, if the cost of 50 units is $100 each, 20 units is $80 each, and 10 units is $50, the COGS obtained, using this method, is calculated as:

Using the weighted average method,

COGS = Sum of the total costs/ Total number of products

= (50*100 + 20*80 + 10*50) / 80

= 88.75 per unit

The Specific Identification Method

This is not the calculation method you can choose for any product that you deal with. It is the technique that best works with high-value products that are customized or tailored as per customer needs. These are the products that customers might not find anywhere and hence, are ready to pay as much as you demand. For example, if you have a customized product to sell and you have three price options to sell it at, you are free to select the highest of all, if that’s something unique you are offering.

However, this option should be carefully chosen as it won’t work for any random item you sell.

The First-In and First-Out (FIFO) Method

As the name suggests, this is the method in which the cost of goods sold is considered per the batch the products were produced in. The cost here is determined on the basis of the cost of the first set of items dispatched. 

Suppose, you had three batches of products A, B, and C with varied prices, say $100, $80, and $50 each. You have 100 units of each of the batches and you managed to sell 150 units. In this case, as a business owner, you will consider the first batch and second batch pricing to figure out the average revenue generated out of those 150 units. Here, the COGS calculated would be:

COGS = 100*100 + 50*80   [A’s 100 units of $100 each and B’s 50 units worth $80]

= 14,000

This shows this method is more or less similar to the Weighted Average Method. The only difference is the cost of the first output is considered first.

The Last-In and First-Out (LIFO) Method

It is, as the name indicates, the opposite of FIFO. The ones produced at last are the ones whose prices dominate. 

Let us take the same example into consideration. In this case, when you sell those 150 units, the pricing would be as per the price of batch C. Yes, here the last produced becomes the first preference. Therefore, the COGS would be calculated as:

COGS = 100*50 + 50*80   [C’s 100 units of $50 each and B’s 50 units worth $80]

= 9,000

Based on the type of product to be put for sale and considering the surrounding parameters helps businesses determine the best method of calculating COGS.

Tracking COGS

There are two ways of monitoring the Cost of Goods Sold – Manual Monitoring and Automated Tracking.

As discussed above, computing COGS is a complicated affair. There are multiple criteria to be considered before reaching a figure. Hence, the manual calculation is likely to lead to human errors. Until the business runs on limited customers and limited e-commerce deals, manual handling could be easily done. However, as your e-commerce business progresses and the number of customers increases, the sales figures increase along with the inventory management needs. Thus, keeping calculations manual becomes risky.

This is where the automated systems come into the scene. The automated calculation interface is designed using the formula that best suits the type of products you are dealing with. As users, you can choose the method of accounting based on suitability without any hassle. Things are much easier as manual calculation is not involved. Above everything else, accuracy is guaranteed and hence results are reliable. As a result, business owners can base their decisions on these figures without any second thoughts.

Final Words

Many software solutions have come up nowadays to help businesses get the best COGS calculation functions. As your e-commerce business is reaching new heights, it is recommended that you to take professional help such as eCommerce accounting services to have the best possible accounting, bookkeeping, payroll, and COGs calculation solutions built-in and tailor-made for your business only.

If you think, it’s high time to have such software deployed into your business premises, give us a call anytime. Our professionals will be ready to help anytime you want. For any technical assistance or any kind of query related to COGS, its calculation, or its concept, you can directly connect with us at any hour of the day. We are available 24/7 to assist and guide you. Call us today and connect for more information.

By Anurag Rathod

Anurag Rathod is an Editor of, who is passionate for app-based startup solutions and on-demand business ideas. He believes in spreading tech trends. He is an avid reader and loves thinking out of the box to promote new technologies.