Skip to content

Startup Calculators

Gross Margin Calculator

Calculate the percentage of revenue left after covering direct production or service costs.

Last updated: July 2026

Calculator

What is the Gross Margin Calculator?

The Gross Margin Calculator measures how much of each dollar of revenue remains after direct costs are paid. It is a core startup metric for pricing, product economics, and profitability analysis.

How does it work?

Enter your total revenue and cost of goods sold. The calculator subtracts COGS from revenue, then divides by revenue to show the margin percentage.

Formula

((revenue - COGS) / revenue) x 100

How the calculation works

How the calculation works

  1. 1Start with total revenue from sales or subscriptions.
  2. 2Subtract cost of goods sold (COGS) from revenue to find gross profit.
  3. 3Divide gross profit by total revenue.
  4. 4Multiply by 100 to express the result as a gross margin percentage.
revenueTotal revenue from sales or subscriptions in the period
cogsDirect costs required to deliver the product or service, such as hosting and support
grossMarginThe percentage of each revenue dollar left after direct delivery costs

Worked example

Worked Example

Summitboard Software, a fictional B2B SaaS company, wants to check its pricing health. It generates $500,000 in subscription revenue and spends $200,000 on direct delivery costs such as cloud infrastructure and support.

Revenue500000
Cost of goods sold200000
  1. 1Subtract COGS from revenue: 500000 - 200000 = 300000 gross profit
  2. 2Divide gross profit by revenue: 300000 / 500000 = 0.6
  3. 3Multiply by 100 to get the margin: 0.6 x 100 = 60%

Result

Summitboard Software keeps 60% of every revenue dollar after direct delivery costs, leaving $300,000 to cover operating expenses and profit.

Interpretation guide

How to read your result

WeakBelow 40%

Direct costs consume more than 60% of revenue, common in hardware and low-margin services but dangerous for SaaS where margins are expected to be high.

Review pricing, hosting spend, and delivery costs to identify where margin is leaking.

Typical40-60%

In line with services, ecommerce, and hardware businesses, but below the range investors expect from software.

For SaaS, look for cloud, support, and onboarding costs that can be streamlined to push margin toward the 70%+ band.

Strong60-80%

A healthy margin that covers efficient delivery and is typical of well-run software companies.

Protect it by keeping infrastructure costs tied to usage and avoid discounting eroding the base.

Exceptional80%+

A premium margin typical of top-tier SaaS businesses where delivery costs scale slowly relative to revenue.

This margin supports aggressive reinvestment in growth; ensure pricing stays disciplined so it does not slip.

Benchmarks

Typical gross margins by business model

MetricTypicalStrong
SaaS (software)70-85%85%+
Professional services30-50%50%+
Ecommerce30-50%50%+
Hardware25-40%40%+

Common mistakes

  • - Mixing operating expenses into COGS
  • - Ignoring discounted or returned revenue
  • - Assuming a high gross margin always means strong profit

Practical tips

Practical tips

For SaaS, include only direct costs in COGS: cloud infrastructure, support, onboarding, and payment processing. Exclude salaries, marketing, and office costs.

Track gross margin by product line and customer segment, not just company-wide, because margin killers hide in averages.

Use annual or multi-year contracts to lower payment processing and collection costs per dollar of revenue.

Watch discounting: a 20% discount on a 70% margin product cuts the margin to 60%, a structural cost you pay forever.

Review usage-based infrastructure costs monthly, since runaway compute bills are the most common SaaS margin leak.

Compare your margin to SaaS norms (70-85%) before investor conversations, since low margins invite tough diligence questions.

When should you use it?

  • - Reviewing pricing and unit economics
  • - Comparing product lines or customer segments
  • - Preparing investor or board materials
  • - Evaluating whether margins are strong enough to scale

Benefits

  • - Shows whether pricing covers the cost of delivery
  • - Helps identify margin erosion before it becomes severe
  • - Supports better product and packaging decisions

Use cases

  • - Pricing analysis
  • - Product profitability reviews
  • - Investor diligence

Step-by-step example

Collect total revenue from sales or subscriptions. Add all direct costs required to deliver the product or service. Subtract COGS from revenue and divide by revenue to get the gross margin percentage.

Real-world example

A business generating $500,000 in revenue with $200,000 in COGS has a gross margin of 60%. That means 60% of revenue remains after direct production costs.

FAQ

What belongs in COGS for a SaaS company?

COGS for SaaS typically includes cloud hosting, infrastructure, support staff, onboarding, and payment processing fees. Sales, marketing, and R&D costs belong in operating expenses, not COGS.

How do discounts and free trials affect gross margin?

Discounts lower effective revenue without lowering delivery costs, which drags margin down. Free trials add usage and support costs without revenue, so factor both in when you benchmark your margin.

Why do hardware companies have lower gross margins than SaaS?

Hardware must pay for raw materials, manufacturing, shipping, and inventory, which scale with every unit sold. Software has near-zero marginal delivery cost, which is why SaaS margins commonly exceed 70%.

Difference between Gross Margin and Profit Margin

Gross margin focuses on revenue after direct costs, while profit margin includes all operating expenses, interest, and taxes. Profit margin is generally lower than gross margin.

Healthy gross margin

Healthy gross margin varies by industry. Software and digital services often have high margins, while physical goods businesses usually operate with lower margins due to production and shipping costs.

How to improve margin

You can improve margin by raising prices, reducing production costs, improving supplier terms, or increasing sales mix toward higher-margin offerings.

Related guides

Related calculators

Methodology

ApproachThe calculator subtracts cost of goods sold from total revenue, divides the result by total revenue, and multiplies by 100 to produce a gross margin percentage. The result is capped at 100%.
SourceSaaS industry benchmark research from OpenView Partners and BVP's State of the Cloud.
UpdatedJuly 2026
RoundingResults are rounded to 2 decimal places.
UnitsCurrency in USD; the result is a percentage.
ExclusionsDoes not include operating expenses such as R&D, sales, marketing, and G&A, which are captured by net profit margin instead.
LimitationsCOGS definitions vary by company; inconsistent classification makes margins hard to compare across businesses.

Accuracy notice

Informational only, not financial advice. Gross margin is one input into overall profitability; pair it with operating expense analysis before drawing conclusions about business health.

Written by

Navneet Verma

AI Automation Developer & Web Engineer

Specializes in AI APIs, workflow automation, SaaS tools, developer resources, and cost optimization. Builds practical calculators and technical resources that help businesses understand pricing, automation, and operational efficiency.