SaaS margin calculator

Calculate gross margin and contribution margin for SaaS pricing. Industry benchmarks for B2B SaaS, infrastructure costs, and LTV/CAC math.

Industry preset loaded. Calculator is pre-configured with typical saas fees and a sample scenario. Edit any value to make it yours.
$
$
%
%

Fill in any two. The other two calculate automatically. Click a locked field to edit it instead.

Results Enter values to see results
Profit
Margin
Markup

SaaS margin calculator benchmarks

Best-in-class gross margin
80%+
Median B2B SaaS gross margin
70-78%
Infrastructure cost typical
5-15%
Net retention target
110%+

SaaS has the highest gross margins of any major business model because the marginal cost of one more customer is close to zero — just the servers, support, and payment processing for that account. Best-in-class SaaS hits 80%+ gross margin. Below 70% is a structural red flag; investors discount the multiple.

What counts as COGS in SaaS?

For SaaS gross margin, COGS includes:

  • Hosting and infrastructure (AWS, GCP, Azure) — typically 3-10% of revenue
  • Third-party APIs and data costs (Twilio, OpenAI, Stripe processing) — 1-10%
  • Customer support staff directly attributed to current customers — 5-10%
  • Onboarding and customer success directly tied to a sale — 3-8%

It does not include sales, marketing, R&D, or G&A — those are operating expenses, not COGS. This is why SaaS gross margins look high (75-85%) but net margins for growing companies are often negative.

Benchmark gross margins

SaaS typeGross marginNotes
Pure software (B2B SaaS)80-85%Salesforce, Atlassian range
Software + light services70-78%most mid-market SaaS
Software + heavy services55-65%enterprise implementations
Vertical / specialized SaaS70-80%healthcare, finance, legal
AI-heavy / inference-heavy50-70%token costs eat margin
Infrastructure / PaaS60-75%data center pass-through
Why investors care so much about gross margin
Gross margin determines the ceiling on a SaaS company's profitability. Operating expenses (sales, marketing, R&D) compound; if gross margin is 50%, every dollar of revenue only contributes 50¢ toward those expenses. At 80%, it contributes 80¢. The difference compounds into 2-3x valuation multiples at IPO scale.

Frequently asked

Why are SaaS gross margins so high?

Because once the software is built, serving one more customer costs almost nothing — just the marginal server, storage, and support cost. The big costs (R&D, sales) are operating expenses, not COGS.

Is 60% gross margin bad for SaaS?

It's a yellow flag, not a red flag. Some SaaS sub-types (AI-heavy, services-heavy, infrastructure pass-through) structurally run lower. But if you're a pure-play B2B SaaS at 60% gross, you have a cost problem to fix before scaling.

Should I include CAC in margin calculations?

Not in gross margin. CAC belongs in LTV/CAC ratio and contribution margin per cohort. Mixing CAC into gross margin makes you uncomparable to other SaaS companies and confuses pricing decisions.

Compare across industries

See worked examples from retail, restaurant, construction, SaaS, and more.

View all industries →