Finance

Gross margin explained: why your cloud bill is a product decision

What gross margin means for software companies, why cloud and support costs land in COGS, and how engineering decisions move the margin investors watch.

· 5 min read

Gross margin is revenue minus the direct cost of delivering the product, divided by revenue. For a software company it is one of the numbers investors look at first, because it says how much of every dollar of revenue is left to fund engineering, sales and profit. It is also one of the few company-level numbers engineers directly control.

What goes in cost of goods sold

  • Hosting and cloud infrastructure that serves customers.
  • Third-party services consumed per customer: payments, email, maps, AI model calls.
  • Customer support and success for existing customers.
  • Site reliability and operations work that keeps the service running.

What usually does not: engineers building new features (research and development), sales and marketing, and general administration. The line between “running” and “building” matters, and finance teams draw it in different places, so ask yours.

Why it matters

Typical SaaS companies run gross margins of 70–80%. A company at 80% has $80 of every $100 to spend on growth; one at 55% has $55. Valuations reflect that: investors pay more for revenue that turns into gross profit. A product with heavy per-customer AI or data costs can grow fast and still struggle if its margin is thin.

Engineering moves the margin

  • Architecture: a service that costs $0.04 per request instead of $0.01 can take points off the margin at scale.
  • Right-sizing: idle clusters and over-provisioned databases are pure COGS.
  • Vendor choices: a per-seat or per-call API priced against your revenue model.
  • Reliability and self-service: fewer incidents and better tooling mean fewer support tickets.

A worked example

A product earns $10M a year. Hosting is $1.5M, third-party APIs $0.5M and support $1M: COGS is $3M and gross margin 70%. An engineering project cuts hosting by a third, saving $0.5M a year. Gross margin rises to 75%. At a valuation multiple of five times gross profit, that is $2.5M of enterprise value from one cost project.

Next time someone suggests a cost-optimization sprint, do the arithmetic. It may be the most valuable project on the roadmap.

Quick check

3 questions from the related lessons. Answers are explained, and the ones you get right count towards your progress.

Question 1

Q1.Revenue is $8M and COGS is $2M. What is the gross margin, in percent?

Question 2

Q2.A company spends $120,000 on sales and marketing and wins 200 new customers. What is CAC, in dollars?

Question 3

Q3.A 10% price increase causes quantity sold to fall by 5%. What is the price elasticity of demand, as a positive number?

Practice this in a lesson

Each engMBA lesson pairs a short explanation with practice questions that grade themselves. Free, with no signup.

  • Reading a P&L →Revenue at the top, profit at the bottom — and every line in between is a decision someone made.
  • Unit economics →Does each customer earn more than it costs to win them? Three numbers answer that.
  • Pricing & value →Price is the strongest profit lever a company has, and the one engineers think about least.
See the full curriculum

Keep reading