How to calculate gross margin

Gross margin is the foundation of unit economics. Every downstream metric that uses profit, LTV, CAC payback, contribution, depends on it, so getting COGS right matters.

For SaaS, COGS is mainly hosting, support, and the cost to serve, not sales and marketing. High gross margin is what lets software businesses fund growth and reach the efficiency benchmarks investors expect.

Short answer

Gross margin is the share of revenue left after the direct cost of delivering your product. Subtract cost of goods sold from revenue, then divide by revenue and multiply by 100. If you earn 1,000,000 dollars and COGS is 250,000 dollars, gross margin is 75 percent. For SaaS, 70 to 80 percent or higher is the benchmark.

Step by step

  1. Identify revenue

    Take total revenue for the period. For SaaS, use recognized revenue on a consistent basis.

  2. Total cost of goods sold

    Sum the direct costs of delivering the product: hosting and infrastructure, customer support, and payment processing. Exclude sales, marketing, and general overhead.

  3. Subtract and divide

    Gross margin equals (revenue minus COGS) divided by revenue, times 100. The result is the percentage of revenue left to cover everything else.

  4. Compare to the benchmark

    SaaS should reach 70 to 80 percent or higher. Lower margins mean an expensive-to-serve product and constrain how much you can invest in growth.

Worked example

Your SaaS product earns 2,000,000 dollars in revenue. COGS, hosting, support, and processing, totals 400,000 dollars.

Gross margin = (2,000,000 - 400,000) / 2,000,000 = 1,600,000 / 2,000,000 = 80 percent. That 80 percent is what funds sales, marketing, R&D, and profit. If COGS were 700,000 dollars, margin would fall to 65 percent, below the SaaS benchmark and a flag to investigate cost to serve.

How Ardovo handles it

Ardovo uses gross margin to compute margin-based metrics like LTV and CAC payback, so they reflect profit rather than revenue. Rook flags when margin-based metrics move because gross margin shifted, not just because volume changed.

Frequently asked questions

What is the gross margin formula?

Revenue minus cost of goods sold, divided by revenue, times 100. COGS includes the direct costs of delivering the product, hosting, support, and processing, but excludes sales, marketing, and overhead.

What is a good gross margin for SaaS?

70 to 80 percent or higher. High software gross margins are what let SaaS businesses fund growth. Margins well below 70 percent suggest an expensive-to-serve product that constrains investment in acquisition and R&D.

What belongs in SaaS cost of goods sold?

Hosting and infrastructure, customer support and success costs to serve, third-party software embedded in the product, and payment processing. Sales, marketing, and general overhead are excluded; they sit below gross margin.

Keep reading

Get started with Rally or browse all pages.