Revenue is the number everyone celebrates, but not all revenue is equally useful. Gross margin decides how much of each dollar is left to pay back acquisition costs, fund the team, and eventually become profit.
What gross margin is
Gross margin is revenue minus the direct cost of delivering the service, as a percentage of revenue. For software that usually means hosting, third-party services, payment fees and customer support. Salaries for sales, marketing and product development are not included.
Same price, different value
Take two products that both charge $50 a month and both lose 3% of customers each month, so an average customer stays about 33 months. One has an 80% gross margin, the other 50%.
80% margin
$50.00 × 80% × 33.3 moequals$1,333
50% margin
$50.00 × 50% × 33.3 moequals$833
The lower-margin business earns $500 less per customer over their lifetime, even though the revenue is identical.
It also slows payback
Only the margin is available to recover what you spent winning the customer. With a $300 acquisition cost, the 80% business earns it back in 7.5 months. The 50% business takes 12 months, so its cash is tied up much longer and it can afford to grow less aggressively.
What lowers gross margin
- Heavy use of paid third-party APIs, including AI models, for every customer action.
- Hands-on onboarding or support that grows with every customer.
- Inefficient hosting that has not been tuned as usage grew.
- Discounts that cut price without cutting cost.
Products built on AI models are a current example: if every request calls a paid model, costs rise with usage and margins can be much lower than traditional software. Tracking cost per customer early helps you price sensibly.
What is a good gross margin in 2026?
Benchmarks give you a sense of where you stand, as long as you compare against the right group:
- Private B2B software: the 2026 Benchmarkit and Aleph benchmarks, covering full-year 2025 data from 342 companies, put the median software gross margin at 80%.
- The long-standing rule of thumb for subscription software is 75% or higher. Best-in-class products approach 90%.
- Products that combine software with a lot of services (implementation, managed work) typically land lower, in the low 70s.
- Compute-heavy AI-native products are benchmarked much lower, around 55% to 70%, because every customer action carries a model or GPU cost.
If you are well below your group, the question is whether it is structural (the product really does cost that much to deliver) or fixable (inefficient hosting, unpriced heavy usage, support that has not been automated).
What goes into cost of revenue, and what does not
Gross margin is only comparable if you count costs the same way as everyone else. Conventions vary a little, but the common split is:
- Include: hosting and infrastructure that serves customers, third-party APIs and AI model costs used in the product, payment processing fees, customer support and customer success teams, and onboarding or implementation work.
- Exclude: engineers building new features (research and development), sales and marketing, and general overheads such as finance, legal and office costs.
The most common mistake is leaving support out, which flatters the margin. The second is counting all engineering as cost of revenue, which understates it. Pick a rule, write it down, and apply it every month.
A worked month
Take a product with $100,000 of monthly revenue. It spends $6,000 on hosting, $4,000 on third-party APIs, about $3,000 on payment fees and $7,000 on its support team. Cost of revenue is $20,000, so gross margin is ($100,000 − $20,000) ÷ $100,000 = 80%, right at the benchmark median.
Now suppose it launches an AI feature. The average customer pays $50 a month and uses the feature 500 times, at about $0.01 of model cost per use. That is $5 of new cost on $50 of revenue: 10 percentage points of margin gone, unless the price, the usage limits or the model choice changes. This is why AI features should be priced from their cost per customer, not added to an existing plan for free.
How to raise gross margin
- Measure cost per customer, not just the total. Usually a small share of customers drives most of the variable cost.
- Put heavy, costly usage in higher tiers or charge for it separately, so price follows cost.
- For AI features, use smaller models where they are good enough, cache repeated prompts, and cap usage on entry plans.
- Automate the support questions that come up every week with better onboarding and documentation.
- Review hosting as usage grows: reserved capacity, right-sized servers and storage tiers often cut costs noticeably.
Tip: When you calculate LTV, always multiply by gross margin. Using revenue alone overstates what a customer is worth.
Questions people ask
- What is gross margin in SaaS?
- Revenue minus the direct cost of delivering the service, such as hosting, third-party services, payment fees and support, as a percentage of revenue.
- How does gross margin affect LTV?
- LTV is gross profit per customer, so at the same price and churn, an 80% margin gives an LTV of $1,333 and a 50% margin only $833.
- Why do AI products often have lower gross margins?
- If every customer action calls a paid model, costs rise with usage, unlike traditional software where serving another user costs little.
- What is a good gross margin for SaaS in 2026?
- The median for private B2B software is about 80% (Benchmarkit and Aleph, full-year 2025 data). 75% or more is the usual target; compute-heavy AI products are often 55% to 70%.
- Is customer support included in SaaS cost of revenue?
- Usually yes. Support and customer success that serve existing customers are normally counted in cost of revenue, while sales, marketing and R&D are not.