CEOBOOKS & TAX Book a scope call
Cash · 3 min read

SaaS Gross Margin: What Belongs in Cost of Revenue

Hosting, support, onboarding, payment fees and third-party software: how to classify cost of revenue so gross margin is right and comparable.

By CEO Books & Tax

Gross margin is the first filter investors apply to a SaaS business, because it sets how much of every revenue dollar is left to fund growth. It is also one of the most inconsistently calculated numbers in early-stage financials, because cost of revenue depends on classification decisions nobody wrote down.

What typically belongs in cost of revenue

CostUsually in cost of revenue
Hosting, cloud infrastructure for the production serviceYes
Third-party software and APIs embedded in the productYes
Customer support team (salaries, benefits, tools)Yes
Onboarding and implementation staffYes (services cost of revenue)
DevOps/SRE time keeping production runningAllocated portion
Payment processing feesOften, as a policy choice
Amortization of capitalized internal-use softwareOften
Customer success focused on renewals and expansionOften sales and marketing; a judgment call

Subscription versus services

Show subscription gross margin and services gross margin separately. Services (implementation, training, consulting) usually run at much lower margins, and blending them hides the economics of the core product.

Common errors

  1. Everything in operating expense. A company that books nothing to cost of revenue reports a near-100% gross margin that no investor believes.
  2. Hosting for development and testing in cost of revenue. Non-production environments are research and development.
  3. Support headcount in G&A. Inflates gross margin and understates the cost to serve.
  4. Inconsistent allocation month to month. Allocations should follow a written method (time, headcount or usage) and stay stable.

Improving it

  • Right-size cloud commitments and reserved capacity.
  • Reduce support load through product fixes and self-service.
  • Reprice or package services that run at a loss.
  • Renegotiate embedded third-party costs at scale.

How we set it up

We define cost of revenue in a written policy, map the chart of accounts and department tags to it, and report subscription and services margin every month, so the number in the board deck matches the ledger and a diligence team gets the same answer.

Allocations that hold up

Shared people and tools often serve both production and development. Use a written method:

Shared costCommon allocation basis
DevOps and SRE salariesTime studies or on-call share for production
Cloud account with dev and prod environmentsTagged resources by environment
Customer successSplit between support (cost of revenue) and expansion (sales and marketing) by role
Monitoring and security toolsShare used by production systems

Review the method once a year, document it and apply it the same way every month.

Reading the trend

  • Falling gross margin with flat pricing usually means infrastructure is scaling faster than revenue: look at per-customer hosting cost and reserved capacity.
  • Margin dips after a big launch are normal while new infrastructure is underused; they should recover as revenue fills it.
  • Services margin below zero tells you onboarding is a loss leader. That can be a valid choice, but price and staff it on purpose.

What diligence will do

A diligence team will rebuild cost of revenue from the general ledger, interview the engineering lead about hosting and test whether support costs are complete. Having the policy, the mapping and twelve months of consistent history ready shortens that work and keeps the margin you report from being restated in the room.

A simple monthly check

  1. Hosting cost per active customer, month over month.
  2. Support cost per ticket or per customer.
  3. Subscription margin and services margin, separately.
  4. Any account reclassified in the month, with the reason.

Sources

Questions founders ask

Do engineering salaries go in cost of revenue?

Engineers building the product are research and development. Engineers or DevOps staff who keep the production service running and supporting customers are often allocated to cost of revenue.

Should payment processing fees be in cost of revenue?

Many SaaS companies include them, since they scale with revenue collected. Others put them in G&A. Choose one, apply it consistently and disclose it in the metrics definitions.

Keep reading

More on cash

Book a scope call

Want this run for you, every month?

Revenue recognition, the close, cash, tax and board reporting, run by senior finance people in the accounting software you already use.