Table Of Contents

Title

Title

Title

Share
Keep up with Shopify Analytics
Keep up with Shopify Analytics

We promise we won’t spam you.

Mastering COGS: The Right Formula for D2C Ecommerce Profitability

Read to verify COGS calculation for your D2C Shopify business, along with effective strategies and how it impacts profitability.

Mar 14, 2025

Understanding Cost of Goods Sold (COGS) is crucial for any e-commerce store aiming to maximize profitability. Whether you’re a direct-to-consumer (D2C) brand or an online reseller, COGS is one of the most important financial metrics to track.

Fundamentally, COGS is the cost of producing or acquiring products to be sold. It encompasses not only the product's price but also related costs such as raw material, production, shipping, and storage. However, determining COGS isn't always as easy as it sounds since various business models demand varied formulas.

In this guide, we will explain how to correctly calculate COGS for D2C brands and online resellers, discuss FIFO vs. LIFO accounting methods, and demonstrate how to leverage COGS for increased profitability.

Why COGS Matters for Your Ecommerce Business

If you don't have a solid understanding of your actual product costs, you may price too low, overspend on marketing, or misjudge your profit margins. Proper tracking of COGS enables you to:

Establish profitable pricing initiatives

  • Eliminate unnecessary expenses and maximize efficiency

  • Measure gross profit margins accurately

  • Make informed decisions for long-term growth

The first step is understanding how to calculate COGS accurately for your business model.

How to Calculate COGS for Ecommerce Resellers

If you operate an online store that sources inventory from multiple suppliers, this formula will help you determine COGS:

COGS = Product Cost + Shipping Cost (Freight In) + Maintenance Costs

Breaking Down COGS for Resellers:

  1. Product Cost: The price you pay to acquire products from your supplier.

  2. Freight In (Shipping Costs): The cost of transporting products from suppliers to your warehouse or fulfillment center.

  3. Maintenance Costs: Expenses related to storing, assembling, or handling inventory before it’s sold.

Example:

You source Nike sneakers for resale, and your costs per unit are:

  • Wholesale Price: $25 per pair

  • Shipping Cost: $5 per unit

  • Storage & Handling Fees: $10 per unit

Total COGS per unit = $40

Now, if you sell 150 pairs of shoes at $100 per unit, your total revenue is $15,000. Your total COGS for 150 units is $6,000.

To calculate gross profit:

Gross Profit = Revenue – COGS $15,000 - $6,000 = $9,000 Gross Profit

To determine gross margin:

Gross Margin (%) = ((Revenue - COGS) / Revenue) × 100 ((15,000 - 6,000) / 15,000) × 100 = 60% Gross Margin

This simple calculation helps resellers determine profitability per product and adjust pricing accordingly.

How to Calculate COGS for D2C Brands

For brands that manufacture and sell products directly to consumers, a different formula is used:

COGS = Beginning Inventory + Purchases - Ending Inventory

Breaking Down the D2C COGS Formula:

  1. Beginning Inventory: The value of unsold inventory at the start of the month.

  2. Purchases: The cost of newly manufactured or acquired inventory during the month.

  3. Ending Inventory: The remaining unsold inventory at the end of the month.

Example:

You run a D2C leather bag brand with the following inventory data:

  • Beginning Inventory: 100 units (valued at $60 per unit) → $6,000 total

  • Newly Manufactured Inventory: 40 units ($60 per unit) → $2,400 total

  • Ending Inventory: 60 units ($60 per unit) → $3,600 total

COGS Calculation: $6,000 + $2,400 - $3,600 = $4,800 COGS

If you sell 80 units at $200 per unit, your total revenue is $16,000.

To calculate gross profit:

Gross Profit = Revenue – COGS $16,000 - $4,800 = $11,200 Gross Profit

To calculate gross margin:

Gross Margin (%) = ((Revenue - COGS) / Revenue) × 100 ((16,000 - 4,800) / 16,000) × 100 = 70% Gross Margin

By tracking these numbers, you gain a clear view of your real profits and cost efficiency.

FIFO vs. LIFO: Which Accounting Method Should You Use?

First In, First Out (FIFO) vs. Last In, First Out (LIFO) are two methods used to calculate COGS and inventory valuation.

  • FIFO (First In, First Out) assumes the oldest inventory gets sold first. This method is ideal for perishable or fast-moving consumer goods.

  • LIFO (Last In, First Out) assumes the newest inventory is sold first. This can lower tax liability when costs are rising but may result in outdated stock.

Example: Baby Toys Inc’s Inventory Purchases:

  • January: 100 units @ $5 each = $500

  • February: 200 units @ $6 each = $1,200

  • March: 100 units @ $7 each = $700

Total Inventory Cost: 400 units = $2,400

If they sell 50 units in April, their COGS is calculated differently:

FIFO Calculation:

  • Revenue: 50 units × $10 = $500

  • COGS: 50 units × $5 (January purchase) = $250

  • Gross Profit: $250

LIFO Calculation:

  • Revenue: 50 units × $10 = $500

  • COGS: 50 units × $7 (March purchase) = $350

  • Gross Profit: $150

Depending on your pricing and tax strategies, FIFO or LIFO can impact your reported profits and inventory value.

Using COGS to Calculate Gross & Net Profit

Once you have COGS, you can calculate:

Gross Profit = Revenue - COGS Net Profit = Revenue - COGS - Other Expenses

Tracking these metrics helps you make informed pricing, marketing, and inventory decisions.

Track & Optimize COGS with Bloom Analytics

Knowing how to calculate COGS is just one part of the equation. Tracking and optimizing COGS consistently is what truly drives profitability.

Instead of relying on spreadsheets, use Bloom Analytics to:

  • Monitor COGS trends and adjust pricing strategies

  • Integrate with Shopify, Google Analytics, and payment platforms

  • Get real-time insights on your store’s profitability

Sign up for Bloom Analytics today and take control of your COGS to scale your business profitably!

Final Thoughts

Understanding COGS isn’t just for accountants—it’s for every e-commerce entrepreneur who wants to make real money. The sooner you start tracking it properly, the sooner you can maximize profits, cut waste, and grow strategically.

So, are you calculating COGS the right way? If not, now’s the time to fix it.

Read more about Shopify Analytics Here

Unmatched Expertise and Proven Results