👋 Hi, it’s CJ Gustafson and welcome to Mostly Metrics, my weekly newsletter where I unpack how the world’s best CFOs and business experts use metrics to make better decisions.

The allure of SaaS is that you can build software once and reproduce it over and over again for basically nothing.

While this is theoretically true, the rubber hits the road by examining a company’s gross margin (if it’s burdened properly). As a company grows it’s revenues, it’s cost of goods sold as a percentage of revenue should go down. This means the company becomes more efficient in providing it’s services to customer’s over time, as certain elements of it’s cost structure do not scale linearly with money coming in the door.

This is what the experts call “operating leverage.”

SaaS companies strive to reach +80% gross margins at scale. That means for every $1 of revenue the company brings in, there’s still 80 cents left over to pay for operating costs (like selling / marketing the current products, and building new ones).

I’ve highlighted the median gross margins by sector that I track on a weekly basis here at Mostly metrics:

With that target in mind, there’s a constant pull and push between CFOs and their finance teams as to what should go “up there.” Arguing that teams like Customer Success or certain elements of cloud infrastructure (BI tools!!!!) should go in OPEX alleviates the pressure you put on your gross margin, and make the company look more efficient.

People try to game the system in whatever way is more useful to them. And they also “play dumb” when it comes to shuffling stuff downward on the P&L.

This guide dives into what should be included in a software company’s COGS, how to handle nuanced cases like Customer Success, and how to avoid common pitfalls in categorizing costs. Don’t leave home without it.

1. The People: Customer Support, Customer Success, and Professional Services

Until AI agents fully take these jobs over (I’ll just keep pounding 0 to talk to a human), Customer Support and Customer Success personnel belong in COGS. Customer Support is a no brainer. Customer Success may be more nuanced.

  • Customer Support Labor: Break / fix tasks. I forgot my password… My preferred layouts are jacked up… can you help me troubleshoot this configuration issue… Support labor is a clear fit for COGS because these roles directly enable users to continue using the product and receive its promised value.

    • Ask: “Do you need this to keep the customer on the platform?”

  • Customer Success Management (CSM): This is more complex.

    • If Customer Success teams focus on activation, onboarding, training, and ensuring customers realize the product’s value, they belong in COGS, as they’re providing a necessary service to keep customers engaged and satisfied.

    • However, if CSMs are tasked with upselling or have sales quotas, those roles should be in Sales & Marketing (S&M). This distinction prevents inflating gross margin by keeping sales-driven costs out of COGS, ensuring COGS is purely about the delivery of the core product, not its sale.

    • Ask: “Does this drive massive upsell?”

Putting the department nomenclature aside for a sec, once you get the color of what people do, you can make the call.

It’s common to get the question from VCs when they are sifting through your P&L: “So, tell me what type of work your customer success reps do.” Make no mistake - it’s a test.

Professional Services are another team that belongs in COGS.

Financial analysts have long turned their noses up at professional services revenue.

  • It’s (usually) one time

  • It’s (often) sold at cost or heavily discounted

  • It’s (reluctantly) purchased by the customer who wishes this damn thing would just work out of the box

Professional Services are a necessary evil.

And many companies will try to shuffle some of these resources into Sales, which is in OPEX.

2. Cloud Infrastructure (AWS, GCP, Azure): The Backbone of SaaS Delivery

Cloud infrastructure is among the most significant line items in software COGS. Platforms like AWS, Google Cloud Platform (GCP), and Azure provide the virtual servers, storage, and networking needed to run a SaaS application.

  • Compute Power: The virtual machines and server instances powering core applications.

  • Storage: Data storage for customer information, backups, and files.

  • Networking and Data Transfer: Costs tied to data movement, real-time features, and web hosting.

For software companies, cloud infrastructure costs scale pretty much directly with customer usage and are essential to the product.

But a common mistake that FP&A teams make is using revenue growth as a proxy for hosting spend growth.

I’ve tried this at least five times, all without luck. It’s common to look at revenue and hosting and say, “Hey! Well, would you look at that! They’re both going up… the more sales we do, the more hosting we seem to pay for!

But I’d chalk this up to correlation, not causation. Your AWS or GCP spend is tied to user activity, which is kinda-sorta attached to revenue.

Different products consume different amounts of compute, and therefore have different gross margin profiles. You learn this when you evolve from a single to a multi product company.

Also, you might have a large volume of free users who are trialing the product, and using your compute resources today, but haven’t paid for anything yet. Therefore, the hosting costs will front-run the revenue you (hopefully) close later on when free users convert to paid.

Work directly with whomever is closest to hosting spend at your company - if you’re big enough you will have someone who’s full time job it is to manage infrastructure.

