Revenue Rex logo mark
💰 Financial · Rex's Toolbox

SaaS Gross Margin Calculator (with Cloud Costs)

Calculate true gross margin including hosting, support, and infrastructure costs.

Revenue Rex peeking

Rex says

Money math without the spreadsheet headache. Plug in your numbers and I'll show you exactly where the dollars land.

Try a scenario

Click to load — tweak from there.

Inputs

Result

Gross margin

75.0%

Monthly gross profit

$375,000

Annualized gross profit

$4,500,000

Total COGS as % of revenue

25.0%

Revenue Rex peeking

Psst — share this and help Rex grow

One click, a permanent link with your numbers baked in.

More financial

How to use this

  1. 1Enter monthly revenue ($).
  2. 2Enter monthly hosting/infrastructure cost ($).
  3. 3Enter monthly customer support cost ($).
  4. 4Enter monthly implementation/onboarding cost ($).
  5. 5Enter monthly third-party licensing/api costs ($).
  6. 6Read your gross margin on the right — it updates as you type.
  7. 7Hit Share to keep the scenario or send it to someone.

About this calculator

SaaS gross margin subtracts cost of goods sold — cloud hosting/infrastructure, customer support, implementation, and any third-party licensing costs directly tied to serving customers — from revenue, and it's one of the most closely watched metrics by investors because it caps how profitable the business can ever become at scale. Best-in-class SaaS companies run 75-85% gross margin; AI-heavy products with meaningful inference or compute costs per user often run lower, 50-70%, because the marginal cost of serving each customer is materially higher than a traditional multi-tenant SaaS app; anything under 60% for a non-AI product usually signals either an inefficient infrastructure setup or a services-heavy delivery model that hasn't been productized. Gross margin trends matter as much as the absolute number — a company whose margin is expanding as it scales (from infrastructure efficiency, from moving customers to self-serve support, from renegotiating cloud contracts) is on a healthy trajectory, while compressing margin at scale is a red flag that costs are growing faster than the efficiencies of scale should allow.

FormulaGross Margin % = (Revenue − COGS) ÷ Revenue × 100, where COGS = Hosting + Support + Implementation + Third-Party Licensing

Worked example

Using the values the calculator loads with:

Inputs

  • Monthly revenue: 500000 $
  • Monthly hosting/infrastructure cost: 55000 $
  • Monthly customer support cost: 35000 $
  • Monthly implementation/onboarding cost: 15000 $
  • Monthly third-party licensing/API costs: 20000 $

Results

  • Gross margin: 75.0%
  • Monthly gross profit: $375,000
  • Annualized gross profit: $4,500,000
  • Total COGS as % of revenue: 25.0%

What each field means

Inputs

Monthly revenue ($)
The monthly revenue used in the calculation, measured in $. Starts at 500000 $ so you have a working example on load.
Monthly hosting/infrastructure cost ($)
The monthly hosting/infrastructure cost used in the calculation, measured in $. Starts at 55000 $ so you have a working example on load.
Monthly customer support cost ($)
The monthly customer support cost used in the calculation, measured in $. Starts at 35000 $ so you have a working example on load.
Monthly implementation/onboarding cost ($)
The monthly implementation/onboarding cost used in the calculation, measured in $. Starts at 15000 $ so you have a working example on load.
Monthly third-party licensing/API costs ($)
The monthly third-party licensing/api costs used in the calculation, measured in $. Starts at 20000 $ so you have a working example on load.

Results

Gross margin
Returned as a percentage and shown as the headline result. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
Monthly gross profit
Returned as a money amount in US dollars. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
Annualized gross profit
Returned as a money amount in US dollars. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
Total COGS as % of revenue
Returned as a percentage. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.

FAQ

What counts as SaaS COGS versus operating expense?

COGS is any cost directly tied to delivering the product to a paying customer: hosting/cloud infrastructure, customer support, implementation/onboarding labor, and third-party API or licensing fees embedded in the product. Sales, marketing, and general R&D that isn't customer-specific belong in operating expenses, not COGS.

What's a good gross margin benchmark?

75-85% is the classic healthy range for traditional multi-tenant SaaS. AI products with real inference costs per query often run 50-70% and that's increasingly seen as acceptable given the category, as long as margin is trending up with scale and model-cost optimization, not flat or declining.

Why is margin trend more important than the snapshot number?

A single quarter's gross margin doesn't tell you whether the cost structure scales well. Improving margin over time signals infrastructure efficiency gains and successful cost management; flat or declining margin at growing scale suggests costs are outpacing the efficiencies you'd expect from higher volume, which erodes long-term profitability potential.

How do implementation costs distort gross margin for enterprise deals?

Heavy, custom implementation work for large enterprise deals can look like a one-time cost but often recurs every renewal cycle with account changes, and if it's not amortized properly it can make gross margin look artificially healthy in the deal's first year and artificially weak whenever a wave of new large deals closes simultaneously.

Accuracy and limitations

  • Results are estimates before tax, fees, and inflation unless an input explicitly covers them.
  • Rates are treated as fixed for the whole period — variable-rate products will drift from this projection.
  • This is educational maths, not financial advice. Check anything contractual with the lender or your accountant.

Related tools

Cite this calculator

Writing about this topic? Grab a citation — every link helps keep these tools free.

APA
RevenueLab. (2026). SaaS Gross Margin Calculator. Retrieved from https://www.revenuelab.fyi/toolbox/saas-gross-margin
HTML
<p>Source: <a href="https://www.revenuelab.fyi/toolbox/saas-gross-margin" target="_blank" rel="noopener">SaaS Gross Margin Calculator — RevenueLab</a> (2026).</p>
Markdown
Source: [SaaS Gross Margin Calculator — RevenueLab](https://www.revenuelab.fyi/toolbox/saas-gross-margin) (2026).
Advertisement