Homeglossary

Gross Margin

Gross margin is a software business metric that measures the percentage of revenue remaining after the direct costs of delivering a digital product or service. It shows how efficiently a SaaS, app, or platform turns customer revenue into funds available for product development, sales, support, and administration. In technology, direct costs often include cloud hosting, third-party API usage, payment processing, customer support, and AI model inference.

Build higher-margin AI products with Emergent.

What is gross margin in software?

Gross margin is the percentage of software revenue left after direct delivery costs. It measures delivery efficiency before product development, marketing, and administration.

Direct costs can include cloud hosting, AI model usage, payment processing, and customer support.

Gross margin formula and a SaaS example

Subtract cost of revenue from revenue, then divide gross profit by revenue and multiply by 100.

  1. Subtract cost of revenue from subscription revenue to find gross profit.
  2. Divide gross profit by revenue, then multiply by 100 to find gross margin.
  3. An app earning $10,000 in subscriptions with $7,000 in delivery costs has $3,000 gross profit and a 30% gross margin.
  4. A 30% margin means the product retains 30 cents per revenue dollar before operating expenses. Whether that is good depends on its delivery model and costs.

What counts as cost of revenue for an app?

Consistent classification matters more than a universal category for every cost.

Usually direct cost of revenueUsually indirect operating cost
Cloud compute, storage, and bandwidth tied to usageProduct and engineering salaries
AI API inference and third-party data callsMarketing and sales programs
Payment processing and frontline customer supportFinance, legal, and general administration

Why gross margin matters for SaaS and AI products

This metric shows whether revenue can scale faster than the cost to serve users.

  • It tests whether pricing covers variable usage costs.
  • It exposes expensive features, prompts, integrations, or customer segments.
  • It supports infrastructure planning as users grow.
  • It helps evaluate customer-level unit economics.

Limits of gross margin as a software metric

Gross margin is useful but does not show complete financial health.

  • Companies may classify support, cloud commitments, and implementation work differently.
  • Free users can create infrastructure costs without matching revenue.
  • Bundled subscriptions can hide individual feature costs.
  • A high gross margin does not prove net profitability after payroll and customer acquisition costs.

Gross margin vs. gross profit vs. net profit

These measures answer different questions.

MetricWhat it shows
Gross profitRevenue minus direct delivery costs, stated as a dollar amount.
Gross marginGross profit as a percentage of revenue.
Net profitWhat remains after all operating expenses, taxes, and other costs.

Compare margin trends over time and with products that have similar hosting, AI, and support needs.

Improving gross margin without harming the product

Improve costs through measurement and product-aware decisions, not indiscriminate cuts.

  1. Track cost per active user, request, and AI-generated output.
  2. Optimize database queries, compute workloads, storage, and caching.
  3. Set AI usage limits or paid tiers for high-cost features.
  4. Review vendor pricing and remove underused services.
  5. Align plan prices with variable costs and customer value.

Gross margin when building with Emergent

When testing an AI-powered product, plan for every integration and user action cost. Emergent helps teams build and iterate full-stack products with an AI app builder, while a tailored AI dashboard builder can surface usage and cost signals for gross-margin decisions.

Start Building
on Emergent today
Start Building