Skip to content

Gross Margin (GM)

Definition

Gross Margin measures the profitability of a product, service, or business by calculating the percentage of revenue that remains after deducting the Cost of Goods Sold (COGS). It represents the portion of sales revenue that contributes to covering operational expenses and generating profit.

Description

Gross Margin is a key indicator of financial health and cost-efficiency, reflecting how effectively revenue is converted into profit after direct costs like COGS or service delivery.

The relevance and interpretation of this metric shift depending on the model or product:

  • In SaaS, it often reflects infrastructure costs vs. subscription revenue
  • In eCommerce, it reflects product costs vs. pricing and fulfillment
  • In services, it’s about delivery team costs vs. project value

A high gross margin signals efficient operations and pricing power, while a low or declining margin highlights cost control issues or underpricing. By analyzing margins by segment, product line, or geography, you can improve pricing models, vendor negotiations, and profitability forecasting.

Gross Margin informs:

  • Strategic decisions, like market prioritization, cost modeling, and resource scaling
  • Tactical actions, such as vendor renegotiations or bundling reviews
  • Operational improvements, including pricing optimization and cost control
  • Cross-functional alignment, connecting finance, product, and ops teams on sustainable profitability goals

Key Drivers

These are the main factors that directly impact the metric. Understanding these lets you know what levers you can pull to improve the outcome

  • Infrastructure and Support Costs: Cloud hosting, support staffing, and 3rd-party integrations directly impact COGS.
  • Customer Tier Mix: High-maintenance, low-revenue accounts drag down margins. Scalable, low-touch users improve them.
  • Pricing Strategy vs. Cost Structure: If prices don’t reflect true costs (especially for usage-based services), margins erode fast.

Improvement Tactics & Quick Wins

Actionable ideas to optimize this KPI, from fast, low-effort wins to strategic initiatives that drive measurable impact.

  • If gross margin is tight, evaluate the cost-to-serve for each segment and repackage or reprice underperformers.
  • Add automation in support and onboarding flows to reduce human capital load.
  • Run a test shifting high-cost integrations to premium tiers.
  • Refine your pricing model to reflect actual usage costs (e.g., API calls, storage, compute).
  • Partner with finance and ops to build a margin dashboard by product line or customer cohort.

  • Required Datapoints to calculate the metric


    • Revenue: Total income generated from sales of a product, service, or business unit.
    • Cost of Goods Sold (COGS): Direct costs of producing or delivering the product or service, such as materials, labor, and manufacturing expenses.
  • Example to show how the metric is derived


    A software company calculates its gross margin for Q3:

    • Revenue: $500,000
    • COGS: $150,000
    • Gross Margin = [(500,000 − 150,000) / 500,000] × 100 = 70%

Formula

Formula

\[ \mathrm{Gross\ Margin} = \left( \frac{\mathrm{Revenue} - \mathrm{COGS}}{\mathrm{Revenue}} \right) \times 100 \]

Data Model Definition

How this KPI is structured in Cube.js, including its key measures, dimensions, and calculation logic for consistent reporting.

cube('Sales', {
  sql: `SELECT * FROM sales`,
  measures: {
    revenue: {
      sql: `revenue`,
      type: 'sum',
      title: 'Revenue',
      description: 'Total income generated from sales of a product, service, or business unit.'
    },
    cogs: {
      sql: `cogs`,
      type: 'sum',
      title: 'Cost of Goods Sold',
      description: 'Direct costs of producing or delivering the product or service, such as materials, labor, and manufacturing expenses.'
    },
    grossMargin: {
      sql: `(${revenue} - ${cogs}) / ${revenue} * 100`,
      type: 'number',
      title: 'Gross Margin',
      description: 'Gross Margin measures the profitability of a product, service, or business by calculating the percentage of revenue that remains after deducting the Cost of Goods Sold (COGS).'
    }
  },
  dimensions: {
    id: {
      sql: `id`,
      type: 'string',
      primaryKey: true,
      title: 'ID',
      description: 'Unique identifier for each sales record.'
    },
    saleDate: {
      sql: `sale_date`,
      type: 'time',
      title: 'Sale Date',
      description: 'The date when the sale was made.'
    }
  }
})

Note: This is a reference implementation and should be used as a starting point. You’ll need to adapt it to match your own data model and schema


