SaaS Metrics Library

Gross Margin: Calculation, Benchmarks & Improvement Guide

Understand your gross margin, calculate it with your own numbers, see how it benchmarks against other SaaS companies, and get practical tips to improve it. ScaleXP calculates gross margin and 30+ other SaaS metrics straight from your accounting and CRM data, prepared daily.

This article will provide

  • Calculation
  • Benchmarks
  • Improvement

Definition

Gross margin measures the profitability of a company’s products or services. Take gross profit divided by revenue and express the result as a percentage.

It shows how much profit is left from each dollar of net revenue to cover overheads, sales and R&D, which makes it one of the clearest indicators of pricing power and long-term efficiency.

Also known as: gross profit margin · gross margin percentage · GM% · product margin.

How is gross margin calculated?

Gross margin is calculated by subtracting the cost of goods sold (COGS) from revenue, and then dividing that number by revenue. It is typically expressed as a percentage.

Gross
Margin
%
Revenue(£,€,$)−Direct Cost(£,€,$)
Revenue(£,€,$)
x 100

In ScaleXP this is calculated automatically from your accounting and CRM data.

Direct costs are the expenses that can be attributed to delivering the product — server hosting, development, support and payment fees. Indirect costs, such as office rent, marketing and general salaries, sit below the line and do not belong in the calculation.

Worked example

LineAmount
Annual revenue$2,000,000
Cost of goods sold (hosting, support, payment fees)$400,000
Gross profit$1,600,000
Gross margin = $1,600,000 ÷ $2,000,000 × 10080%

To work out your own, use the calculator below.

Try it with your numbers

$
$

Gross profit: $1,440,000 Any currency works. The answer comes out as a percentage either way.

72% gross margin

Keep reading to see how that compares with the industry benchmark.

How is gross margin used by SaaS companies?

In the case of SaaS companies, gross margin is used to measure profitability. It is important because it shows how much of the revenue is being spent on direct costs, such as hosting and development, and how much is left over to cover indirect costs, such as marketing and overhead.

The arithmetic is never the hard part. The judgment is deciding which costs belong above the line. Move the onboarding team out of cost of goods sold and the same business reports 78%; move a share of engineering in and it reports 66%. Nothing changed except the definition, which is why comparing your figure to a benchmark is only meaningful when both sides count the same costs.

What is a good result?

A good gross margin varies by industry and company, but generally a higher gross margin is considered better. For SaaS companies, a gross margin of 70% or higher is considered good.

Gross margin, contribution margin and net margin are not the same thing. Gross margin stops at the direct cost of delivering the service. Contribution margin goes further and subtracts the variable cost of winning the customer. Net margin subtracts everything else, including overheads, R&D and tax. A SaaS company can comfortably run a 75% gross margin and still post a net loss while it invests in growth.

What are the gross margin benchmarks?

Definitions of gross margin vary, which makes cross-company comparison harder than it looks. What one business puts in cost of sales, another puts in operating costs. The figures below use a consistent definition across 342 B2B SaaS companies, which is what makes them comparable.

The median software gross margin is 80%. Blended, including services, it is 76%. The top quartile runs at 86% or higher and the bottom quartile at 50%.

Source: 2026 Aleph × Benchmarkit SaaS & AI Performance Benchmarks, published June 1, 2026, full-year 2025 actuals from 342 B2B SaaS and AI-native companies (228 to 232 reported gross margin).

Everyone expected AI infrastructure to crush software margins. It has not happened at the median — software gross margin has held between 79% and 81% for four consecutive years, including through the AI build-out. Where it does show up is pricing model: companies on usage-only pricing sit at 62%, well below the 80% median, because infrastructure cost scales with what customers consume.

Gross margin by company size

ARR bandMedian software gross margin
Under $5M72%
$50M – $100M86%

A 14-point expansion between the two, almost entirely operational leverage. Early-stage margin is low because fixed infrastructure and support costs are spread across too little revenue, not because the product is inefficient.

Why blended margin is lower

Software margin is 80%. Total revenue margin is 76%. That four-point gap is professional services and other non-recurring revenue diluting the blend.

If you report a single blended figure and your services mix is growing, margin will appear to fall even when the software itself is improving. Reporting the two separately is the fix.

How your result compares

Your result

72% gross margin

That is below the 2026 median of 80% for software. The top quartile runs at 86% or higher.

Change your numbers

One number against one benchmark only tells you so much. The 2026 benchmark report has the median and top-quartile figures for all 20 metrics, so you can see where the rest of the business sits.

What pulls SaaS gross margin down

Five costs account for most of the erosion:

  • Hosting and infrastructure that scales with usage rather than with price.
  • Customer support that grows headcount in step with customer numbers.
  • Onboarding and professional services delivered at or below cost to win deals.
  • Third-party API and data costs embedded in the product.
  • Payment processing, typically 1.5% to 3% of revenue.

