12 min

E-commerce Cost of Goods Calculation: Complete Method and Examples

Complete guide to calculating the cost of goods for your e-commerce products. Discover the formula, components to include, concrete examples by sector and how to automate calculation to optimize your margins.

E-commerce Cost of Goods Calculation: Complete Method and Examples

Calculating the cost of goods sold (COGS) is the cornerstone of any profitability strategy in e-commerce. Without precise knowledge of what each product actually costs you, it's impossible to set consistent prices, measure real margins or identify products that are dragging down your profitability. Yet many e-commerce merchants limit themselves to the supplier purchase price and overlook a multitude of indirect costs that eat into their profits.

In this guide, we detail the complete method for calculating the cost of goods for your e-commerce products, with clear formulas, sector-specific examples and the mistakes to absolutely avoid.

What is the cost of goods sold?

The cost of goods sold represents the total of all expenses incurred to manufacture, purchase, store, ship and market a product. It goes beyond the simple supplier purchase price: it incorporates all direct and indirect costs required for a product to reach the end customer.

In e-commerce, calculating COGS is particularly complex because it includes costs specific to online selling: platform fees, payment commissions, logistics costs, return costs and customer acquisition costs.

COGS = Purchase Cost + Manufacturing Costs + Distribution Costs + OverheadBasic COGS Formula

This basic formula must be adapted to the e-commerce context by incorporating components specific to online selling. A poorly calculated COGS inevitably leads to inappropriate selling prices and illusory margins.

i

COGS vs. purchase price

The purchase price is the amount paid to the supplier. The COGS includes the purchase price plus all ancillary costs (logistics, packaging, commissions, etc.). The difference between the two can represent 30 to 60% of the total cost depending on the sector.

Components of e-commerce COGS

To obtain a reliable COGS, you need to identify and quantify each expense item. Here is a comprehensive table of the components to consider for an e-commerce business.

ComponentDescriptionExample CostAverage Share
Product purchase costPrice paid to supplier or manufacturing costEUR 10.00 / unit30 - 50%
Inbound shippingSupplier delivery to your warehouseEUR 0.50 - 2.00 / unit2 - 5%
PackagingBox, padding, tape, label, insertEUR 0.80 - 3.00 / parcel3 - 8%
Outbound shippingCarrier (DHL, UPS, Royal Mail, etc.)EUR 3.00 - 8.00 / parcel10 - 20%
Platform commissionsMarketplace fees (Amazon, eBay) or CMS subscription5 - 15% of revenue5 - 15%
Payment feesStripe, PayPal, credit card commissions1.4 - 2.9% + fixed2 - 3%
Marketing / acquisition costCost per order (SEA, Social Ads, SEO)EUR 3.00 - 15.00 / order10 - 25%
Return costsReturn shipping + reconditioning + value lossEUR 5.00 - 15.00 / return2 - 8%
Customer supportTime spent, tools, partial refundsEUR 0.50 - 2.00 / order1 - 3%
Storage / warehousingWarehouse rent, 3PL, picking feesEUR 0.30 - 1.50 / unit / month2 - 5%

The share of each component varies considerably depending on the product type, average order value and logistics model. A EUR 15 product doesn't have the same cost structure as a EUR 150 product. That's why the calculation must be done product by product, not globally.

Direct costs vs. indirect costs

Direct costs are those directly attributable to a specific product: purchase cost, packaging, shipping. Indirect costs (rent, software subscriptions, salaries, global marketing) must be allocated across all products sold using appropriate allocation keys.

  • Direct costs: purchase price, specific packaging, per-product shipping, sales commissions
  • Indirect costs: warehouse rent, CMS subscription, salaries, fixed bank fees, marketing tools
  • Indirect cost allocation can be done proportionally by revenue, volume or number of orders

How to calculate COGS step by step

Here is the detailed method for calculating the true COGS for each product in your e-commerce catalog. Follow these steps in order to ensure no expense item is overlooked.

1

List all purchase costs

For each product reference (SKU), identify the unit purchase price. Include customs duties and import taxes if you buy outside your region. Remember to recalculate regularly if your suppliers adjust their prices.

2

Calculate inbound logistics costs

Divide the total cost of each supplier delivery by the number of units received. If a container of 500 units costs EUR 1,200 in transport, the inbound logistics cost is EUR 2.40 per unit.

3

Evaluate preparation and packaging costs

