Not sure which service fits?

Indicators
SaaS
Strategy
Consulting
7
MIN

Gross Margin Formula: How to Calculate it in SaaS

AUTHOR
Maciej Wilczyński
PUBLISHED
December 15, 2023
LAST UPDATE
September 9, 2026

Are you running a SaaS business and wondering how to improve your gross margin? Or do you want to learn the basics of this figure? 

Either way, it's all in this article. 

Find out how to calculate the gross margin, discover what affects it, and meet a partner who will help you make the most of it. Sit back and learn all the answers!

What is Gross Margin and Why it's Important in SaaS?

Let's start from the beginning and answer what is gross margin.

Gross margin is a financial metric used by businesses to understand how profitable they are at selling their products or services. It tells you how much money is left over from sales after covering direct costs.

It's a really important number because it says how effectively a company turns sales into profit.

Now, why is gross margin especially important in SaaS? 

Well, in the SaaS area, companies usually spend a lot upfront to develop their software. Once it's made, they need to sell it at a fair price, which would cover all costs and make some money. 

So, a healthy gross margin means the company is really efficient at turning its main product, the software, into gain.

Gross Margin Formula and Components

The gross margin is calculated by subtracting the Cost of Goods Sold (COGS) from the revenue and then dividing that result by the revenue.

Gross margin calculation: Gross margin = (Revenue - COGS) / Revenue

Here are the components:

Revenue - the total amount of money earned from sales before any expenses are deducted.

Cost of Goods Sold (COGS) - in the context of a SaaS company, this includes all the direct costs associated with producing and delivering the service, like servers, software license fees, ongoing maintenance, etc.

Factors Affecting Gross Margin in SaaS

To better understand the gross margin metric in the SaaS industry, we need to understand what can affect it.

There are many areas, but we focus on 7 of them:

1️⃣ Subscriptions - they are often the primary source of income for SaaS companies. They come from the fees customers pay, usually on a monthly or annual basis, to use the software. Revenue from them is the starting point for calculating gross margin. It's important because the more subscription revenue a company generates, the higher the potential gross margin - assuming costs are managed well.

2️⃣ Costs - here, we are talking about indirect costs (not related to sales, like material, employee salary, rental costs, Customer Acquisition Costs (CAC), etc.) as well as direct costs, which may refer to expenses related to the delivery of software, for example:

  • server and hosting costs (expenses related to the infrastructure required to host and deliver the software service)
  • third-party service fees (payments for any third-party services integral to the software)
  • support (expenses related to customer support who help customers use the software effectively)

3️⃣ Customer behavior - the market is evolving rapidly, so customer behavior is also. You may have a month where you have more customers, but there may also be times when your services are not in high demand. This translates into revenue - if it's low and costs are high, the gross margin will be low too.

4️⃣ Business scale - as a SaaS company grows, its subscription revenue typically increases. However, the direct costs and variable expenses may increase at different scopes - faster or slower - so they can potentially lead to a higher or lower gross margin.

5️⃣ Pricing - pricing should reflect the perceived value of the product or service. If your price is too low, it might result in high sales volumes but lower revenue (and hence, lower gross margin). In contrast, if priced too high, it may deter potential customers, especially in a competitive market.

6️⃣ Savings - larger companies often have more negotiating power with suppliers, which can help lower costs for raw materials or services. This reduction in costs can significantly improve this margin.

7️⃣ Technology and automation - investments in technology and automation can also yield many benefits, like more efficient operations, reduced labor costs, and minimized other expenses. Thus they can really improve this metric.

💡Remember: The accuracy of data in each of these components is crucial for a meaningful gross margin calculation. Overestimating or underestimating can create an inaccurate picture of a company's financial health and drive inappropriate decisions.

Strategies to Improve Gross Margin

Now, look at these 10 practical strategies for SaaS businesses to enhance your gross margin.

Improve Customer Retention

First - focus on customer satisfaction and retention, as retaining existing customers is often cheaper than acquiring new ones. Try to implement loyalty programs or offer incentives for renewals. High retention rates will give you more stable and predictable revenue streams and enhance the margin.

Lower Costs

Also, analyze and streamline your cost of goods sold. Opt for cost-effective alternatives, find another supplier, or invest in technology that will help reduce ongoing operational costs. Saving money and keeping costs as low as possible - but without sacrificing service quality - will improve this margin more than you think.

Automate Processes

Implement automation in service delivery and customer support. Automation reduces human errors, helps in efficiency, and can scale easily without proportionate cost increases. Such a strategy can be so effective if you want to scale operations and control costs.

Expand into New Markets

Explore new geographical markets or customer segments to increase revenue. Diversifying your customer base can lead to higher sales volumes and spread fixed costs over a larger revenue base. However, don’t act blindly - do your research and understand new markets before entering them.

Try New Strategies

