Unit economics and finance
Gross margin and COGS, including AI
What belongs in COGS vs opex, why classic SaaS runs ~75–80% gross margin, why AI products often sit at 50–60%, and the levers that move the number.
Gross margin is the fraction of revenue left after the direct cost of delivering the product. It is the first filter on whether a software business can ever be a great business. High gross margin funds sales, R&D and profit. Thin gross margin means every growth dollar is fighting physics.
Classic multi-tenant SaaS often prints 70–85% gross margins. AI-native products that pay for inference tokens on every request commonly land in the 50–65% band unless they price aggressively or route carefully. Investors care because long-run operating leverage and valuation multiples both sit on top of this line.
Gross profit = Revenue − COGS
Gross margin = Gross profit / RevenueConcepts in this section
Read them in order.
| Step | Concept | What it answers |
|---|---|---|
| 1 | COGS vs opex | What is delivery cost vs company cost? |
| 2 | Inference as COGS | Why do power users break a flat AI subscription? |
| 3 | Gross margin levers | What actually moves the number? |
| Model | Typical gross margin | Why |
|---|---|---|
| Multi-tenant SaaS | ~70–85% | Hosting is cheap relative to subscription price |
| Usage / infra (cloud, API) | ~50–70% | COGS is the product |
| Marketplace (on net take-rate revenue) | ~60–80%+ | If you book only take rate, COGS is payments + trust |
| Marketplace (on gross GMV) | Misleadingly low | Do not compare to SaaS without adjusting |
| Fintech / payments | Often ~30–60% | Interchange, fraud, capital, compliance |
| AI apps (LLM wrappers) | Often ~50–65% until priced/routed well | Inference tokens are expensive COGS |
A company at 80% GM can spend 40 points on S&M, 20 on R&D, 10 on G&A and still show a path to 10%+ operating profit. A company at 50% GM that spends the same opex percentages is structurally loss-making. Two companies at $20M ARR, both growing 50%: 80% GM leaves $16M gross profit, 55% GM leaves $11M. Same $14M opex → +$2M vs −$3M operating income. Same growth story; the fundraise is a margin conversation.
Marketplace and fintech footnotes: always ask margin on what revenue definition? A 15% take on $100 GMV is $15 of net revenue. Card fees on the whole $100 can eat most of it. Fintech "60% software margin" pitches that ignore cost of funds, interchange and fraud are fiction.
Common mistakes
- Putting inference in R&D so the AI product looks like classic SaaS.
- Trusting blended GM while power users are unprofitable on a flat plan.
- Comparing marketplace GM on GMV to SaaS GM on subscription revenue.
- Shipping a feature that adds 5 points of COGS and treating it as only an eng event.
Key takeaways
- Gross margin = (Revenue − COGS) / Revenue. COGS is delivering, not building.
- Classic SaaS often 70–85%. AI apps often 50–65% until optimized.
- AI margin is skewed: power users can lose money on a flat subscription while the average looks fine.
- Levers: routing, caching, pricing/overages, commits, self-hosting, product caps, FinOps.
Further learning
How investors think about startup metrics (including efficiency and margin context):
The Cost of Cloud, a Trillion Dollar Paradox (a16z)The pressure the cloud puts on margins can start to outweigh the benefits you scale and growth slows. Understand how much market cap is being suppressed by the cloud to help inform the decision-making framework on man…Andreessen Horowitz
Related
The economics of inference
Turn $/GPU-hour into $/million tokens with utilization and throughput, then decide API vs self-host and price products with real margins.
Cloud cost and FinOps
Where cloud money goes, the levers that usually cut a bill, and how engineers own unit cost without waiting for a finance spreadsheet. Start here for the map of cost pages.
The P&L for startups
Reading and building an income statement — revenue recognition, COGS, S&M / R&D / G&A, EBITDA and net income — with a worked $5M ARR SaaS example.