Profit Intelligence

COGS (Cost of Goods Sold)

2026-04-12 8 min read Profit Intelligence
COGS (Cost of Goods Sold) — The direct costs of producing or delivering the goods a company sells, including raw materials, manufacturing, packaging, and shipping. COGS is subtracted from revenue to calculate gross margin. It excludes indirect costs like marketing, sales salaries, and office rent, which belong in operating expenses.
TL;DR: COGS is what it costs to make and deliver the product — materials, labor, packaging, shipping. For SaaS, COGS is typically 15-25% of revenue (hosting, support, infrastructure). For D2C e-commerce, 30-50%. COGS determines gross margin, which determines every downstream metric (GAAP standards).

What is COGS (cost of goods sold)?

COGS (also called cost of sales, cost of revenue, or direct costs) is the total direct cost of producing the goods or delivering the services that generated a company's revenue in a given period. It includes every cost that is directly tied to the product — materials, manufacturing labor, packaging, freight, hosting infrastructure — and excludes costs that exist regardless of whether a sale happens.

COGS is the first line item subtracted from revenue on an income statement. Revenue minus COGS equals gross profit. Gross profit divided by revenue equals gross margin. Every profitability metric downstream — contribution margin, EBITDA, net income — starts with COGS.

For B2B SaaS companies, COGS includes cloud hosting (AWS, GCP, Azure), customer support team costs, third-party API fees, and data infrastructure. Typical SaaS COGS runs 15-25% of revenue, producing 75-85% gross margins. For D2C e-commerce, COGS includes raw materials, manufacturing, packaging, and inbound shipping — typically 30-50% of revenue.

COGS is not the same as total expenses. COGS only includes direct product costs. Sales team salaries, marketing spend, office rent, and R&D are operating expenses — tracked separately. Confusing the two produces inaccurate gross margin calculations that cascade through every financial model.

Why COGS matters for operators

COGS determines pricing power and margin structure. A company with 30% COGS has 70% gross margin and can absorb high CAC and still be profitable. A company with 55% COGS has 45% gross margin and needs significantly lower acquisition costs or higher prices to reach the same profitability.

For operators, tracking COGS at the SKU, product line, and channel level reveals which products and segments actually make money. A company with 50 SKUs might discover that 8 SKUs account for 60% of revenue but 80% of gross profit — while 15 SKUs have COGS above 60%, producing almost no margin. This insight changes the entire product and marketing strategy.

COGS also determines breakeven ROAS. If COGS is 40% of revenue, gross margin is 60%, and breakeven ROAS is 1 / 0.60 = 1.67:1. If COGS rises to 50%, breakeven ROAS jumps to 2:1. A 10-point increase in COGS can make previously profitable ad campaigns unprofitable overnight.

COGS formula

COGS = Beginning Inventory + Purchases During Period - Ending Inventory

For e-commerce / physical products:
Example:
- Beginning inventory: $180,000
- Purchases during Q1: $320,000
- Ending inventory: $210,000

COGS = $180,000 + $320,000 - $210,000 = $290,000


For SaaS (no inventory):
COGS = Hosting + Support Staff + Third-Party APIs + Data Infrastructure

Example:
- AWS hosting: $42,000/mo
- Customer support team: $28,000/mo
- Third-party API calls: $8,500/mo
- Data infrastructure: $6,500/mo

Monthly COGS = $85,000

What to include in COGS:

  • Physical products: Raw materials, manufacturing labor, packaging, inbound freight, warehouse pick/pack costs
  • SaaS: Cloud hosting, customer support salaries, third-party API fees, payment processing fees, data infrastructure costs
  • Services: Direct labor for delivering the service, subcontractor costs, project-specific tools

What to exclude:

  • Marketing and sales salaries
  • Office rent and administrative overhead
  • R&D and engineering (unless directly tied to product delivery)
  • General administrative expenses

COGS benchmarks by business model

How COGS as a percentage of revenue varies by industry. The inverse of COGS % is gross margin %.

Business modelCOGS % of revenueGross marginKey COGS driversAction if above benchmark
B2B SaaS15-25%75-85%Hosting, support, third-party APIsAudit infrastructure costs and support staffing
D2C consumables25-35%65-75%Raw materials, manufacturing, packagingNegotiate supplier terms at volume
D2C apparel30-45%55-70%Fabric, manufacturing, inbound freightEvaluate manufacturing partners and MOQs
B2B services / agencies40-60%40-60%Direct labor, subcontractorsImprove utilization rate and scope management
Marketplaces5-15%85-95%Payment processing, hostingLow COGS but high operating expenses

Sources: KeyBanc SaaS Survey 2025, Shopify Commerce Trends 2025, industry-observed ranges based on operator reports.

Common mistakes when tracking COGS

1. Including operating expenses in COGS

Sales team salaries, marketing spend, and office rent are not COGS. Including them inflates COGS and understates gross margin. The test: would this cost exist if the company made zero sales? If yes, it's an operating expense. If no, it's COGS.

2. Not allocating COGS to individual products or SKUs

Company-level COGS is useful for the income statement. It is useless for product decisions. A company with 45% blended COGS might have some products at 25% and others at 65%. Without SKU-level allocation, the unprofitable products stay hidden inside the average.

