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
| Cost | Usually in cost of revenue |
|---|---|
| Hosting, cloud infrastructure for the production service | Yes |
| Third-party software and APIs embedded in the product | Yes |
| Customer support team (salaries, benefits, tools) | Yes |
| Onboarding and implementation staff | Yes (services cost of revenue) |
| DevOps/SRE time keeping production running | Allocated portion |
| Payment processing fees | Often, as a policy choice |
| Amortization of capitalized internal-use software | Often |
| Customer success focused on renewals and expansion | Often 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
- Everything in operating expense. A company that books nothing to cost of revenue reports a near-100% gross margin that no investor believes.
- Hosting for development and testing in cost of revenue. Non-production environments are research and development.
- Support headcount in G&A. Inflates gross margin and understates the cost to serve.
- 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 cost | Common allocation basis |
|---|---|
| DevOps and SRE salaries | Time studies or on-call share for production |
| Cloud account with dev and prod environments | Tagged resources by environment |
| Customer success | Split between support (cost of revenue) and expansion (sales and marketing) by role |
| Monitoring and security tools | Share 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
- Hosting cost per active customer, month over month.
- Support cost per ticket or per customer.
- Subscription margin and services margin, separately.
- Any account reclassified in the month, with the reason.
Sources
- SEC, Commission Guidance on Management's Discussion and Analysis (key performance indicators and metrics), Release 33-10751 (PDF)
- FASB Accounting Standards Codification, Topic 606, Revenue from Contracts with Customers
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.