Add up the cost of packaging materials (box, padding, tape, labels) and preparation time (picking, packing). If an employee prepares 30 parcels per hour at EUR 12/hr, the labor cost is EUR 0.40 per parcel.

4

Integrate shipping and payment fees

Note the average shipping cost per parcel from your carrier. Add payment commissions (typically 1.4% + EUR 0.25 for Stripe in Europe). These costs vary per order, so calculate them on a monthly basis then bring them down to a per-unit figure.

5

Allocate indirect costs

List all your monthly fixed costs (rent, subscriptions, salaries, marketing). Divide the total by the number of orders or units sold in the month to get an indirect cost per unit. Example: EUR 3,000 in fixed costs / 600 orders = EUR 5.00 per order.

6

Sum up to get the total COGS

COGS = purchase cost + inbound logistics + packaging + shipping + payment commissions + share of indirect costs. Compare this result to your pre-tax selling price to get your real net margin per product.

T

Practical tip

Create a spreadsheet with one row per SKU and one column per cost item. Update the data monthly to track changes in your COGS and detect drift. Even better, use a tool like Fullmetrix that automates this calculation in real time.

Concrete calculation examples

To illustrate the method, here are three detailed examples for products from different sectors. Each example shows how the real COGS can be very different from the simple purchase price.

Example 1: T-shirt sold online (fashion)

Cost ItemAmount% of Selling Price
Supplier purchase priceEUR 6.0020.0%
Inbound shipping (per unit)EUR 0.802.7%
Packaging (pouch + label)EUR 1.204.0%
Customer shipping (relay point)EUR 3.5011.7%
Payment commission (Stripe 1.4% + EUR 0.25)EUR 0.672.2%
Marketing cost (allocated CAC)EUR 4.0013.3%
Return rate (20% x EUR 8.00)EUR 1.605.3%
Allocated indirect costsEUR 2.508.3%
Total COGSEUR 20.2767.6%
Selling price incl. taxEUR 30.00100%
Real net marginEUR 9.7332.4%

With a purchase price of EUR 6 and a selling price of EUR 30, you might think the margin is 80%. In reality, the true COGS is EUR 20.27, meaning a net margin of only 32.4%. The high return rate in fashion (20%) weighs heavily on profitability.

Example 2: Phone case (electronics / accessories)

Let's take the case of a phone case sold for EUR 19.90 on a proprietary e-commerce site.

  1. Purchase price: EUR 2.50
  2. Inbound shipping: EUR 0.30
  3. Packaging: EUR 0.90
  4. Outbound shipping: EUR 4.50
  5. Payment commission: EUR 0.53
  6. Marketing cost (SEA): EUR 3.20
  7. Returns (10% x EUR 6.00): EUR 0.60
  8. Indirect costs: EUR 1.80
  9. Total COGS: EUR 14.33
  10. Net margin: EUR 5.57 i.e. 28.0%

For this type of low-value product, shipping and marketing costs represent a disproportionate share of the COGS. Optimization involves negotiating carrier rates and improving conversion rates to reduce CPA.

Example 3: Face serum (cosmetics)

A premium face serum sold for EUR 45.00 on PrestaShop.

  1. Manufacturing cost (formula + bottle + labeling): EUR 8.00
  2. Inbound shipping: EUR 0.40
  3. Premium packaging (box + padding + insert): EUR 2.80
  4. Outbound shipping: EUR 4.80
  5. Payment commission: EUR 0.88
  6. Marketing cost (influencer + SEA): EUR 6.50
  7. Returns (5% x EUR 7.00): EUR 0.35
  8. Indirect costs: EUR 3.00
  9. Total COGS: EUR 26.73
  10. Net margin: EUR 18.27 i.e. 40.6%

Premium cosmetics offer the best net margin thanks to a higher average order value, low return rate and controlled manufacturing costs. This is a good example of a sector where calculating COGS reveals above-average e-commerce profitability.

Common mistakes in COGS calculation

