SaaS Gross Margin Calculator: Margin on Recurring Revenue
Work out a SaaS company's gross margin — the share of recurring revenue left once the cost of actually delivering the software is paid.
Adjust the inputs and select Calculate for a full breakdown.
Compare Common Scenarios
How the numbers shift across typical situations for this calculator:
| Scenario | SaaS gross margin | Markup | Gross profit |
|---|---|---|---|
| $5M rev · $1.25M cost | 75.00% | 300.00% | $3,750,000.00 |
| $2M rev · $800k cost | 60.00% | 150.00% | $1,200,000.00 |
| $20M rev · $3M cost | 85.00% | 566.67% | $17,000,000.00 |
| $500k rev · $300k cost | 40.00% | 66.67% | $200,000.00 |
How This Calculator Works
Enter total revenue and the cost of revenue — hosting, support, success, payment processing, and embedded third-party software. The calculator subtracts one from the other for gross profit and divides by revenue to give the gross margin, with the markup on cost shown alongside.
The Formula
Profit Margin and Markup
Markup = (Revenue − Cost) / Cost × 100 — the same profit measured against cost instead of revenue
Worked Example
A SaaS on $5M of revenue with $1.25M of cost of revenue posts a 75% gross margin and $3.75M of gross profit. Public SaaS leaders typically run 70% to 85% gross margins; anything below 60% is usually too service-heavy or hosting-heavy to scale efficiently.
Key Insight
SaaS gross margin sets the ceiling on how much revenue can fund growth. A 75% margin gives a SaaS 75 cents of every dollar to spend on R&D, sales, and profit; a 40% margin barely leaves room for sales investment, which is why service-heavy 'SaaS' companies trade at lower multiples than pure-software ones.
Frequently Asked Questions
What goes into SaaS cost of revenue?
Hosting and infrastructure, customer support, customer success teams, payment processing fees, and any third-party software embedded directly in the product. R&D, sales, and marketing sit in operating costs, not here.
What is a healthy SaaS gross margin?
Public SaaS leaders post 70% to 85%. Below 60% is usually a sign that the product is too service-heavy or the infrastructure too costly to scale efficiently. Above 85% is rare and typically reflects very lean delivery.
Why does SaaS gross margin matter so much?
It is the money available to fund growth. High gross margin SaaS can spend aggressively on R&D and sales while still earning; low gross margin SaaS struggles to fund its own marketing, capping growth.
Should I count R&D as cost of revenue?
No. R&D builds the product but is not consumed each time a customer uses it. It belongs in operating costs alongside sales and general administration, not cost of revenue.
How does SaaS gross margin compare with traditional software?
On-prem software can carry near-90% margins because hosting sits with the customer. SaaS is lower because the vendor runs the infrastructure — but recurring revenue is a structural plus that on-prem cannot match.
Related Calculators
Methodology & Review
SaaS gross margin is revenue minus cost of revenue, expressed as a share of revenue. Cost of revenue for SaaS typically includes hosting, customer support, customer success, third-party software embedded in the product, and payment processing. R&D, sales, and marketing belong to operating costs, not COGS.
Written by Ugo Candido · Last updated May 17, 2026.