I wrote the book on developer marketing. Literally. Picks and Shovels hit #1 on Amazon.

Get your copy
Sales and revenue

Gross margin

GROHS MAR-jin

Revenue minus cost of goods sold, expressed as a percentage. For SaaS, this is revenue minus hosting, support, and delivery costs.

Gross margin is what remains after you subtract the direct costs of delivering your product. For a SaaS company, COGS includes hosting (AWS, GCP, Azure), customer support, professional services, and any third-party software costs baked into your product.

SaaS businesses should have gross margins between 70% and 85%. If you generate $10M in revenue and it costs $2M to host and support the product, your gross margin is 80%. That $8M is what funds sales, marketing, engineering, and profit.

Gross margin below 70% is a warning sign. Maybe your infrastructure is inefficient. Maybe you are giving away too much professional services. Maybe third-party API costs eat into your margin. AI companies are particularly exposed here because inference costs can be substantial. A company with great growth but 50% gross margin is not a SaaS business in the eyes of investors. It is a services business wearing a software costume.

Examples

A standard SaaS company calculates gross margin.

Annual revenue: $20M. Hosting costs: $2M. Support team: $1.2M. Third-party APIs: $400k. COGS total: $3.6M. Gross margin: ($20M - $3.6M) / $20M = 82%.

An AI startup struggles with margin.

Revenue: $5M. GPU inference costs: $2M. Third-party model APIs: $500k. Support: $300k. COGS: $2.8M. Gross margin: 44%. Investors are concerned. The company needs to optimize inference or raise prices.

A company with heavy professional services.

Software revenue: $15M at 85% margin. Services revenue: $5M at 20% margin. Blended gross margin: ($12.75M + $1M) / $20M = 68.75%. The services drag is killing the overall margin profile.

In practice

Read more on the blog

Frequently asked questions

What is a good gross margin for a SaaS company?

Between 70% and 85% is healthy. Above 80% is strong. Below 65% raises questions about whether the business is truly software or more of a services play. AI companies with heavy inference costs often start lower and improve margin as they optimize.

What costs are included in SaaS COGS?

Hosting and infrastructure, customer support salaries, professional services delivery, third-party software and API costs embedded in the product, and data center operations if you run on-prem infrastructure.

Related terms

Picks and Shovels: Marketing to Developers During the AI Gold Rush

Want the complete playbook?

Picks and Shovels is the definitive guide to developer marketing. Amazon #1 bestseller with practical strategies from 30 years of marketing to developers.