COGS (Cost of Goods Sold)

  • Written by Ganesh Pawar 3 min read
  • Updated: July 21, 2025

What are COGS (Cost of Goods Sold)?

COGS, or Cost of Goods Sold, refers to the direct costs involved in producing or purchasing the products a business sells. It includes expenses like raw materials, direct labor, packaging, and manufacturing or wholesale costs. It excludes indirect costs such as marketing, rent, admin salaries, software subscriptions, and other operating expenses.

This number tells you what it actually costs to deliver a product to the customer. Knowing your COGS helps you understand true profit margins, set accurate pricing, and report your finances correctly.

COGS sits on your income statement directly beneath revenue, and the relationship is straightforward: Revenue − COGS = Gross Profit. Gross profit is one of the clearest signals of whether your business model is actually viable.

How to calculate COGS

Here’s how you can calculate COGS:

COGS Formula: COGS = Beginning Inventory + Purchases – Ending Inventory

For ecommerce businesses, the costs that should be included in COGS typically are:

  • Product or unit cost paid to suppliers
  • Inbound shipping and freight to receive goods at your warehouse or 3PL
  • Import duties, tariffs, and customs fees
  • Direct labor involved in production or pick-and-pack
  • Packaging materials shipped with the product

Costs that should not go into COGS:

  • Marketing, advertising, and customer acquisition spend
  • Rent, utilities, and admin salaries
  • Software, app subscriptions, and platform fees
  • Outbound shipping (in most cases, this is a separate fulfilment expense)

A useful rule of thumb: if a cost would still exist even if you sold zero products this period, it is probably not part of COGS.

Why is COGS important for ecommerce and subscriptions?

Understanding the cost of goods sold is essential for maintaining healthy margins and scaling profitably. COGS is subtracted from sales (your revenue, or GMV in ecommerce reporting) to arrive at gross profit, the figure most operators rely on to judge whether unit economics actually work.

For subscription businesses, where pricing and recurring revenue models are often fixed upfront, even small changes in per-cycle COGS can have an outsized impact on long-term sustainability. Tracking COGS at the cycle or shipment level makes it easier to spot margin erosion before it compounds.

Example of COGS

Let’s say you sell a skincare subscription box. Each box costs you $12 to produce, including products and packaging, and you sell it for $30. Your COGS per box is $12, your gross profit per sale is $18, and your product margin is 60% ($18 ÷ $30).

To see the formula in action across a full month: if you started with $2,000 of inventory, purchased $12,500 more during the month, and ended with $2,500 of inventory left, your COGS for the month would be:

$2,000 + $12,500 − $2,500 = $12,000

Driftcharge Tip

Regularly review your COGS to find cost-saving opportunities and protect your margins. Even small adjustments in supplier pricing, packaging, or inbound shipping can compound into meaningful gains over time, especially for subscription brands billing the same SKUs every cycle.

Author Image

Ganesh Pawar

Ganesh Pawar is the founder of Driftcharge, a subscription management app designed to help Shopify merchants streamline and scale their subscription businesses. With a deep focus on solving real-world pain points—like legacy account page support, flexible subscription options, and advanced analytics—Ganesh is passionate about building tools that drive growth and retention.

You may also like