All articles
ecommerce2026-09-07

How to Measure COS (Cost of Sales) in E-commerce — A Complete Guide

Contents

COS is one of those metrics that sounds simple but in practice is a nightmare to calculate correctly. After 3 years of measuring COS for a fashion marketplace with hundreds of brands — here's what actually works.

COS = Marketing Costs / Revenue — But What Does That Mean in Practice?

The definition is simple. The implementation is not.

Which costs do you include?

  • Paid ads (Google, Meta, TikTok) — yes, obvious
  • Media agency fees — yes, but often forgotten
  • Tooling (attribution platforms, bid management) — yes
  • Influencer marketing costs — depends on your definition of "marketing"
  • Discounts and coupons — this is not COS, it's a separate category

Which revenue?

  • Gross GMV — before returns
  • Net GMV — after returns (recommended)
  • Company revenue — not GMV (if you're a marketplace)

Define this once, write it down, don't change it every quarter.

The Attribution Problem: Last-Click Lies

Imagine a customer who:

  1. Sees an ad on Facebook (impression)
  2. Clicks on a Google Shopping ad (click)
  3. Returns via direct/none (purchase)

Last-click will attribute the conversion to Google Shopping. Meta gets nothing. Your COS for Facebook will look dramatically worse than it actually is.

What to do about it:

  • Use data-driven attribution in GA4 (better than last-click)
  • Compare with platform reports (Meta Ads, Google Ads) — the difference is the scale of the problem
  • Treat per-channel COS as an approximation, not absolute truth
  • Track total COS (all channels) as your business metric

SQL to Calculate COS — A Real-World Example

WITH marketing_costs AS (
  SELECT
    date_trunc('month', spend_date) as month,
    channel,
    SUM(spend_amount) as total_spend
  FROM marketing_spend
  WHERE spend_date >= '2024-01-01'
  GROUP BY 1, 2
),
revenue AS (
  SELECT
    date_trunc('month', order_date) as month,
    SUM(gmv_net) as total_revenue  -- net = after returns
  FROM orders
  WHERE order_date >= '2024-01-01'
    AND status != 'cancelled'
  GROUP BY 1
)
SELECT
  c.month,
  SUM(c.total_spend) as marketing_spend,
  r.total_revenue,
  ROUND(SUM(c.total_spend) / r.total_revenue * 100, 1) as cos_pct
FROM marketing_costs c
JOIN revenue r ON c.month = r.month
GROUP BY c.month, r.total_revenue
ORDER BY c.month

Benchmark: What Is a Good COS?

For fashion e-commerce:

  • COS < 15% — very good (rare, mainly strong own brands)
  • COS 15-25% — healthy range for marketplace/multibrand
  • COS 25-35% — acceptable with high customer LTV
  • COS > 35% — alarm, check whether you're subsidizing growth

But an industry benchmark is just a starting point. The more important question: what COS can you afford given your product margin?

If GMV margin is 40%, a COS of 30% leaves 10% for operating costs — that might be too thin.

TL;DR

  • Define what you include in costs and revenue — once, in writing
  • Last-click attribution lies — use data-driven or compare cross-platform
  • Total COS (all channels) is more important than per-channel COS
  • Benchmark for fashion e-commerce: 15-25% = healthy range
  • Calculate on net GMV (after returns) — gross distorts the picture

Want to know where you lose customers?

I'll analyze your funnel and point out what to fix first. The first call is free.

Book a consultation

More articles about data analytics:

Back to blog