Positive & Negative Influences

  • Negative influences


    Factors that drive the metric in an undesirable direction, often signaling risk or decline.

    • Infrastructure and Support Costs: Increased cloud hosting and support staffing costs directly raise COGS, reducing Gross Margin.
    • Customer Tier Mix: A higher proportion of high-maintenance, low-revenue accounts increases COGS, negatively impacting Gross Margin.
    • Pricing Strategy vs. Cost Structure: Misalignment between pricing and actual costs, especially in usage-based services, leads to higher COGS and lower Gross Margin.
    • Inefficient Supply Chain: Delays and inefficiencies in the supply chain increase COGS, reducing Gross Margin.
    • Product Returns: High rates of product returns increase COGS, negatively affecting Gross Margin.
  • Positive influences


    Factors that push the metric in a favorable direction, supporting growth or improvement.

    • Customer Tier Mix: A higher proportion of scalable, low-touch users reduces COGS, improving Gross Margin.
    • Pricing Strategy vs. Cost Structure: Aligning pricing with true costs ensures revenue covers COGS, enhancing Gross Margin.
    • Operational Efficiency: Streamlined operations reduce COGS, positively impacting Gross Margin.
    • Economies of Scale: Increased production volume reduces per-unit COGS, improving Gross Margin.
    • Product Innovation: Innovative products can command higher prices, increasing revenue and Gross Margin.

Involved Roles & Activities


Funnel Stage & Type

  • AAARRR Funnel Stage


    This KPI is associated with the following stages in the AAARRR (Pirate Metrics) funnel:

    Revenue

  • Type


    This KPI is classified as a Lagging Indicator. It reflects the results of past actions or behaviors and is used to validate performance or assess the impact of previous strategies.


Supporting Leading & Lagging Metrics

  • Leading


    These leading indicators influence this KPI and act as early signals that forecast future changes in this KPI.

    • Product Qualified Leads: Product Qualified Leads (PQLs) act as a leading indicator for Gross Margin because an increase in high-intent users typically forecasts increased conversions to paying customers. More PQLs often precede higher revenue and improved cost efficiency, which can improve Gross Margin in future periods.
    • Activation Rate: A rising Activation Rate signals more users are reaching meaningful product value and are more likely to convert to paid plans. This increases future revenue without necessarily increasing COGS proportionally, thus positively influencing future Gross Margin.
    • Customer Loyalty: High Customer Loyalty predicts future revenue stability and lower churn, improving revenue retention with less incremental cost. This helps forecast improvements in Gross Margin as loyal customers generally have higher LTV and lower servicing costs.
    • Deal Velocity: Faster Deal Velocity means sales are closing quicker, leading to more rapid revenue recognition. If COGS remains steady or improves with scale, this positively influences Gross Margin, making Deal Velocity a crucial leading indicator.
    • Monthly Active Users: Growth in Monthly Active Users is an early signal for future revenue increases. If the increase in usage does not lead to a proportional rise in COGS, Gross Margin benefits, making MAU a strong leading indicator for future profitability.
  • Lagging


    These lagging indicators confirm, quantify, or amplify this KPI and help explain the broader business impact on this KPI after the fact.

    • Customer Acquisition Cost: Customer Acquisition Cost (CAC) directly impacts Gross Margin by quantifying the cost related to acquiring each customer. High CAC can erode Gross Margin, while efficiency improvements in acquisition can enhance it, confirming the cost structure after the fact.
    • Revenue Churn Rate: Revenue Churn Rate measures the percentage of recurring revenue lost due to churn. High churn directly reduces the revenue base over which COGS is spread, lowering Gross Margin. It quantifies the negative impact of customer loss on overall profitability.
    • Expansion Revenue Growth Rate: Expansion Revenue Growth Rate shows the effectiveness of upsell and cross-sell motions. Expansion revenue increases top-line revenue without necessarily increasing COGS proportionally, amplifying Gross Margin gains after the fact.
    • Cost to Serve: Cost to Serve quantifies the total operational costs involved in delivering products/services. Increases here directly raise COGS, reducing Gross Margin. It helps explain the efficiency or inefficiency in operational delivery post-period.
    • Average Revenue Per Account: Average Revenue Per Account (ARPA) provides insight into monetization per customer. Higher ARPA means more revenue with each account relative to COGS, confirming and amplifying the profitability reflected in Gross Margin.