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
- 1Start with total revenue from sales or subscriptions.
- 2Subtract cost of goods sold (COGS) from revenue to find gross profit.
- 3Divide gross profit by total revenue.
- 4Multiply by 100 to express the result as a gross margin percentage.
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.
- 1Subtract COGS from revenue: 500000 - 200000 = 300000 gross profit
- 2Divide gross profit by revenue: 300000 / 500000 = 0.6
- 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
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.
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.
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.
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
| Metric | Typical | Strong |
|---|---|---|
| SaaS (software) | 70-85% | 85%+ |
| Professional services | 30-50% | 50%+ |
| Ecommerce | 30-50% | 50%+ |
| Hardware | 25-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.