And what about developing new strategies to sell more to your existing customers? Offer them complementary products or premium features that add real value. Also, think about upselling and cross-selling - they can contribute to the revenue without corresponding increases in customer acquisition costs.

Focus on High-Margin Products 

Identify and focus on selling products or services with higher gross margins. Allocate more resources to marketing and improving these high-margin offerings. It may also be beneficial to phase out low-margin products.

Streamline Operations

Streamline operations to reduce waste and increase productivity. Review and optimize your workflows, and use key performance indicators (KPIs) to track and improve what’s necessary. Operational efficiency directly translates into cost savings, so it can positively affect more than just your gross margin.

Increase Your Competitiveness

Moreover, ensure that your product or service stands out in terms of quality and innovation. Such an offering can bring higher prices and strengthen customer loyalty. Logically, it will also result in better margins and draw the attention of your competitors' customers.

Conduct Financial Reviews

Conduct regular financial reviews to identify areas where more costs can be cut or when processes can be optimized. Use financial metrics to monitor the health of your business and make decisions based on real data. Stay on top of your finances, and you will maintain proper gross margins.

Optimize Pricing Models

Review and adjust pricing based on market demand, customer value perception, and competitor pricing. Use data-driven approaches to find the sweet spot where prices maximize both sales volume and per-unit profit. Consider working with partners who know pricing and can help you choose the best strategy.

And one such partner may be Valueships. ⭐

Improve your Pricing Strategies with Valueships

In Valueships, we specialize in helping businesses from many industries - including SaaS - optimize their pricing strategies. 

How? Well:

  • we focus on data-driven analysis to understand customers and market trends,
  • we have expertise in pricing optimization, so we can increase revenue, help in better customer segmentation, and enhance overall profitability,
  • our approaches refine pricing models and ensure they are aligned with customer expectations and market conditions.

Check out our comprehensive services that include: strategy consulting, pricing consulting, value-selling, and advanced analytics.

Thanks to them we do our best to maximize revenue growth and help companies achieve their goals. 

Last Words

Gross margin is one of the most important watchwords for entrepreneurs who want to make money from their products.  Think of it as a way to measure how good a company is at making money from its main activities. Such a metric needs to be closely and carefully tracked to get a clear picture of a company's profitability.

If you are looking for help with setting the right pricing strategies that will increase your gross margin - you have come to the right place. With our experience and your enthusiasm, we're sure to come up with the perfect solution. 

Reach out to Valueships and let’s get down to work. 😎

ABOUT THE AUTHOR
Maciej Wilczyński

Expert in B2B pricing, monetization and value-based selling strategies. Over the past year, he has completed over 40 consulting projects in Europe. Prior to founding Valueships, he worked at McKinsey & Company, mainly in the TelCo, software, and banking industries. He completed his doctorate in pricing in SaaS start-ups at the University of Economics in Wrocław, where he also lectures.

Read more

Blog
|
January 27, 2026
|
Maciej Orczykowski

