Calculate SaaS gross margin by subtracting cost of goods sold (hosting, support, infrastructure) from revenue. Benchmark against 70-80% targets.
SaaS gross margin measures how efficiently a company delivers its software after accounting for the direct costs of serving customers. Unlike traditional businesses where COGS includes physical materials and manufacturing, SaaS COGS primarily consists of cloud hosting and infrastructure, customer support salaries, payment processing fees, and third-party software costs embedded in the product.
Healthy SaaS companies typically achieve gross margins of 70–80%, significantly higher than most traditional industries. This high margin is what makes SaaS business models attractive to investors — it leaves substantial room for R&D investment, sales and marketing spend, and eventual profitability. Margins below 60% may signal over-reliance on manual services or inefficient infrastructure.
This calculator computes your SaaS gross margin with a detailed COGS breakdown, benchmarks your result against industry standards, and shows how each cost category contributes to your margin. Use it to identify the biggest opportunities for margin improvement and model the impact of cost optimizations.
Understanding your SaaS gross margin with granular COGS breakdown helps you identify exactly where money is going and what levers you have to improve profitability. This calculator separates hosting, support, and other COGS components so you can see which costs have the most impact and model targeted optimizations. It benchmarks your result against the 70–80% range that investors expect.
SaaS Gross Margin (%) = (Revenue − COGS) ÷ Revenue × 100 SaaS COGS = Hosting + Support + Payment Processing + Third-Party Costs + DevOps Gross Profit = Revenue − COGS
Result: Gross Margin = 80.0%
With $5M revenue and total COGS of $1M ($400K hosting + $350K support + $150K payments + $100K other), the gross profit is $4M. Gross margin is ($5M − $1M) ÷ $5M × 100 = 80.0%. This is at the high end of healthy SaaS range. Hosting represents 40% of COGS and is the primary target for optimization.
The composition of SaaS COGS is fundamentally different from traditional businesses. There are no raw materials or manufacturing costs. Instead, the primary costs are cloud infrastructure (typically 20–40% of COGS), customer support (20–35%), payment processing (10–20%), and miscellaneous third-party costs. Understanding this breakdown is key to identifying optimization opportunities.
Early-stage SaaS companies (pre-$5M ARR) often have lower gross margins (55–70%) because fixed infrastructure costs haven't been amortized across a large customer base. Growth-stage companies ($5–50M ARR) should target 70–75%. Mature SaaS companies ($50M+ ARR) with efficient operations regularly achieve 75–85%. The improvement comes from economies of scale in hosting and support.
Gross margin is a key factor in SaaS valuation multiples. Companies with 80%+ margins command significantly higher revenue multiples than those at 60%. Investors recognize that high-margin revenue converts more efficiently to free cash flow, making it more valuable per dollar. Every percentage point of margin improvement drops directly to the bottom line.
SaaS COGS typically includes cloud hosting and infrastructure, customer support team costs, payment processing fees, third-party software costs embedded in the product, DevOps team costs directly related to production, and data costs. It excludes R&D, sales, marketing, and general administrative expenses.
Most healthy SaaS companies achieve gross margins of 70–80%. Above 80% is excellent and typical for self-serve products with minimal support costs. Below 60% often indicates heavy services components or inefficient infrastructure. Investors generally expect SaaS gross margins above 65% as a minimum.
SaaS products have near-zero marginal cost of serving additional customers. Once software is built, each new user costs only incremental hosting and support. Physical product companies must pay for materials, manufacturing, and shipping per unit. This fundamental difference in cost structure is why SaaS commands premium valuations.
It depends on context. For unit economics and investor reporting, pure SaaS gross margin (excluding services) is most informative. For overall P&L analysis, blended margin including services gives the full picture. Many companies report both. Services typically carry 10–30% margins and significantly dilute blended gross margin.
Gross margin directly impacts CAC payback period, LTV calculations, and Rule of 40 scores. Higher margins mean each revenue dollar contributes more to covering acquisition costs. The CAC payback formula divides CAC by (ARPU × Gross Margin), so a 10% margin improvement can reduce payback period by 12–15%.
The biggest levers are: optimizing cloud infrastructure (reserved instances, right-sizing, multi-cloud strategy), investing in self-service support (knowledge base, chatbots, community), negotiating better payment processing rates at scale, and reducing third-party API costs through caching or building in-house alternatives. Always verify with current data, as conditions may change over time.