The pattern worth watching is any cost that rises in step with customer count. A margin that drifts downward as the business grows usually means delivery has not been automated at the same rate as sales.

How ScaleXP calculates gross margin

ScaleXP calculates gross margin automatically from your accounting data. Revenue and cost of goods sold come from Xero, QuickBooks or Zoho Books, mapped to the accounts you choose, and the figure is recalculated as each month closes. Software and services can be reported separately, so a growing services mix never quietly masks the software margin, and every figure traces back to the underlying ledger.

Get the 2026 SaaS benchmark report

Definitions, formulas, and this year’s median and top-quartile numbers for all 20 metrics in the library. One PDF you can take straight into your next board meeting.

See our privacy policy.

Your report is ready.

Download the 2026 SaaS Benchmark ReportWe’ve emailed you a copy as well.

Gross margin visualization example

Tracked month by month, gross margin tells you more than a single number ever will. A margin that drifts down while revenue grows means delivery cost is rising in step with customers, and that shows up here a quarter or two before it shows up in the P&L.

Gross margin · last 12 months

82 % gross margin 10 points higher than January
Below the median At or above the median 2026 median · 80%

Illustrative example. Gross margin percentage on the vertical axis.

Read left to right, the chart says something a single number cannot: margin improved every quarter and crossed the industry median in October. It also shows how it improved — gradually, which usually means delivery is getting more efficient, rather than in one step, which usually means a cost was reclassified.

In ScaleXP this chart is built automatically from your accounting and CRM data, updated as the month closes, with software and services reported separately so a growing services mix never makes the software look worse than it is.

What to do with your gross margin number

Improving margin is mostly a question of pricing power and delivery efficiency rather than cost cutting. Four moves that work:

  • Raise price, or move customers onto plans that reflect the value delivered. A price increase flows almost entirely through to gross profit.
  • Reduce support load at source by fixing the product issues that generate tickets.
  • Automate onboarding so implementation stops consuming senior time.
  • Review infrastructure commitments annually, since reserved capacity and right-sizing often recover several points.

Because these gains compound, gross margin is one of the clearest long-term indicators of whether a subscription model is working.

Frequently asked questions

What gross margin percentage do investors expect from a SaaS company?

Investors expect a SaaS company to deliver a gross margin percentage of 70% or higher, and the 2026 median for software is 80%, with top-quartile companies at 86% or more. Blended margin, including professional services, has a median of 76%. Scale matters too: companies under $5M ARR report a median software margin of 72%, rising to 86% for companies with $50M–$100M ARR. ScaleXP calculates gross margin automatically from Xero, QuickBooks or Zoho Books, so finance teams can show investors where their margin sits against those benchmarks.

Can ScaleXP calculate SaaS gross margin automatically from Xero or QuickBooks?

Yes, ScaleXP calculates SaaS gross margin automatically from revenue and cost of sales in Xero, QuickBooks or Zoho Books, using the account mapping finance already relies on. Hosting, infrastructure, support and payment processing costs flow through from the ledger, so the gross margin percentage updates as the books update. ScaleXP prepares the metric daily alongside 30+ other SaaS metrics. Finance teams stop calculating margin in spreadsheets and get a figure ready for every management meeting and board review.

How does ScaleXP separate software gross margin from services margin?

ScaleXP separates software gross margin from services margin by tracking each revenue stream and its direct costs on their own, so implementation and consulting work does not dilute the subscription margin. Revenue recognition schedules under IFRS 15 and ASC 606 keep each stream in the right period. Katy, Head of Finance and Operations, describes ScaleXP as "…making the month end revenue recognition process simplified, as well as providing key insights into KPI's and metrics." Investors see software and blended gross margin clearly, each reconciled to the accounts.

Can ScaleXP show gross margin by product and customer in board packs?

Yes, ScaleXP shows gross margin by product, customer and revenue stream in live dashboards and PowerPoint board packs, with budget vs actuals alongside. In presentation mode, directors can drill down from the headline gross margin percentage to the accounts and customers driving it. Finance teams can spot which products or customers pull margin down and act on delivery costs or customer terms. The outcome is margin reporting the board trusts, prepared without manual spreadsheet work at month-end.

Blue MRR logo with bold lettering on a white background.

MRR

Predictable revenue that a company can expect to receive on a monthly basis from its subscription-based products or services.

Blue icon of a money bag with a dollar sign, representing financial concepts.

ARR

Predictable revenue that a company can expect to receive on an annual basis from its subscription-based products or services.

Chart illustrating customer acquisition costs with various data points and metrics.

Acquisition Costs

Cost to acquire one new customer.

SAAS METRICS LIBRARY

Read about more SaaS metrics, from ARR to Rule of 40.