A SaaS gross margin number is easy to compute and easy to flatter. The formula is simple. The argument is always about what goes into cost of goods sold (COGS). This page gives the formula, a plain rule for classifying costs, a worked example, and the mistakes that buyers and investors tend to reverse during diligence.
The formula
Gross margin (%) = (subscription revenue - subscription COGS) / subscription revenue x 100
Use subscription revenue only. Services revenue (onboarding, implementation, custom work) has its own cost structure, and FounderPath's COGS guide says professional services revenue typically carries much higher COGS, in the 50 to 80% range, and should be reported separately so it does not drag down the subscription margin.
See how MRRSignal verifies MRR
What belongs in SaaS COGS
The test is whether the cost is a direct cost of delivering the product to a customer who is already paying. FounderPath's glossary summarizes SaaS COGS as hosting, third-party software, customer support and payment processing fees. DualEntry's guide draws the same line from the other side: R&D engineering, product management, marketing, sales commissions and G&A allocations stay out, and customer success work tied to an expansion quota or upsell compensation moves to sales and marketing.
| Cost | Usually COGS? | Why |
|---|---|---|
| Production hosting and infrastructure | Yes | Needed to serve paying customers |
| Third-party APIs embedded in the product | Yes | Scales with usage |
| Support staff answering customer tickets | Yes | Direct service delivery |
| Payment processing fees | Yes | Cost of collecting the revenue |
| Engineers building new features | No | R&D |
| Sales commissions | No | Sales and marketing |
| Staging and test environments | No | Not serving customers |
| Customer success tied to upsell quota | No | Sales and marketing |
If you take payments through Stripe, Razorpay or Paddle, the fee on each charge is a real cost of that revenue. Leaving it out of COGS is the most common way a margin ends up higher on paper than in the bank.
A worked example
A SaaS company has $1,000,000 of annual subscription revenue. Its delivery costs are:
| Line | Amount |
|---|---|
| Production cloud hosting | $80,000 |
| Embedded third-party APIs | $30,000 |
| Support payroll | $85,000 |
| Payment processing fees (2.5%) | $25,000 |
| Total COGS | $220,000 |
Gross margin = ($1,000,000 - $220,000) / $1,000,000 = 78.0%.
Now suppose the founder leaves processing fees in G&A and counts only half of support as COGS. COGS becomes $80,000 + $30,000 + $42,500 = $152,500 and the margin reads 84.75%. That is almost seven points of margin created by classification alone. A buyer who rebuilds the numbers will land back near 78%, and will wonder what else was adjusted.
Where benchmarks come in, and where they do not
DualEntry's guide notes that AI builders expect roughly 52% average gross margin (citing ICONIQ's 2026 research), well under the 70 to 80% usually quoted for traditional SaaS, because inference and model API fees behave like hosting. FounderPath makes a related point: products with heavy data, payments or AI inference costs often run higher COGS than pure workflow software, so compare against companies with a similar cost structure rather than a single headline number.
We could not find a primary survey table with exact stage-by-stage medians that we were willing to cite, so we are not quoting one. If a post gives you "the" gross margin benchmark by funding stage, check which survey it came from and how that survey defined COGS.
Mistakes to avoid
- Blending services into subscription margin. Report the two streams separately.
- Putting all customer success in one bucket. Retention and support work leans toward COGS. Quota-carrying renewal and upsell work leans toward sales and marketing.
- Charging overhead to COGS. Rent, executive pay and dev environments do not belong there either. Reclassifying in either direction invites adjustments in due diligence.
- Mixing currencies and dates. A margin built from revenue in one currency and costs in another, or from different months, is not comparable.
How this connects to revenue verification
Gross margin is a ratio, so the revenue side matters as much as the costs. If revenue includes one-off fees or an annual prepayment recognized all at once, the margin moves for reasons unrelated to delivery cost. Start from recurring revenue you can confirm in your payment provider, as described in what is verified MRR and how Stripe and ChartMogul calculate MRR differently. For how margin feeds the rest of the unit economics, see LTV to CAC ratio, CAC payback period and the SaaS quick ratio. If you are preparing for a sale, what to put in a data room and micro-SaaS valuation multiples cover what buyers ask for next.
Sources
- FounderPath, "COGS" glossary (SaaS COGS contents, services revenue 50 to 80% COGS, compare against similar cost structures): founderpath.com/glossary/cogs
- DualEntry, "SaaS COGS: What to Include, Exclude and Where AI Fits" (what stays out of COGS, AI builders about 52% gross margin citing ICONIQ 2026): dualentry.com/blog/saas-cogs
- Worked example: our own arithmetic on illustrative figures.
From the MRRSignal team. MRRSignal reads MRR straight from your payment provider, so the number you share is the number your processor reports.
Top comments (0)