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.
| Cost | In cost of revenue? |
|---|---|
| Hosting, servers, storage, and bandwidth | Yes |
| Outside APIs and software used to deliver the service | Yes |
| Customer support pay and tools | Yes |
| Payment processing fees | Often. Atlassian includes them. |
| Delivery work for professional services, when that revenue is included | Yes |
| Maintaining the existing product | Often. Stripe includes it. |
| Building new features | No |
| Sales, marketing, and advertising | No |
| Executive pay and general admin | No |
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.
- The CAC payback calculator uses it to count the months to earn back the cost of a customer.
- The customer lifetime value calculator uses it to estimate the gross profit from one customer.