Many e-commerce merchants make mistakes that skew their COGS calculation and lead to poor pricing decisions. Here are the most common pitfalls.

  • Confusing purchase price with COGS: the purchase price represents on average only 30 to 50% of the total COGS
  • Forgetting return costs: in fashion, the return rate can reach 25 to 30%, significantly impacting real margins
  • Not including customer acquisition cost: marketing spend (SEA, Social Ads) must be allocated to each order
  • Ignoring payment fees: Stripe or PayPal commissions of 1.4 to 2.9% add up across thousands of transactions
  • Calculating a global average COGS instead of per product: each SKU has its own cost structure
  • Not updating the calculation: carrier rates, supplier costs and CPAs evolve constantly
  • Forgetting storage costs: a product sitting in stock for 6 months costs much more than a fast-moving product
  • Not accounting for losses and breakage: damaged, expired or stolen products represent an invisible cost
!

Beware of illusory margins

A product purchased for EUR 10 and sold for EUR 40 doesn't have a 75% margin. Once all costs are factored in (logistics, marketing, returns, payments, overhead), the real net margin typically ranges between 15 and 35%. Never base your pricing decisions solely on the purchase price.

Automate COGS calculation with Fullmetrix

Manually calculating COGS for each product is tedious and error-prone, especially when your catalog exceeds a few dozen references. Fullmetrix fully automates this process by connecting directly to your online store.

Connect to your e-commerce CMS

Fullmetrix connects natively to PrestaShop, WooCommerce and Shopify. Once connected, all your sales, orders, products and cost data are synchronized automatically. No manual entry is required.

  • PrestaShop: synchronization via official plugin, 2-minute installation
  • WooCommerce: dedicated WordPress plugin with real-time synchronization
  • Shopify: connection via the official Shopify API

Automatic calculation and per-product P&L

Fullmetrix automatically calculates the COGS for each product by integrating all components: purchase price, shipping costs, commissions, marketing costs and indirect charges. You get a P&L (profit and loss statement) per product, per category and for your entire store.

  • Real-time view of net margin per product and per order
  • Automatic detection of unprofitable products
  • Track COGS changes over time
  • Alerts when a COGS exceeds a defined threshold
  • Data export for your accounting

Instead of spending hours on a spreadsheet, you have a dashboard that shows you at a glance which products actually generate profit and which ones need a price adjustment or supplier change.


FAQ on COGS calculation

What is the COGS formula for e-commerce?

The complete e-commerce COGS formula is: Purchase cost + Inbound logistics + Packaging + Shipping costs + Payment commissions + Marketing acquisition cost + Return costs + Share of indirect charges (rent, subscriptions, salaries). Each item must be calculated per unit sold to obtain a precise unit COGS.

What is the difference between COGS and purchase price?

The purchase price is only the amount paid to the supplier for the product. COGS is much broader: it includes the purchase price plus all costs necessary to sell and deliver the product to the end customer. In e-commerce, COGS is on average 2 to 3 times higher than the simple purchase price.

How to calculate COGS when selling on marketplaces?

On a marketplace like Amazon or eBay, the COGS calculation must include platform commissions (typically 8 to 15% of selling price), FBA or marketplace logistics fees, storage fees charged by the marketplace and potential advertising commissions (Amazon PPC). These additional items considerably reduce the margin compared to selling on your own website.

How often should COGS be recalculated?

Ideally, COGS should be recalculated every month. Supplier prices, transport costs, commissions and marketing performance are constantly evolving. A COGS calculated 6 months ago can be completely outdated. With a tool like Fullmetrix, this recalculation is automatic and continuous.

What is the average COGS in e-commerce?

There is no universal average COGS as it depends on the sector, product type and logistics model. However, as a general rule, COGS represents between 60 and 80% of the selling price in e-commerce. This means the real net margin typically ranges between 20 and 40%. High-margin sectors (cosmetics, digital) can achieve 50-60% COGS, while low-margin sectors (food, consumer electronics) often reach 80-90%.

Automatically calculate the COGS for each product

Connect your PrestaShop, WooCommerce or Shopify store and instantly get the real COGS, net margin and P&L per product.

Try Fullmetrix for free
Mezri
MezriFounder of Fullmetrix

Founder of Fullmetrix. E-commerce acquisition and analytics expert, I help merchants turn their data into profitable decisions.

LinkedIn

Turn this insight into measurable revenue

Fullmetrix unifies your e-commerce stack to track profit, LTV, cohorts and ad ROI on PrestaShop, WooCommerce and Shopify.

Continue reading

Stop flying blind.

Connect your PrestaShop, WooCommerce or Shopify store in 5 minutes. Your first segments, WhatsApp automations and reports run themselves.

Free 30-day trial, no credit card required.