COGS (Cost of Goods Sold)
Definition
COGS (Cost of Goods Sold) is the direct cost of delivering your product to each customer. For a SaaS business that means hosting, third-party API fees, and payment processing, not sales, marketing, or general overhead.
What is COGS (Cost of Goods Sold)? SaaS Formula and Benchmarks
Formula: Gross Margin = (Revenue - COGS) / Revenue
Example: A SaaS product charges $50/month per customer. Hosting, database, and Stripe fees cost $8/month per customer. COGS = $8, Gross Margin = ($50 - $8) / $50 = 84%.
What counts as COGS for software: cloud hosting (AWS, Vercel), third-party API costs (OpenAI, Twilio, Stripe processing fees), and customer support directly tied to delivering the product. What doesn't count: sales salaries, marketing spend, and product development, those are operating expenses, not cost of delivery.
Why COGS matters: it sets the ceiling on your gross margin, which in turn sets how much is left to cover CAC, salaries, and profit. Public SaaS companies typically run 70-85% gross margins. If COGS eats more than 30% of revenue, something is off, usually unoptimized infrastructure, expensive third-party API calls billed per usage, or a support-heavy product that hasn't been made self-serve.
COGS creeps up fast in AI products specifically. A wrapper around an LLM API can look fine at launch, then margins collapse once usage scales because the AI service is billed per token per customer. Model this before pricing, not after signing a hundred customers you can't serve profitably.
Examples
An AI writing tool charges $29/month and spends $11/month per active user on model API calls. COGS is $11, gross margin is 62%, well below the 80% benchmark most SaaS investors expect, signaling the pricing or model choice needs to change before scaling.