3. Forgetting fulfillment costs in e-commerce COGS

Picking, packing, and shipping are direct costs of delivering the product. Some operators exclude them from COGS and categorize them as operating expenses. This produces artificially high gross margins. If the product doesn't ship without these costs, they belong in COGS.

4. Using outdated COGS in pricing models

Supply chain costs change quarterly. A pricing model built on $18 per-unit COGS that hasn't been updated while actual costs rose to $24 underprices the product by the full $6 difference. Review COGS inputs quarterly and update pricing models accordingly.

5. Not tracking COGS trends over time

A 3% COGS increase per quarter compounds to 12.5% annually. If pricing stays flat, gross margin erodes by the same amount. Track COGS as a percentage of revenue monthly. A rising COGS:revenue ratio is an early warning that margin compression is underway.

How Fairview tracks COGS automatically

Fairview's Margin Intelligence pulls cost data from your accounting platform (QuickBooks, Xero) and e-commerce platform (Shopify) to calculate COGS by product, by channel, and by time period. COGS is automatically applied to revenue calculations so that gross margin and contribution margin reflect actual product costs — not estimates.

The Operating Dashboard displays COGS trends alongside gross margin and flags when COGS as a percentage of revenue rises above a configurable threshold. The Next-Best Action Engine surfaces cost anomalies: "COGS on SKU-4217 increased 18% this quarter. Gross margin dropped from 62% to 51%. Review supplier pricing or adjust retail price."

See how Margin Intelligence works

COGS vs operating expenses

COGS (Cost of Goods Sold)Operating Expenses (OpEx)
What it includesDirect product/delivery costsSales, marketing, admin, R&D
Relationship to salesVaries directly with volume — more sales, more COGSRelatively fixed — exist regardless of sales volume
Where it appearsFirst deduction from revenue on income statementDeducted after gross profit
DeterminesGross margin and gross profitOperating margin and EBITDA

COGS scales with revenue. Operating expenses exist whether the company sells 10 units or 10,000. The distinction determines how the business scales: a company with low COGS but high OpEx can grow into profitability. A company with high COGS has a structural margin ceiling.

FAQ

What is COGS in simple terms?

COGS is what it costs to make or deliver the thing you sell. For a t-shirt company: fabric, stitching, packaging, and shipping to the warehouse. For a SaaS company: cloud hosting, customer support, and third-party API fees. Subtract COGS from revenue and you get gross profit — the money left before sales, marketing, and overhead.

What is a good COGS percentage?

It depends on the business model. SaaS: 15-25% COGS (75-85% gross margin). D2C consumables: 25-35%. D2C apparel: 30-45%. B2B services: 40-60%. Lower COGS means higher gross margin, which means more room for acquisition spending and fixed costs. Investors look for SaaS COGS below 25%.

How do you reduce COGS?

Five approaches: negotiate supplier volume discounts, optimize manufacturing processes to reduce waste, switch to lower-cost materials without reducing quality, reduce packaging weight to lower shipping costs, and for SaaS — optimize cloud infrastructure (right-size instances, use reserved capacity). Every 1% reduction in COGS flows directly to gross margin.

What is the difference between COGS and expenses?

COGS is direct product costs — they scale with each unit sold. Expenses (operating expenses) include everything else: marketing, sales team, office, R&D. The distinction matters because gross margin (revenue minus COGS) shows product-level profitability, while operating margin (gross profit minus OpEx) shows business-level profitability.

How often should you track COGS?

Monthly at the company level. Quarterly at the SKU or product level. Monthly tracking catches cost increases before they compound. Quarterly SKU-level reviews identify products where COGS has risen above acceptable thresholds. For D2C brands with seasonal supply chain costs, weekly monitoring during peak periods.

Does COGS include shipping to the customer?

For outbound shipping (to the customer): it depends on accounting treatment. If shipping is a cost of fulfilling the sale, include it in COGS. If shipping is charged separately as a line item, some operators categorize it as a revenue offset. For inbound shipping (to your warehouse): always include in COGS. Be consistent — switching treatment distorts gross margin trends.

Related terms

  • Gross Margin — Revenue minus COGS as a percentage, the direct output of COGS tracking
  • Contribution Margin — Revenue minus all variable costs (including COGS), a broader profitability view
  • Gross Profit — Revenue minus COGS in absolute dollars
  • AOV (Average Order Value) — Revenue per order, paired with COGS to determine per-order profitability
  • True ROAS — ROAS adjusted for COGS and returns, reflecting profit per ad dollar

Fairview is an operating intelligence platform that tracks COGS by product and channel — alongside gross margin, contribution margin, and ROAS. Start your free trial →

Siddharth Gangal is the founder of Fairview. He built SKU-level COGS tracking into the platform after watching e-commerce operators set prices on 6-month-old cost data while actual COGS had risen 20%.

Ready to see your data clearly?

Stop reporting on last week.
Start acting on this week.

10 minutes to connect. No SQL. No engineering team. Your first dashboard is built automatically.

See your data in Fairview Start 14-day free trial

No credit card required · Cancel anytime · Setup in under 10 minutes