SaaS gross margin calculator: how much revenue is left after delivery costs?

Version 1.0.0

This calculator shows gross profit and gross margin: how much of a period's revenue is left after the costs of delivering your product.

Have one period's recognized revenue and the costs of serving it, such as hosting, outside APIs, payment fees, and support pay.

Revenue scope Required
Use recognized revenue and delivery costs for the same period and scope.
Use revenue recognized for this period and scope.
Currency Required

Cost of revenue (USD)

Enter 0 when a cost does not apply.

What to enter

Recognized revenue is revenue for the service you delivered in the period. It isn't cash collected or MRR. A customer who pays for a year in January is usually recognized across the year as you deliver the service, not all in January.

Use revenue and costs from the same scope. For one product, enter only that product's revenue and the costs of delivering it.

Put each delivery cost in one field, once. For someone who splits their time, such as a founder who also answers support, include only the delivery share. Leave out sales, marketing, building new features, and general admin.

How to read the result

$200,000 of revenue in a quarter

Example

Hosting $22,000. Third-party APIs $8,000. Payment processing $6,000. Support people $12,000. Other $2,000.

Cost of revenue is $50,000. Gross profit is $150,000.00, and gross margin is 75.00%.

The table lists each cost so you can check it against your books. A cost higher than revenue gives a negative margin, which is a real result, not an error.

How do you calculate SaaS gross margin?

Subtract cost of revenue from revenue to get gross profit. Divide gross profit by revenue to get gross margin.

Gross margin

Formula

Gross profit = revenue - cost of revenue

Gross margin = gross profit ÷ revenue × 100

Atlassian's quarterly filing uses the same definitions. Gross margin comes before sales, marketing, research, and admin costs, so it isn't your profit or your cash flow.

What goes into cost of revenue?

Cost of revenue is what it takes to deliver the product to paying customers. Sales, marketing, and building new things stay out.

CostIn cost of revenue?
Hosting, servers, storage, and bandwidthYes
Outside APIs and software used to deliver the serviceYes
Customer support pay and toolsYes
Payment processing feesOften. Atlassian includes them.
Delivery work for professional services, when that revenue is includedYes
Maintaining the existing productOften. Stripe includes it.
Building new featuresNo
Sales, marketing, and advertisingNo
Executive pay and general adminNo

Stripe's gross margin guide and Atlassian's filing draw these lines. Companies don't all draw them the same way, so pick a rule and keep it each period.

What is a good SaaS gross margin?

Stripe's guide calls a gross margin above 75% typically good for a SaaS business, and says below 70% can concern investors. Top performers reach 80% or more. Treat those as rules of thumb, not targets.

Your own trend is more useful. Compare periods only when they use the same scope and cost rules. Some companies also publish an adjusted margin that leaves out costs such as stock-based pay, so check which one a figure is.

Where is gross margin used next?

Most per-customer SaaS math uses it.