Notification Stop Random Testing.Get the Strategies that Actually Boost Profit.
Join Discord

Cost of Goods Sold (COGS): Definition & How to Calculate It

By Tracy NgMay 26, 202511 min read
Cost of Goods Sold (COGS): Definition & How to Calculate It

Understanding your real profit starts with knowing your Cost of Goods Sold (COGS). Whether you’re running a Shopify store or a broader eCommerce operation, COGS helps you figure out exactly how much it costs to sell a product—so you’re not guessing when it comes to profitability.

In this guide, we’ll break down what COGS is, how to calculate it, and how eCommerce businesses can use it to make smarter decisions. 

What Is Cost of Goods Sold (COGS)?

Cost of Goods Sold (COGS) refers to the direct costs involved in producing or acquiring the products you sell. Your COGS directly impacts your gross profit. The higher your costs, the less profit you keep. That’s why understanding your COGS is essential to growing a sustainable Shopify business.

If you’re a Shopify seller, check our dedicated guide on Shopify COGS.

For most eCommerce stores, COGS typically includes:

  • Product or manufacturing costs
  • Packaging
  • Shipping to warehouse
  • Custom duties or import fees
  • Any direct fulfillment costs

Note: COGS doesn’t include marketing spend, platform subscriptions, or payroll—it focuses only on what it takes to deliver your product to the customer.

Cost of Goods Sold Formula

COGS = Beginning Inventory + Purchases During the Period − Ending Inventory

But for eCommerce sellers, especially those using dropshipping or third-party fulfillment, this formula simplifies into:

COGS = Product Cost + Packaging + Shipping + Customs/Duties

How to Calculate Cost of Goods Sold 

To calculate the cost of goods sold accurately, you need to account for every direct cost that goes into delivering your product to the customer. Here's a practical step-by-step process tailored for eCommerce stores:

1. Start with the cost per unit

This is your base product cost—what you pay your supplier or manufacturer per item. If you purchase in bulk, divide the total cost by the number of units.

Example: If you buy 500 units for $5,000, your unit cost is $10.

2. Add fulfillment and packaging

Include any warehouse pick-and-pack fees, packaging materials (boxes, tape, inserts), and branding costs like custom labels or thank-you cards. These often vary depending on how you fulfill orders (in-house, 3PL, or dropshipping).

Notice: Don’t underestimate these "small" costs—they add up fast.

3. Include shipping to customers or warehouses

This covers the cost to either ship from your supplier to your fulfillment center or directly to your customers. If you offer free shipping, it should still be included in your COGS since you're covering the cost. For global sellers, you need to account for both international freight and local last-mile delivery fees.

4. Don’t forget transaction-level costs

These are often overlooked. Include customs fees, taxes, currency conversion fees, per-order transaction costs, or processing fees if applicable. For print-on-demand or dropshipping models, these are especially important to track accurately.

5. Track COGS in Real Time - Not at Month-End

Many eCommerce merchants track COGS monthly or in batches but by then, the data’s already outdated. In reality, COGS fluctuates constantly. Moreover, it isn’t just hard to track—it’s easy to get wrong. A supplier discount today, a packaging change next week, or region-based shipping fees can all affect your true cost per order. When you rely on monthly averages or static spreadsheets, you risk misjudging your profit margins - especially at the SKU level.

Even a small change, like a $2 difference in supplier cost, can throw off your entire profit forecast if you’re relying on spreadsheets. That’s why real-time, precise tracking is non-negotiable.

Tip: To make better decisions, you need COGS data that reflects what’s happening now, not what used to be true last month. Tools like TrueProfit help you automate this process, tracking COGS per product, per order, and in real time - so every marketing, pricing, or scaling decision is based on accurate numbers.

Cost of Goods Sold Example

Let’s say you run a store selling custom hoodies. Here’s how your COGS might look:

Item

Cost (USD)

Product cost from supplier

$15.00

Branded packaging

$1.50

Shipping to customer

$5.00

Customs/import fees

$1.00

Total COGS

$22.50

If you sell the hoodie for $45, your profit would be:

$45 - $22.50 = $22.50

Tip: If you don’t want to manually check your profit, try this free profit checker.

Why COGS Matters for eCommerce Profitability

Among ecommerce metrics, COGS is the foundation of every profit calculation you make. It’s how you determine whether your pricing strategy is sustainable, if your ad campaigns are truly profitable, and where you can afford to scale.

Here’s why tracking COGS helps you grow:

  • See true profit in real time. Especially if you’re running paid ads or influencer campaigns.
  • Spot unprofitable products. If a SKU has high returns or low margins, COGS will reveal it.
    Make better pricing decisions. Know your break-even point before running discounts or promos.
  • Scale smartly. Once you know your high-margin winners, you can confidently reinvest in them.

Stop relying on rough estimates. Start scaling with confidence.

If you're not tracking your Cost of Goods Sold (COGS) with precision, every pricing or marketing move could be based on false assumptions. COGS is constantly evolving with supplier rates, packaging updates, regional fees, and order sizes. Applying a flat cost across all orders might seem efficient, but it can quietly erode your margins and lead to costly misjudgments.

That’s where TrueProfit stands out. It calculates your COGS with unmatched granularity. It factors in SKU-level changes, time-based fluctuations, regional differences, and supplier dynamics. From packaging tweaks to seasonal price hikes, every change is captured in real time, with zero manual input.

And because TrueProfit also syncs your ad spend, fees, shipping costs, and refunds, you get a real-time, 360° view of your actual profitability - not just numbers on a spreadsheet.

Don’t let outdated COGS data sabotage your store growth. Try TrueProfit and turn every business decision into a profit-backed move.

TrueProfit Shopify Profit Tracker

avatar
Tracy Ng

Senior Content Executive at TrueProfit & SEO/Content Specialist

Tracy is a senior content executive at TrueProfit – specializing in helping eCommerce businesses scale profitably through content. She has over 4 years of experience in eCommerce and digital marketing editorial writing. She develops high-impact content that helps thousands of Shopify merchants make data-driven, profit-focused decisions.

Related BlogsSee All
Margin vs. Markup Explained: Formulas & Key Differences
Finance Fundamentals

Margin vs. Markup Explained: Formulas & Key Differences

What Is a Good Net Profit Margin? (With Benchmarks)
Finance Fundamentals

What Is a Good Net Profit Margin? (With Benchmarks)

Gross Profit vs Net Income: Key Differences and Why They Matter
Finance Fundamentals

Gross Profit vs Net Income: Key Differences and Why They Matter