What is gross margin? And should dev teams be talking more about it?

Formula for subscription gross margin

Gross Margin?

For startup companies, particularly those in the Software as a Service (SaaS) sector, gross margin is not just a financial metric; it’s a key indicator of product viability and business sustainability.

For a SaaS company, in simple terms, gross margin is the difference between how much each new customer costs in terms of 3rd party services and dev costs Vs how much that customer pays for their subscription.

Formula for subscription gross margin
The formula for subscription gross margin: https://www.drivetrain.ai/strategic-finance-glossary/saas-gross-margin

Understanding this metric could be existential for a startup that is looking to scale, yet it’s a topic often left out of daily conversations among development teams. But what has it even got to do with the dev teams involved in building SaaS products?

Unpacking Gross Margin in the SaaS Context

Gross margin is calculated by subtracting the cost of goods sold (COGS) from revenue, then dividing that number by the revenue, and finally multiplying by 100 to get a percentage. For SaaS companies, COGS typically includes:

  • Servers and hosting space for the software platform e.g. Vercel, Github, CDN, AWS, GCP, Azure etc
  • Licensing for third-party integrations and services e.g. stripe, openai, algolia etc
  • Expenses related to onboarding new customers (excluding sales and marketing).
  • Customer support and account management.
  • Fees and commissions to various partners.
  • Employee salaries related to operating expenses, broken out by core function such as development, DevOps, customer support.


This metric is crucial as it reflects the efficiency and scalability of a SaaS product. High gross margins (80%+), which are common in the SaaS industry due to low incremental costs, suggest that a company can cover its operating expenses and invest in growth initiatives.

Dev teams can have a direct impact on this metric by the actions they take and the architectural choices they make.

If this metric has a direct effect on whether or not the company has a future, and development teams’ actions directly influence it, then it makes sense that this metric should play some part in team planning.

Practical Steps for Developers to Enhance Gross Margin

Understanding the importance of gross margin is one thing, but what can individual developers at SaaS startups actually do to influence this key metric positively? Here are some practical strategies:

  1. Evaluate Third-Party Services: While third-party services can add significant functionality to your product, they often come at a high cost. Where possible, consider the use of Free and Open Source Software (FOSS) alternatives that can provide similar functionality without the recurring fees.
  2. Build vs. Buy Decisions: Always weigh the costs and benefits of building a solution in-house versus purchasing it. Building in-house can be more cost-effective long-term, especially if it gives you more control over your service offerings and reduces dependency on external vendors. On the other hand, ask honestly how much building in-house will cost, factoring in total development hours, support and maintenance.
  3. How Much Do I Cost?: Developers at SaaS startups should periodically reflect on how they utilize their own time, considering the associated costs and benefits of their activities. Time is a finite resource, and how it’s spent can directly impact the company’s financial metrics, particularly gross margin. For instance, focusing on automating routine processes, improving system efficiencies, or eliminating costly dependencies can have a significant positive effect on the company’s profitability. This reflective practice not only fosters a more financially aware culture within the team but also encourages developers to make strategic choices that contribute directly to the business’s bottom line.
  4. Optimize Code Efficiency: Avoid wasteful code patterns that consume unnecessary resources. Efficient code reduces server load, which can save on hosting costs and improve scalability. Ask things like:
    • How many round trips are we doing to the server?
    • How much data is going over the wire?
    • Could this be cached?
    • Can we spread the load between various vendors to maximize ‘free’ tiers?
    • What will happen at scale?
    • Is there a different service I can use?
    • Do end users really need this expensive feature?
    • Is this index appropriate and efficient?
  5. Provide Robust Support: Efficient support systems can drastically reduce the cost of customer service over time. By ensuring that your code is maintainable and your documentation is thorough, you help reduce the need for extensive support resources.

Changing Team Development Cycles

For SaaS startup teams, integrating an understanding of gross margin into the development cycle involves a few strategic changes:

  • Regular Financial Updates: Including gross margin insights in regular project or company updates can help tech teams understand business outcomes and see the bigger financial picture.
  • Training and Development: Offering basic financial training to developers, focusing on how SaaS business models work and the importance of metrics like gross margin, can enhance decision-making at all levels.
  • Cross-Department Collaboration: Encouraging collaboration between finance and development teams can ensure that technical decisions are made with a clear understanding of their financial implications.


For SaaS startups, especially where agility and efficient scaling are crucial, gross margin is not just a number for the finance team to worry about. It’s a vital sign of how well the company’s offerings meet market needs without sacrificing profitability. By bringing gross margin into the conversations that development teams are having, SaaS startups can foster a more holistic approach to building and scaling their products. This not only ensures better financial health but also aligns product development with long-term business success.