Articles

What goes into SaaS cost of revenue, and how do you calculate gross margin?

Cost of subscription revenue holds hosting, the team that keeps customers live and software amortization; gross margin divides what is left by subscription revenue.

SaaS gross margin is subscription revenue minus cost of subscription revenue (hosting, support and success, amortization of capitalized platform software), divided by subscription revenue. In the worked case, $35,863,000 of subscription revenue and $8,302,000 of cost give 76.9 percent in 2025, up from 74.0 percent, while total margin including services at a loss is 73.5 percent.

Worked in full in The SaaS CFO by Julian R. Sterling.Get the DRM-free PDF, $19.99 →or the paperback

Free: the SaaS metrics board model in Excel, prefilled with the worked case of the book.

What sits in cost of subscription revenue

SaaS gross margin is subscription revenue minus the cost of delivering the subscription, divided by subscription revenue. The cost of delivering it usually covers three blocks: hosting and the third-party services the product runs on, the people who keep customers live (support and customer success, to the extent the company's policy puts them there), and the amortization of software the company capitalized for its own platform. Sales and marketing, research and development of new features and general administration stay below the line.

No accounting rule fixes the exact list. For a public company, the SEC's rules ask the income statement to show the costs applicable to each revenue line, and each company writes a policy for what that means. A board can only compare two years if the policy does not move.

Example 1: subscription gross margin, two years

Quillmere Software, the fictional company of The SaaS CFO, puts hosting, its support and success team and the amortization of capitalized software in cost of subscription revenue.

Quillmere, cost of subscription revenue (fictional case).
Line2024 ($)2025 ($)
Subscription revenue27,695,00035,863,000
Hosting2,493,0002,941,000
Support and success team3,060,0003,510,000
Amortization of capitalized software1,653,0001,851,000
Cost of subscription revenue7,206,0008,302,000
Subscription gross margin74.0%76.9%

Subscription gross margin 2024 = (27,695,000 − 7,206,000) ÷ 27,695,000 = 74.0%

Subscription gross margin 2025 = (35,863,000 − 8,302,000) ÷ 35,863,000 = 76.9%

Two things moved the margin. Hosting fell from 9.0 percent of subscription revenue in 2024 to 8.2 percent in 2025, after a committed-spend agreement with the cloud provider. The support and success team grew more slowly than revenue. Amortization rose, because the platform work capitalized in earlier years keeps landing in cost of revenue.

The trap: moving the support team, or the software amortization, out of cost of revenue raises the margin without changing a dollar of cash. If the policy changes, restate the prior year on the new basis before you show the comparison.

Example 2: total gross margin with implementation at a loss

Quillmere also sells implementation to its larger customers. By policy it runs that work at a loss to speed adoption: professional services revenue was $1,050,000 in 2024 and $1,226,000 in 2025, against delivery costs of $1,312,000 and $1,533,000, a gross margin of -25.0 percent.

Two margins the board should see side by side.
Margin20242025
Subscription gross margin74.0%76.9%
Total gross margin70.4%73.5%

Total gross margin blends the two lines and is always lower. Show both: the subscription margin says what the recurring product costs to serve, the total margin says what the company keeps after the services it chooses to give away.

Why the number matters beyond the income statement

Subscription gross margin feeds other metrics. CAC payback divides acquisition cost by the gross profit of the ARR it bought, so a margin that rises from 74.0 to 76.9 percent shortens payback with no change in sales efficiency. Read the margin first, then the payback.

Sources

  1. 17 CFR 210.5-03, income statement captions (Cornell LII)

Rules as read on 17 November 2026. The company in the examples is fictional; nothing here is accounting, tax or investment advice.

Questions readers ask

Is customer success part of SaaS cost of revenue?

It depends on the company's written policy. Teams that keep existing customers live are often included; teams that sell expansion are usually in sales and marketing. Whatever the choice, keep it stable from year to year.

Should capitalized software amortization go in cost of revenue?

When the capitalized software is the platform customers use, its amortization is commonly presented in cost of subscription revenue. Agree the presentation with your auditors.

What is the difference between subscription and total gross margin?

Subscription margin covers the recurring product only. Total margin adds professional services, which many SaaS companies run at a low or negative margin, so it is lower.

Does a higher gross margin mean better unit economics?

It helps, because payback and lifetime value use gross profit. But a margin raised by reclassifying costs changes the metric without changing the business.

Read the whole book

This article is one calculation from The SaaS CFO, a practitioner’s guide to the finance function of a venture-backed software company: ARR and retention, revenue and billings, unit economics, the cash forecast and runway, venture debt and the board package.

Also on this site