SaaS COGS are the direct costs required to deliver your product or service to paying customers. They are not the full cost of running the company. That sounds simple, but SaaS has more grey areas than inventory businesses. There is no box of goods leaving a warehouse. You need a policy that is logical, consistent, and easy to defend over time. Get it wrong and your gross margin shifts, your pricing can look better than it is, and your runway, financing, and planning decisions start from the wrong numbers.
Why this metric gets messy faster than you expect
In SaaS, the direct cost of delivery is less visible than in a physical product business. You are usually dealing with hosting, third-party tools, support, onboarding, and people time, not raw materials. That is why similar companies often classify the same cost differently or miss hidden costs. One team puts onboarding in COGS, another keeps it in operating expenses. The real risk is not that your policy is imperfect. It is that it keeps changing. Pick an approach early, document it, and apply it the same way every month. Consistency makes your gross margin more credible and your business easier to explain as you scale.
Use one rule to separate COGS from OpEx
In business accounting, COGS means the direct cost of producing or delivering what you sell. In SaaS, that means costs directly tied to delivering the subscribed service to paying customers during the period. Keep broader company-running costs in OpEx, including sales and marketing, executive overhead, finance, HR, and general admin. A useful test is simple: if you removed the cost, could you still deliver the product or support it at the promised level? If not, it may belong in COGS. Keep acquisition and expansion work out of COGS. Retention or service-delivery work may qualify, but only when it is clearly part of delivery.
What usually belongs in SaaS COGS
- Infrastructure and technical delivery costs: cloud hosting, servers, storage, monitoring, CDN, data transfer, and communications costs used to run the product for customers.
- Third-party software and APIs used in delivery: tools, platforms, or usage-based services that are consumed as part of the customer experience.
- Direct delivery people costs: support, onboarding, implementation, training, and delivery-side engineering work when those roles are clearly tied to serving active customers.
- Borderline roles that need judgment: customer success and account management only belong in COGS when the work is truly part of ongoing service delivery or retention execution, not upsell, general relationship management, or expansion.
A simple SaaS COGS formula, with an example
For SaaS, COGS is usually a period cost, not an inventory calculation. The basic formula is: SaaS COGS = total direct delivery costs recognized in the period. Gross margin is (Revenue - COGS) / Revenue.
Monthly SaaS example
- Subscription revenue: €100,000
- Cloud hosting and data transfer: €12,000
- Third-party APIs, AI model usage, and delivery tools: €5,000
- Support team costs: €8,000
- Direct onboarding and implementation: €5,000
Total COGS: €30,000
Gross profit: €70,000
Gross margin: 70%
If onboarding is wrongly left out of COGS, COGS falls to €25,000 and the reported gross margin rises to 75%.
That 5-point gap matters. It changes how efficient the business looks. Track this month over month, especially when customer count, usage, support load, or implementation intensity changes, and use solid spend forecasting techniques to plan ahead. SaaS delivery costs rarely stay flat while the business grows.
What counts as a healthy SaaS margin
As a broad rule of thumb, SaaS COGS often lands around 10% to 25% of revenue, which puts gross margins somewhere from the high 60s to around 80%. Treat that as context, not law. Early-stage companies often sit below those margins because support is hands-on, onboarding is heavy, and the product still needs manual work around the edges. AI-heavy or infrastructure-heavy products can also carry higher delivery costs, which is why AI unit economics for SaaS deserve extra attention. The same goes for SaaS businesses with a meaningful services component. Investors and lenders care less about whether you hit a generic benchmark and more about whether the number is credible, consistent, and clearly explained. Margin quality feeds directly into pricing decisions, runway planning, growth targets, and your broader unit economics.
How to lower COGS without breaking delivery
Start with the biggest buckets you can actually control through spend management.
- Clean up infrastructure first: remove idle resources, right-size workloads, review storage and transfer costs, and challenge expensive architecture choices that do not create customer value.
- Reduce avoidable support load: improve product UX, add better documentation, automate repetitive requests, and use self-serve flows where they genuinely help.
- Rationalize software and API spend: review duplicate tools, unused seats, low-value vendors, and pricing models that no longer fit your customer mix or usage pattern.
- Standardize onboarding and delivery work: use repeatable playbooks, clearer training, and the right staffing mix so each new customer does not trigger custom effort by default.
- Push back on unprofitable complexity: question custom requests, one-off processes, or premium service promises that raise delivery cost without enough revenue, retention value, or strategic upside.
How to track SaaS COGS without spreadsheet chaos
Tag delivery-related spend as close to the transaction as possible, by vendor, team, product line, or customer, so finance is not rebuilding intent from memory at month-end. Keep one mapping into your accounting system so COGS and OpEx stay consistent across months and entities. Then review COGS next to revenue, customer scale, and gross margin trends to generate clearer financial insights. A modern spend stack with accounting integrations and AI spend visibility, including tools like Husk, makes that process faster and much easier to defend.




