How to Calculate the Cost of Goods Sold for an Online Business?

It’s crucial to find out what is cost of goods sold and how to calculate the cost of goods sold for your online business.
calculate cost of goods sold

Table of Contents


Pricing products may be challenging even for the most established and skilled ecommerce store entrepreneurs, . How can your rates be high enough to make your business successful while still remaining competitive enough for your clients to perceive value and continue doing business with you?

When it comes to price, a number of implicit aspects, such as competitor pricing, consumer expectations, perceived value, and product demand, are all significant factors to take into account. But when it comes to pricing, one specific aspect, your cost of goods sold, or COGS, is crucial.

Setting prices below your cost of goods, or the amount you paid to make or buy the commodities you’re selling, might have a negative impact on your profitability. If you sell products for less than your cost of goods, you are losing money.

We’ll go through the definition of cost of goods, how to calculate it, why it’s significant, and a few examples in this article. You can also use any pricing calculator for calculating the selling price of your products.

What is Cost of Goods Sold?

The cost of goods sold, or COGS, is the price you pay to make or buy the goods you sell. The direct labor and material costs incurred during the manufacturing of the commodities you sell are included in the cost of goods sold. (Note: Cost of products excludes expenditures for items you don’t sell as well as indirect expenses like overhead, marketing, and shipping.

The cost of goods sold for an online store that buys inventory from a third party is equal to the cost incurred to acquire that inventory. The costs directly related to producing the goods, such as the price of labor and raw materials, are referred to as the cost of goods when a store manufactures its own inventory. The COGS can be easily calculated with the help of any cost of goods sold calculator available online.


Subscribe to our newsletter

Get updates on the latest posts and more from High-pe straight to your inbox.

How to Calculate Cost of Goods Sold for an Online Business?

how to caluclate cogs

Cost of Goods Sold Formula:


Cost of Goods Sold (COGS) = Beginning Inventory + (Purchase Costs + Labor Costs + Materials Costs + Supplies Costs + Miscellaneous Costs) – Ending Inventory.


The SKU level should be used to calculate COGS in order to provide more specific data. By doing this, you will be provided with more accurate information to help you make better decisions about specific items and your options. Naturally, calculating COGS for specific products calls for accounting software that can manage enormous datasets of cost inputs spanning all feasible product choice configurations.

Calculate your initial inventory to get started, then specify your product-related direct and indirect expenditures, including inventory purchases, and conduct an inventory count to check your ending inventory. Calculate COGS over a specified reporting period using these inputs.

Example of Cost of Goods Sold

If an e-commerce business tracks its inventory according to the calendar year, it would start recording beginning inventory on January 1 and end recording ending inventory on December 31.

The following method would be used to determine the business’s COGS if it started with an inventory of $15,000, added another $10,000 in purchases throughout the course of the year, and had leftover inventory worth $5,000 at the end of the year.

We know the cost of goods sold formula:

Cost of Goods Sold (COGS) = Beginning Inventory + (Purchase Costs + Labor Costs + Materials Costs + Supplies Costs + Miscellaneous Costs) – Ending Inventory.

COGS= 15,000+10,000-5,000


COGS= 20,000

Cost of Goods Sold Calculator

cost of goods sold calculator

You have two options when it comes to figuring out your store’s COGS: either you hire an accountant or you do it yourself. If you’re not sure how to determine cost of goods sold, you can hire an expert to do it for you or cost of goods sold calculator. Whichever path you choose, you’ll still need to comprehend how the COGS formula functions so you can give your financial representative the proper information.

You’ll want to ensure that your COGS calculation is 100% precise because any error could distort your profit estimate.

You have the added benefit of having access to online tools as an online seller, which can assist you automate your COGS calculation. If you use a cost of goods sold calculator, all you have to do is enter the figures, and the calculator will do the rest of the work for you.

Choose one of the following accounting methods you’ll be utilizing before moving on to the calculation stage (an accountant can assist you with this step):

  1. First-in, first-out (FIFO) cost of goods sold – this accounting technique employs the price of the goods that were manufactured or bought from suppliers first (first-in-first-out)
  2. LIFO in first Out – LIFO bases COGS calculations on the latest batch of products produced or purchased from suppliers (last-in-first-out).
  3. Weighted average: Using this technique, the average cost of products sold is calculated by multiplying the total cost of goods by the number of units that were actually sold.

To clarify, let’s use a few example numbers. Let’s imagine you sell towels and your supplier charged you $3 for the first five toothbrushes you bought from them. You spend $3.50 on the following two towels due to rising fabric prices. The following time frame, you sell 4 towels. Your COGS would be $12 if you used the FIFO technique ($3 multiplied by 4 equals $12). The cost of goods sold (COGS) would be ($3.50 x 2) + ($3 x 2) = $13 if you used LIFO. If you decided to use the weighted average approach, the cost will be $12.5.

Share This Post

Mark Kennedy

Mark Kennedy

Mark Kennedy is an Ecommerce Consultant & Dropshipping Trainer at eComWiser California. He has 12 years of experience in Ecommerce industry. He likes to write articles about dropshipping, ecommerce and online business.

Leave a Replay

Sign up for our Newsletter

Sign up for our newsletter and get exciting free stuff about dropshopping!