SaaS Profit Margin Guide: Gross Margin, Costs and How to Improve Them
Understand SaaS profit margins: gross, contribution and operating margin, what counts as cost of revenue, common benchmarks, and how to improve yours.
On this page
One of the reasons investors value SaaS businesses so highly is their margins: once software is built, serving another customer costs relatively little. But margins are not automatic. Hosting, third-party APIs, AI usage, payment fees and support all eat into them. This guide explains the margins that matter, what counts as a cost, common benchmarks and practical ways to improve yours.
The three margins to track
| Margin | Formula | What it tells you |
|---|---|---|
| Gross margin | (Revenue minus cost of revenue) divided by revenue | How efficiently you deliver the product |
| Contribution margin | Gross profit minus variable sales and marketing costs, per customer | Whether each customer is profitable |
| Operating margin | Operating profit divided by revenue | Whether the whole business is profitable |
What counts as cost of revenue
- Hosting and platform fees, including usage-based server costs; see workload units explained for Bubble.io apps
- Third-party services and APIs, such as email, SMS, maps and AI models
- Payment processing fees
- Customer support and onboarding staff time
Product development, sales and marketing are operating expenses, not cost of revenue.
Benchmarks
Mature SaaS companies are commonly cited as having gross margins of roughly 70 to 80 percent or higher. Early-stage products often run lower while volumes are small, and products with heavy AI usage or included services can run lower permanently. The trend matters more than any single number: gross margin should rise as you grow.
A simple worked example
| Monthly figure | Amount |
|---|---|
| Revenue (200 customers at $50) | $10,000 |
| Hosting and platform | $600 |
| APIs and AI usage | $700 |
| Payment fees | $350 |
| Support | $1,000 |
| Gross profit | $7,350 (73.5% gross margin) |
The figures are illustrative; use your own numbers. For the metrics around margin, such as MRR, churn and LTV, see SaaS metrics explained.
How to improve your margins
- Price for value: raise prices, add higher tiers and charge for expensive features; see SaaS pricing strategy and usage-based vs seat-based pricing
- Control AI costs: use smaller models for simple tasks, cache results and set usage limits
- Design efficiently: efficient data and workflows reduce server costs; see performance patterns
- Automate support and onboarding: self-serve help and good onboarding reduce support hours; see user onboarding
- Charge for services: bill custom setup, training or integrations separately
Frequently asked questions
What is a good gross margin for a SaaS business?
Mature SaaS companies are commonly cited as having gross margins of roughly 70 to 80 percent or higher. Early-stage products and those with heavy AI or service costs often run lower, and should track the trend as they grow.
What counts as cost of revenue in SaaS?
Costs directly tied to delivering the product: hosting and platform fees, third-party APIs and AI usage, payment processing, customer support and onboarding. Sales, marketing and product development are operating expenses, not cost of revenue.
How do AI features affect SaaS margins?
AI API costs scale with usage, so heavy AI features can noticeably reduce gross margin. Use smaller models where possible, cache results and include usage limits or usage-based pricing for AI-heavy features.
How can I improve my SaaS gross margin?
Raise prices or move customers to higher tiers, reduce hosting and API costs through efficient design, automate onboarding and support, and charge separately for expensive services such as custom setup.
Do no-code platforms hurt SaaS margins?
Platform fees and usage-based server costs are part of cost of revenue, but for early-stage products they are usually small relative to revenue. Efficient app design keeps them low as you grow.
Building a SaaS with healthy margins from day one?
Book a free Idea Audit. We design products with efficient architecture and pricing that scales.
Other posts
Ready to build your product?
Book a free 30-minute call, or hire a certified Bubble.io developer.
Book a free callHire a Bubble developer