They can help you understand the drivers behind compute. You may discover it’s not always paying customers. You have to strip it down to activity. And eventually you’ll strip it down to product line.

I cannot stress this enough - allocate your hosting budget by product line.

Life hack: Also figure out how much of your hosting spend can be parked within engineering as OPEX. This is fair game if there’s compute associated with the environment where the building takes place. This may add up to 10% to 20% of the total AWS bill and give breathing room to your gross margin.

3. Compute Resources (Snowflake, Databricks): Enabling Data-Driven Features

Compute resources like Snowflake and Databricks provide the infrastructure necessary to store, process, and analyze data for SaaS products that rely on data-heavy features. As a (very rough) rule of thumb, this is usually 25% to 30% of your cloud computing costs. So if you pay $100K for AWS per month, it wouldn’t be unusual to pay $25K or $33K on Snowflake.

Key compute-related COGS components include:

  • Data Warehousing: Essential for products that require significant data storage and analysis, such as analytics and machine learning tools. You may have heard of the term “Data Lake”. It is not a place where you go water skiing. Snowflake and Databricks are the leaders here. BigQuery and Amazon Redshift are also common names.

  • Data Processing: Enable real-time analytics, machine learning, and other complex features. Think: data pipelines. Talend, FiveTran, Snaplogic, and Segment are common vendors.

  • Data Visualization: All of this usually ends up in a snazzy dashboard somewhere for decision making. Looker, Tableau, and Sigma are common vendors.

Just as physical goods rely on raw materials, data-driven products rely on compute resources, making them core COGS.

Sometimes if you are an analytics company you can get away with putting a big slug of your compute down below, saying it’s a portion that’s necessary for product development (R&D) and keeping the lights on. But it’s hard to make the case that all of it should be excluded from COGS if you are literally selling data insights.

4. API and Third-Party Integration Costs: Essential Extensions

When the product relies on a third-party library or licensed software for a feature customers directly use, these fees are a core cost of service delivery. These usually take the form of API usage based fees or those annoying base licensing fees.

  • Usage-Based API Fees: Fees for services like Twilio (SMS), Stripe (payments), or Plaid (financial data).

  • Licensing Fees: Expenses for embedding third-party technologies as part of the product. Many times a single fixed cost per year.

To cut to the chase - if you incorporate another company’s data into a product you sell, that belongs in COGS. The data is essentially a “material” in the product people are buying. Full stop.

Here’s an example - a data enrichment company like Clay may license data from ZoomInfo, Apollo.io, or LinkedIn. These fees (whether they were negotiated as an API usage based toll or an all you can eat fixed licensing fee) belong in their COGs.

Some companies will get cute and actually classify these fees as Contra Revenue. This brings into question the whole agent vs principal relationship that auditors will ask you about.

Contra revenue means you subtract it from revenue before you present it as revenue. In other words, you end up with less revenue to flex against the other COGS to get to gross margin, rather than having more revenue and an offsetting amount of more costs.

If You’re the Principal

As the principal, the software company takes full responsibility for providing the service. It means the company controls the service experience, including setting the price and delivering the main value to the customer.

If You’re the Agent

As the agent, the software company is simply helping connect the customer with another service provider. The company doesn’t have full control over the service; it’s just facilitating it and usually earns a commission or fee for this facilitation.

In this case:

  • The fee you pay the third-party provider is classified as Contra Revenue rather than COGS.

  • Contra Revenue reduces the total revenue on the books to reflect that part of the revenue doesn’t actually belong to the company (it's passed to the third-party provider).

Example: Let’s say your software platform connects users with a partner company that provides, say, identity verification. The fee the platform pays this partner would reduce (or be "contra to") the revenue rather than being considered a direct cost, since the platform doesn’t control or provide the identity verification service itself.

So, to recap:

  • PrincipalCOGS because the company is responsible for delivering the core service.

  • AgentContra Revenue because the company is just facilitating the service, not directly providing it.

But tomato tomato.

The net is, you can’t take credit for incorporating and selling someone else’s data into your product without taking a hit of some sort.

TL;DR: When to Classify Costs as COGS

A simple guideline for COGS: If the cost is required to deliver, operate, or maintain the core product experience for existing customers, it belongs in COGS. Anything associated with acquiring new customers, enhancing the product with optional features, or growing the business should remain in other categories like Sales & Marketing or Research & Development.

People try to game the system in whatever way is more useful to them.

The three most common ways to game Gross Margin are via:

  1. Customer success

  2. Prof services

  3. BI tools

Don’t hate the player, hate the game. And know the rules of the road.

More Reading:

Reply

Avatar

or to participate