AI pricing in 2026: what SaaS pricing models are actually changing (and what aren't)

Discover how AI pricing is reshaping SaaS pricing models in 2026. Expert insights from pricing consultants on usage-based, tiered, and value-based strategies.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
June 25, 2025
|
Aleksandra Romańczyk

Nordic SaaS pricing trends: key takeaways for effective pricing strategies

Discover effective pricing strategies with essential tips and best practices that can enhance your business profitability. Read the article now!

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
July 29, 2024
|
Maciej Wilczyński

Prestige Pricing: The Ultimate Guide

What is prestige pricing? What is the secret behind companies' interest in it? Why do high prices attract rather than deter customers? If you want to discover answers & learn more, check out this article.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
July 15, 2024
|
Kris Szyszkiewicz

What is Revenue Recognition Principle, and Why It Matters?

Already heard about the revenue recognition principle, but still don't know what it is? We can solve that. Click on our article and learn a lot more.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
July 8, 2024
|
Maciej Wilczyński

What is Outcome-Based Pricing (and How to Tackle it)

Discover outcome-based pricing, find out who they are best for, check out their most common myths, and much more!

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
May 28, 2024
|
Daniel Gawłowski

Is Machine Learning always a good choice?

Explore the benefits and limitations of machine learning in various applications. Understand when machine learning is the right solution and when alternative approaches might be more effective.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
May 13, 2024
|
Maciej Wilczyński

Rule of 40 in SaaS: A Brief Guide

What does Rule of 40 stand for in SaaS – and beyond? Read our blog post with actionable examples and practices to follow!

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
May 8, 2024
|
Maciej Wilczyński

What is Magic Number SaaS and How Does It Work?

What is Magic Number SaaS and how can you leverage it in your strategy? Read our blog post to find out today.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
May 7, 2024
|
Daniel Gawłowski

What won't your churn model tell you?

Discover the untold insights beyond your churn model's predictions.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
April 30, 2024
|
Kris Szyszkiewicz

Maximizing Product Features for Effective Cross/Up-Selling

What does maximizing product features have to do with cross-selling and up-selling tactics? Find out in this blog post!

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
April 26, 2024
|
Kris Szyszkiewicz

Price as a Lever: a Brief Guide

Want to learn how to manage your prices to make them like a ladder to success? If so, we may have what you need. Click and explore our suggestions.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
April 19, 2024
|
Maciej Wilczyński

4 Simple Steps to Increase Your Profitability

Wondering how to increase profitability but don't know how? Start with your pricing. We already tell you how.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
April 10, 2024
|
Kris Szyszkiewicz

Simplify with Price Waterfall: Uncover True Price Erosion

Price Waterfall: does it tell you anything? Have you ever heard of it? If you're wondering the answer and want to learn about price erosion, this article is for you.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
March 11, 2024
|
Kris Szyszkiewicz

Top Pricing Optimization Strategies for 2024

Want to know the top pricing optimization strategies in 2024? Click and find out all from our article.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
March 9, 2024
|
Maciej Wilczyński

Penetration pricing: What is it and when to use It?

Use a penetration pricing strategy and increase your profits. How? Check out these examples!

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
March 7, 2024
|
Maciej Wilczyński

SaaS Revenue Model: Examples and Types of SaaS Business Model

Wondering if the SaaS revenue model is the right one for your business? Read our blog post to find out!

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
January 30, 2024
|
Kris Szyszkiewicz

What is Total Contract Value (TCV) and How to Calculate it

Learn about Total Contract Value (TCV) - an important metric for SaaS businesses, and find out how to calculate this indicator.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
January 29, 2024
|
Maciej Wilczyński

Is Unearned Revenue a Liability and How to Record It?

Wondering if unearned revenue is a liability? The answer is clear. Learn about it and much more in our article.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
January 24, 2024
|
Kris Szyszkiewicz

Freemium in SaaS: Hot or Not?

Have you ever wondered what freemium in SaaS really means? What are its benefits, how can it increase paying customers, etc.? Click and find the answers!

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
January 15, 2024
|
Maciej Wilczyński

Chargebee for SaaS: What It Is and Its Alternative

The SaaS industry can be complicated, but there are tools to help you operate in it. One of them is Chargebee. Click and find out what it is, what products it offers, and learn about its alternative.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
December 20, 2023
|
Maciej Wilczyński

What is Dynamic Pricing? Let's Explore the Topic!

Dynamic pricing - it raises concerns in some, and others see it as a success. What is it all about? Why is it controversial? Is it a good way to set prices? Take a look and find out everything.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
December 15, 2023
|
Maciej Wilczyński

Gross Margin Formula: How to Calculate it in SaaS

Want to know what gross margin is and what its formula looks like? Click and see this and much more!

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
December 14, 2023
|
Kris Szyszkiewicz

What is Deferred Revenue and How Does it Work

Not sure what the term "deferred revenue" means. Take a look at our article, and you'll learn its definition, advantages, challenges, examples, and best practices.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
November 20, 2023
|
Kris Szyszkiewicz

The odd-even pricing phenomenon: does it really increase sales?

Explore essentials about odd-even pricing strategies. Uncover nuances of this pricing phenomenon and discover its potential so you can finally boost sales.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
November 13, 2023
|
Maciej Wilczyński

Flat Rate Pricing vs. Hourly Billing: Which is Better for Your Business?

What to choose: flat rate vs. hourly billing? Which pricing is best for your business and why? All answers in this article.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
November 3, 2023
|
Maciej Wilczyński

Price leadership: a guide for emerging businesses

Do you know the concept of price leadership ? If not, delve into the different types of price leadership strategies employed by companies for sustainable success.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
October 31, 2023
|
Kris Szyszkiewicz

The Rise of Direct to Consumer Marketing: How Brands Can Benefit?

Here's our guide to Direct-to-Consumer marketing strategy. Join successful DTC brands, and discover the secrets of DTC marketing, its challenges, and future trends.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
October 24, 2023
|
Kris Szyszkiewicz

Predatory Pricing: Definition, Example, and Why It's Used

What is a predatory pricing strategy? What does this practice of setting prices have to do with low prices and why is it used in business? Here's what we know.

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
October 19, 2023
|
Maciej Wilczyński

What is Captive Product Pricing (And Why It Might Be Beneficial?)

Captive product pricing is a pricing strategy that is often used for SaaS, but not only. Read what else you can use it for in your business!

read nowRight-pointing white pixel art chevron arrow on a transparent background.
Blog
|
October 17, 2023
|
Maciej Wilczyński

Leveraging differentiation pricing strategy to stand out in the market

Learn about differentiation pricing and its game-changing impact on the market. Here, we explore its importance and practical steps to implementation, so you can elevate your product's unique value proposition.

read nowRight-pointing white pixel art chevron arrow on a transparent background.