Cost of Goods Sold Calculations for E-Commerce Businesses

Jun 4, 2020

IBA, as the premier business brokerage firm in the Pacific Northwest, is firmly established as a respected professional service firm in the legal, accounting, banking, mergers & acquisitions, real estate, and financial planning communities.  Periodically, we will post guest blogs from professionals with knowledge to share for the good of owners of privately held companies & family owned businesses. The following blog article has been provided by Eric Moore of Accounting Solution Partners (

Cost of Goods Sold Calculations for E-Commerce Businesses

Cost of Goods Sold (or COGS as it is more commonly referred to) is the total cost of selling products, which means it is the cost of doing business for e-commerce and traditional retailers alike. COGS is one of the most important metrics for an e-commerce business because it will be your most significant expense. It informs inventory decisions, pricing strategy, tax calculations, and cash flow management, among other critical business functions. Understanding COGS provides a full picture of revenue generation, arming you with crucial information for better strategic planning.

Despite its importance, many e-commerce solutions do not track COGS for business owners, which means you need to stay on top of it yourself. Using accounting software is an excellent way to track and manage COGS across product lines and the overall business.


COGS is tied to virtually every aspect of a business, so getting it wrong can have serious implications. A miscalculated COGS can negatively affect pricing, marketing strategy, purchasing, forecasting, and cash flow management. It can also result in an incorrect taxable income, resulting in fines and penalties, as well as increasing your chances of being audited.

​If COGS is one of the most valuable metrics for retail businesses, the gross margin is typically considered the most critical parameter. Since COGS is a component of the gross margin formula (Gross Margin= Sales – COGS), it plays a part in this essential figure as well. Therefore, if COGS is wrong, it will also affect other critical key performance indicators (KPIs) up the chain as well.

How to Calculate COGS

COGS = Beginning Inventory + (Purchase Costs + Labor Costs + Materials Costs + Supplies Costs + Miscellaneous Costs) – Ending Inventory

Calculating COGS should be done at the SKU level to provide more granular information. Doing so will arm you with more precise information to enable better decision-making related to individual products and available options. Of course, determining COGS for individual products requires an accounting software that can handle large datasets of cost inputs across all available product option configurations.

To get started, figure out your initial inventory, then define your product-related direct and indirect costs, add inventory purchases, and perform an inventory county to confirm ending inventory. Use these inputs to calculate COGS over a defined reporting period.

Included Costs

On the surface, calculating COGS sounds simple – just add up all your costs, right? Well, not exactly. There are some business costs (like marketing expenses) that do not get added to COGS for any business type. Then, to complicate matters, there are some costs associated with doing business online that e-commerce companies must remember to include, like shipping costs.

Think about it this way; everything that is used to create/build/assemble, package, and ship the product should be included in COGS. This includes your materials, labor, and operations involved in making products, either directly or indirectly.

COGS includes direct costs related to the purchase of products such as:

  • Raw materials and supplies required to make the product
  • Packaging costs
  • Shipping costs

As well as indirect costs related to the facilities, labor, and equipment needed to sell products such as:

  • Labor needed to design, create, and ship products
  • Production facilities costs like warehouse rent and utilities
  • Office building costs like rent and utilities
  • Equipment and machinery needed to produce the product
  • Software and hardware utilized to make and ship products

Some indirect costs like facilities costs are exceptionally complicated to calculate because a portion of each expense must be spread out across all units produced. Lean on an experienced accountant to help in this area and invest in the right software to be able to handle your ongoing cost calculation needs.

Need to find accounting software to assist with COGS calculations? Read our article comparing traditional accounting software with cloud-based accounting software to find the right solution for your e-commerce business.

If you have questions relating to the content of this article, Eric Moore of Accounting Solutions Partners would welcome the opportunity to answer them.  Mr. Moore can be reached at (425) 492-1901 or

IBA, the Pacific Northwest’s premier business brokerage firm since 1975, is available as an information resource to the media, business brokerage, mergers & acquisitions, and real estate communities on subjects relevant to the purchase & sale of privately held companies and family owned businesses.  IBA is recognized as one of the best business brokerage firms in the nation based on its long track record of successfully negotiating “win-win” business sale transactions in environments of full disclosure employing “best practices”.